-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Base62 encoding and decoding -- -- Encode and decode using the base62 encoding scheme. @package base62 @version 0.1.1.2 -- | This module provides functions for encoding fixed-width words using -- the base-62 encoding scheme. The encoding functions in this module -- produce byte sequences that are ASCII-compatible text encodings (e.g. -- ISO-8859-1 and UTF-8). Similarly, the decoding functions only decode -- byte sequences that are an ASCII-compatible text encoding of -- characters in the class [A-Za-Z0-9]. Other encodings (notably -- UTF-16) are not supported but would be accepted in a pull request. module Data.Word.Base62 -- | Base62 encode a 64-bit word. Leading zero bits are suppressed. Note -- that this will encode the number 0 as the character '0' rather than as -- the empty byte array. encode64 :: Word64 -> ByteArray -- | Base62 encode a 64-bit word as a builder. builder64 :: Word64 -> Builder 11 -- | Decode a base62-encoded 64-bit word. This rejects the empty string -- rather than decoding it as zero. This also rejects encoded numbers -- greater than or equal to 2^64. decode64 :: Bytes -> Maybe Word64 -- | Base62 encode a 128-bit word. Leading zero bits are suppressed. encode128 :: Word128 -> ByteArray -- | Base62 encode a 128-bit word as ShortText. shortText128 :: Word128 -> ShortText -- | Base62 encode a 128-bit word as Text. text128 :: Word128 -> Text -- | Base62 encode a 128-bit word as a builder. builder128 :: Word128 -> Builder 22 -- | Decode a base62-encoded 128-bit word. This rejects the empty string -- rather than decoding it as zero. This also rejects encoded numbers -- greater than or equal to 2^128. decode128 :: Bytes -> Maybe Word128