US 12,463,662 B2
Data compression method and apparatus
Chao Yu, Shenzhen (CN); Yi Chen, Shenzhen (CN); Guifu Li, Shenzhen (CN); Ge Qiu, Shanghai (CN); Zhipeng Li, Shenzhen (CN); Daiyue Zhang, Shanghai (CN); and Jing Qian, Shanghai (CN)
Assigned to Huawei Technologies Co., Ltd., Shenzhen (CN)
Appl. No. 18/567,644
Filed by HUAWEI TECHNOLOGIES CO., LTD., Guangdong (CN)
PCT Filed Apr. 7, 2022, PCT No. PCT/CN2022/085621
§ 371(c)(1), (2) Date Dec. 6, 2023,
PCT Pub. No. WO2022/262381, PCT Pub. Date Dec. 22, 2022.
Claims priority of application No. 202110667882.7 (CN), filed on Jun. 16, 2021.
Prior Publication US 2024/0283463 A1, Aug. 22, 2024
Int. Cl. H03M 7/30 (2006.01); G06F 3/06 (2006.01)
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
OG exemplary drawing
 
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.