support for encoding and decoding variable length addresses