Description Usage Arguments Details Value Note Author(s) Examples
iencode64
encodes up to 64-bit intgers numbers into a concise
ASCII string representation. It uses the same characters as base64
encoding, but in strictly lexicographically ascending order and
encodes only as many characters as are necessary to include the most
significant bit set to 1.
1 2 |
x |
|
min.length |
integer, minimal length of the encoded strings. |
Although the encoding is closely related to base64 encoding, it is not the same, because it encodes only as many 6-bit groups as are needed and the order of the characters is different. However, due to the design that characters in the encoding table are in lexicographically ascending order, the lexicographical order of the strings (as long as they are all left-padded to the same length) is equal to the order of the encoded values.
Numeric values are truncated to 64-bit unsigned integers before encoding.
Decoding of a value stops if a character outside of the b64 alphabet (alphanumeric, plus and slash) is encountered. If the value overflows (more than 64 bits are encoded) the behavior is undefined (currently the code discards MSB that are beyond 64-bit).
iencode64
: character vector of encoded values
idecode64
: numeric vector of decoded values (integers)
Missing values (NA
) are preserved.
Simon Urbanek
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.