calculates and returns the size needed to encode the length of the array passed.
calculates and returns the size needed to encode the length passed.
decodes an ASCII hex string and returns it as ubyte[] data.
decodes an ASCII hex string and returns it as ubyte[] data. Pre-allocates the size of the array.
encodes data and returns as an ASCII hex string.
encodes data and returns as an ASCII hex string.
char[] blah = "Hello there, my name is Jeff."; scope encodebuf = new char[allocateEncodeSize(cast(ubyte[])blah)]; char[] encoded = encode(cast(ubyte[])blah, encodebuf); scope decodebuf = new ubyte[encoded.length]; if (cast(char[])decode(encoded, decodebuf) == "Hello there, my name is Jeff.") Stdout("yay").newline;
Since v1.0
This module is used to decode and encode hex char[] arrays.