| dataenc-0.9: Data encoding library currently providing Uuencode, Base64,
Base64Url, Base32, Base32Hex, and Base16. | Contents | Index |
|
|
|
|
|
Description |
Uuencoding module.
Uuencoding is notoriously badly specified. This implementation is
compatible with the GNU Sharutils
(http://www.gnu.org/software/sharutils/).
|
|
Synopsis |
|
|
|
Documentation |
|
encode :: [Word8] -> String |
Encode data.
|
|
decode :: String -> Maybe [Word8] |
Decode data.
|
|
chop |
:: Int | length (1 < n <= 65, not checked)
| -> String | | -> [String] | | Chop up a string in parts. Each string in the resulting list is prepended
with the length according to the uuencode "specificiation".
Notes:
- The length of the strings in the result will be (n -1) div 4 * 4.
The -1 comes from the need to prepend the length. Keeping it to a
multiple of 4 means that strings returned from encode can be chopped
without requiring any changes.
- The length of lines in GNU's sharutils is 61.
|
|
|
unchop :: [String] -> String |
Concatenate the strings into one long string. Each string is assumed to
be prepended with the length according to the uuencode specification.
|
|
Produced by Haddock version 0.8 |