Fast and efficient data compression can be carried out. Original image data
are subjected to wavelet transform. The obtained wavelet-transformed data are classified
and bit allocation is determined. Based on the determined bit allocation, the wavelet-transformed
data are quantized and quantized data are obtained. The quantized data are classified
into 0 data and non-zero data. Binary classification information data indicating
this classification are also obtained. The classification information data are
coded according to a coding method having a comparatively simple operation, such
as Huffman coding and run length coding. The multi-valued, non-zero data are coded
according to a coding method having a high compression efficiency although having
a comparatively complex operation, such as universal coding and Golomb-Rice coding.