A preferred method and algorithm of compressing IPv6 addresses is
presented which ensures smaller memory occupancy for IPv6 routing tables
and databases in general (applicability to particular case of databases
of the routing protocol OSPF for IPv6 is described). A method and
algorithm of comparison of such compressed IPv6 addresses without
decompression is presented, a method of comparison that ensures in the
majority of cases better comparison performance than for the case of
comparing uncompressed IPv6 addresses. Also, a preferred method and
algorithm of decompressing IPv6 addresses that were compressed using this
preferred format is given, and a method and algorithm of comparison of an
uncompressed IPv6 address with a compressed IPv6 address without
decompression. The exemplary comparison methods may achieve or exceed
comparable performance with the performance of comparing uncompressed
addresses. Illustrations for the particular case of the routing protocol
OSPF for IPv6 are presented for all cases.