CPC G06F 16/2282 (2019.01) | 10 Claims |
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.
|