DATA COMPRESSION METHOD AND APPARATUS
Abstract:
This application discloses a data compression method and apparatus. The method includes: obtaining m data blocks in a data area of a readable and writable file system; compressing the m data blocks by using a preset compression algorithm, to sequentially obtain n compressed data blocks, where first capacities of the compressed data blocks are the same, and the first capacity represents a quantity of bytes of compressed data that can be included in the compressed data block; and establishing a first index of each of j data blocks corresponding to an ith compressed data block in the n compressed data blocks, and recording a mapping relationship between first indexes and the j data blocks. The first index is used to identify a storage location, in a storage medium, of each data block included in the j data blocks, and attribute information included in each of the j data blocks.
Information query
Patent Agency Ranking
0/0