US 12,189,601 B2
Data compression method, data decompression method, and electronic device
Yuanchao Li, Shenzhen (CN); Kuen Hung Tsoi, Shenzhen (CN); and Xinyu Niu, Shenzhen (CN)
Assigned to Shenzhen Corerain Technologies Co., Ltd., Shenzhen (CN)
Filed by Shenzhen Corerain Technologies Co., Ltd., Shenzhen (CN)
Filed on Jul. 31, 2023, as Appl. No. 18/362,181.
Claims priority of application No. 202211533923.4 (CN), filed on Dec. 1, 2022.
Prior Publication US 2024/0184763 A1, Jun. 6, 2024
Int. Cl. G06F 16/22 (2019.01)
CPC G06F 16/2282 (2019.01) 10 Claims
OG exemplary drawing
 
1. A data compression method, comprising:
establishing an initial lookup table by using data with a same numerical value in data to be compressed as one index and according to a number of indexes;
sequentially performing an encoding operation on the numerical value corresponding to each of the indexes to obtain an encoding result, and adding a separator to the encoding result to obtain an encoding list containing a target encoding value corresponding to each of the indexes and a target encoding length corresponding to each of the indexes; and
adding the encoding list to the initial lookup table to obtain a target lookup table for the data to be compressed after compression;
wherein the establishing the initial lookup table by using the data with the same numerical value in the data to be compressed as one index and according to the number of indexes comprises:
collecting the data with the same numerical value in the data to be compressed, and using the data with the same numerical value as one index; and
counting a number of appearances of each of the same numerical values, and establishing the initial lookup table according to the same numerical values, the number of indexes, and the numbers of appearances of the same numerical values.