An apparatus and a method for encoding and decoding key data are provided.
An apparatus for encoding DPCMed differential data of key data includes a
DND operator which performs on input differential data a predetermined
number of times a DND operation, in which a divide operation is performed
on the input differential data so as to divide differential data
belonging to a positive number region into halves and so as to convert
one half of the differential data belonging to an upper range than the
other half into negative values, and either a divide-up operation or a
divide-down operation is selectively performed on the results of the
divide operation depending on the range of the results of the divide
operation so as to reduce the range of differential data belonging to a
negative number region or the positive number region, respectively, a
shift-up operator which performs a shift-up operation on the results of
the DND operation so as to transfer the differential data having been
through the DND operation to either the positive or negative number
region, a differential data selector which selectively outputs either the
differential data having been through the DND operation or the
differential data having been through the shift-up operation, and an
entropy encoder which entropy-encodes the differential data selected by
the differential data selector.