-
公开(公告)号:US20240283463A1
公开(公告)日:2024-08-22
申请号:US18567644
申请日:2022-04-07
Applicant: HUAWEI TECHNOLOGIES CO., LTD.
Inventor: Chao YU , Yi CHEN , Guifu LI , Ge QIU , Zhipeng LI , Daiyue ZHANG , Jing QIAN
CPC classification number: H03M7/6047 , G06F3/0608 , G06F3/064
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.