An input pixel valid-bit-number setting unit sets an input pixel
valid-bit-number which is the number of gradations of input pixel data. A
predictive pixel value generating unit refers to the higher-order bits of
earlier already-input pixel data to generate a predictive pixel value for
the higher-order bits of a new input pixel. A prediction error group
detecting unit detects a prediction error group indicative of the
magnitude range of a difference between the predictive pixel value and
the value of the higher-order bits of the new input pixel. A prediction
error encoding unit multiplexes variable-length encoded information
indicative of the prediction error group, overhead bits indicative of a
specific value within the prediction error group, and the lower-order
bits of the input pixel appropriate for the input pixel valid-bit-number.