This invention provides an encoding apparatus including a group generating
unit that puts plural information values to be compressed together and
generates a group of information values to be compressed; a code
assignment unit that assigns a code to each group generated by the group
generating unit; and an information encoding unit that encodes the
information values to be compressed belonging to each group, using the
code assigned to each group.