A device divides a table (60) including element information contained in
tree-structure information and position information in a corresponding
tree-structure into an element information value (61) and position
information (62) by a table division unit (101). An element information
rearrangement unit (103) rearranges the divided element information
values (61) into an order in a dictionary. Correspondence information
(703) indicating the order change by this rearrangement is extracted by a
correspondence information extraction unit (104). A position information
encoding unit (102) and a corresponding information encoding unit (105)
encode the position information (62) and the correspondence information
(703), respectively. By using the encoded position information (62) and
the correspondence information (703) and the element information values
(61), a compressed information forming unit (106) forms compressed
information from these.