摘要 |
PURPOSE: A method for compressing and recovering an execution file is provided to minimize a memory space and a network occupancy by reducing a size of the execution file in a system which receives, executes, and stores execution files from a server. CONSTITUTION: A program of an ELF(Executable and Linkable Format) file format is compiled as a binary file(S101). The last address of the binary file is stored in a pointer. A size of the binary file is stored in a variable, which indicates a size of a file to be compressed(S103). If a value of the last address is '0'(S104), a size of the file to be compressed and a pointer, which indicates the last address, are reduced one by one(S105). The operation is repeated until the value of the last address is not '0'. Thus, new file having a reduced size is created(S106), a string which displays a compressed binary file is inserted in the first area of a header unit(S107). A start address which is a base for memory storage is inserted(S108). A size of the original binary file before the compression is inserted(S109). A size of a compressed and newly created binary file is inserted(S110). Finally, actual payload data are inserted(S111), and a compressed binary file is created.
|