Patent ID: 8175164

Claim:
A device for data compression, comprising: a domain transformer unit configured to transform time-domain data into frequency-domain data; a classifying unit configured to determine an encoding type of the frequency-domain data based on an occurrence probability of the frequency-domain data, wherein the classifying unit is configured to determine that first AC values having low occurrence probabilities are encoded by a variable length coding and second AC values having high occurrence probabilities are encoded by a fixed length coding; a variable length encoder configured to encode first frequency-domain data that are determined to be encoded by the variable length coding; a fixed length encoder configured to encode second frequency-domain data which are determined to be encoded by the fixed length coding; and a memory unit configured to store the encoded first frequency-domain data encoded by the variable length encoder and the second frequency-domain data encoded by the fixed length encoder, wherein the first and second frequency-domain data are relocated by relocating the encoded first frequency-domain data corresponding to one of the first AC values adjacent to other of the encoded first frequency-domain data corresponding to other of the first AC values and relocating the second frequency-domain data corresponding to one of the second AC values adjacent to other of the encoded second frequency-domain data corresponding to other of the second AC values.