- An arbitrary sequence of octets can be represented.
- An encoding can be included in a URI without character escaping.
- The encoding does not depend on case being preserved.
- The encoding is compact.
- Encoding and decoding are fast.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
WaterkenTM Encbase32 Encoding2003-06-27The base32 encoding is designed to represent arbitrary sequences of octets in a form that is suitable for inclusion in a URI or filename. Abstract
Each 5 bits of input is encoded as a character from the alphabet: OverviewDesign goals
An arbitrary sequence of octetsThe encoded data may be a cryptographic hash or a nonce. URI inclusion
The purpose of this encoding is to include octet sequences in a URI. The encoding
alphabet is restricted to the Case-insensitiveIn some situations, the transport does not guarantee that case will be preserved during transmission. For example, case is not preserved with DNS names and filenames in some filesystems. Non-compliant SMTP software may also fail to preserve case in mailbox names. Compact encodingA URI or filename is easier to use when it is short. Fast encodingEncoding/decoding time will often be included in the latency of lookup operations. DescriptionA 32-character subset of US-ASCII is used, enabling 5 bits to be represented per printable character. Octets are encoded from first to last, with each octet being processed in big-endian bit order. This binary stream is processed in 5 bit groups, each of which is translated into a single character in the base32 alphabet. Each 5-bit group is used as an index into an array of 32 printable characters. The character referenced by the index is placed in the output string. These characters, identified in Table 1, below, are selected from US-ASCII digits and lowercase letters.
If the length of the binary input stream is not a multiple of 5, the stream is padded with
During decoding, changes in case are ignored; however, any other character from outside of the
case-insensitive encoding alphabet is treated as an unrecoverable decoding error. The decoder MUST also
verify that the encoding represents an integral number of octets and that any padding bits are
References[URI] T. Berners-Lee, R. Fielding and L. Masinter; "Uniform Resource Identifiers (URI): Generic Syntax and Semantics"; RFC 2396; August 1998. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
top
Copyright 2002 - 2003 Waterken Inc. All rights reserved. |