Radix
|
The RadixCodec type exposes the following members.
Name | Description | |
---|---|---|
RadixCodec | Creates a new RadixCodec. |
Name | Description | |
---|---|---|
Radix | Gets the radix, i.e., target base value, for this RadixCodec. | |
Radix16 | Gets a radix-16 value (hex) encoding. | |
Radix2 | Gets a radix-2 value (binary) encoding. | |
Radix256 | Gets a radix-256 value encoding. | |
Radix32 | Gets a radix-32 value encoding. | |
Radix36 | Gets a radix-36 value encoding. | |
Radix64 | Gets a radix-64 value encoding. | |
Radix64B | Gets a radix-64 value encoding with the standard Base64 character sequence (results are unpadded). | |
Radix65535 | Gets a radix-65535 value encoding. This is the largest supported radix. | |
Radix8 | Gets a radix-8 value (octal) encoding. | |
Radix86 | Gets a radix-86 value encoding. |
Name | Description | |
---|---|---|
Decode(Type, String) | Converts a radix value to an integer value. | |
DecodeT(String) | Converts a radix value to an integer value. | |
Encode(Int16) | Converts integer value to a radix value. | |
Encode(Int24) | Converts integer value to a radix value. | |
Encode(Int32) | Converts integer value to a radix value. | |
Encode(Int64) | Converts integer value to a radix value. | |
Encode(UInt16) | Converts integer value to a radix value. | |
Encode(UInt24) | Converts integer value to a radix value. | |
Encode(UInt32) | Converts integer value to a radix value. | |
Encode(UInt64) | Converts integer value to a radix value. | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) | |
GetHashCode | Serves as the default hash function. (Inherited from Object) | |
GetType | Gets the Type of the current instance. (Inherited from Object) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
ToString | Returns a string that represents the current object. (Inherited from Object) | |
TryDecode(String, Int24) | Attempts to convert a radix value to an integer value. | |
TryDecode(String, UInt24) | Attempts to convert a radix value to an integer value. | |
TryDecode(String, Int16) | Attempts to convert a radix value to an integer value. | |
TryDecode(String, Int32) | Attempts to convert a radix value to an integer value. | |
TryDecode(String, Int64) | Attempts to convert a radix value to an integer value. | |
TryDecode(String, UInt16) | Attempts to convert a radix value to an integer value. | |
TryDecode(String, UInt32) | Attempts to convert a radix value to an integer value. | |
TryDecode(String, UInt64) | Attempts to convert a radix value to an integer value. |
Name | Description | |
---|---|---|
GetEnumValueOrDefault |
Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions) | |
GetEnumValueOrDefaultT |
Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions) |
The primary use case of this class is to provide compact string-based encodings of integer values, e.g., storing an unsigned 32-bit integer value in a string-based database field that only holds 6 characters; the maximum UInt32 value of 4294967295 requires 10 characters of storage as a string.
The codec algorithm for RadixCodec works much like base-64 encoding but with variable base sizes and an integer source data focus, not a byte-array. The encoded base value strings are not intended to provide binary compression, many of the radix value encodings of integers produced by this class will have a byte-size that is greater than native bytes that make up integer. Since the encodings produced by this class do not manage arbitrary sized bytes arrays nor do they include padding, the encodings are not intended to comply with RFC 3548.