Patent ID: 8755621

Claim:
A data compression method, comprising: acquiring an original data from a memory; processing the original data to generate a transformation matrix; transforming the transformation matrix into a quantization matrix based on a quantization table; transforming the quantization matrix into a digital sequence based on a coding table; comparing a data volume of the digital sequence and a target volume to generate a volume difference; transforming the digital sequence into an inverse quantization matrix based on the volume difference; and transforming the inverse quantization matrix into a modified digital sequence based on the volume difference; wherein the step of transforming the digital sequence into an inverse quantization matrix includes: setting a predetermined difference value; transforming the digital sequence into an inverse code matrix if the volume difference is greater than the predetermined difference value; and performing an inverse quantization on the inverse code matrix based on the quantization table; wherein the step of transforming the quantization matrix into a digital sequence includes: using different coding methods to transform different portions of the quantization matrix into the digital sequence, and a direct current coefficient of the quantization matrix is coded by a predictive coding method and an entropy coding method or by the predictive coding method and a Huffman coding method or an arithmetic coding method; wherein the step of transforming the transformation matrix into the quantization matrix includes: dividing coefficients of the transformation matrix by a constant and then rounding the coefficients off to the nearest integer to adjust the coefficients with high weight to 0 to reduce a data amount of the transformation matrix and save a space of the memory required for storing the transformation matrix, so that the digital sequence and the original data have the same format, but less memory space is required to store the digital sequence than the original data.