The present invention makes it possible to effectively encode/decode
position information of leaves or nodes in tree-structured information by
using a less amount of bits. The coding device according to the present
invention includes a branching layer discriminating portion for
identifying a hierarchical layer in which a leaf or node and a preceding
leaf or node are separately branched and a position information coding
portion for outputting a code corresponding to the identified
hierarchical layer as a position information code for the leaf or node.
Namely, merely information indicating a hierarchical layer in which a
current leaf or node and a preceding leaf or node are separately branched
is encoded as the position information of the leaf or node, thus
increasing the efficiency of encoding leaf or node positions in the
tree-structured information.