摘要 |
Provided are a compression and decompression method and apparatus ensuring upward compatibility. The data compression and decompression apparatus according to the present invention comprises: a compressed file parsing unit which parses a compressed file including compressed data and a header, and an extension field containing information on the compressed data, in order to extract compressed data; and an original file generating unit which decompresses the compressed data to generate an original file. The extension field comprises an extension field terminating code and one or more extension field units, wherein the extension field terminating code indicates the termination of a region containing the extension field unit. The header and the extension field unit start with respective data identification codes having the same number of bytes. Preferably, the extension field unit further comprises data on the length thereof located after a predetermined byte from the data identification code thereof. In addition, it is preferable that, during the performance of the parsing operation on the basis of the data identification code, the compressed file parsing unit skips the extension field unit using the length data if the data identification code of said extension field unit is not defined. |