| CPC H03M 7/6047 (2013.01) [G06F 3/0608 (2013.01); G06F 3/064 (2013.01); G06F 3/0641 (2013.01); G06F 3/0683 (2013.01)] | 20 Claims |

|
1. A data compression method, wherein the method comprises:
obtaining m data blocks in a data area of a readable and writable file system, wherein m is a positive integer greater than or equal to 1;
compressing the m data blocks by using a preset compression algorithm, to sequentially obtain n compressed data blocks, wherein first capacities of the compressed data blocks are the same, the first capacity represents a quantity of bytes of compressed data that can be comprised in the compressed data block, and n is a positive integer greater than or equal to 1; 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, wherein i is a positive integer greater than or equal to 1 and less than or equal to n, and j is a positive integer greater than or equal to 1 and less than or equal to m, wherein
the first index identifies a storage location, in a storage medium, of each data block comprised in the j data blocks, and attribute information comprised in each of the j data blocks.
|