摘要 |
The present invention relates to a data compression method and a device thereof. The data compression method includes: a step of converting raw binary data into a binary cluster unit composed on only ″1″ and generating a first mapping table and a first mapping dictionary by arranging the clusters by appearance frequency in the descending order and mapping universal codes by order; and a step of compressing the raw data using the first mapping table and a second mapping table. The present invention also relates to a data decompression method and a device thereof. The data decompression method includes: a step of recovering the final compression result file, the first mapping dictionary, and the first mapping table; and a step of decompressing the data into raw data by separating the final compression result by universal code in order, selecting the first mapping table according to the length of the universal code, converting the data into raw binary clusters. Different from the method of arranging clusters in the ascending order of the length and mapping the result to universal codes, which is the previous invention of the same inventor, the present invention can improve the compression efficiency according to the property of data by arranging clusters in the descending order of the appearance frequency and mapping the result to universal codes. |