dataenc- Data encoding librarySource codeContentsIndex

Xxencoding is obsolete but still included for completeness. Further information on the encoding can be found at It should be noted that this implementation performs no padding, due to the splitting up between encoding and chopping.

Further documentation and information can be found at

encode :: [Word8] -> String
decode :: String -> Maybe [Word8]
decode' :: String -> [Maybe Word8]
chop :: Int -> String -> [String]
unchop :: [String] -> String
encode :: [Word8] -> StringSource
Encode data.
decode :: String -> Maybe [Word8]Source
Decode data (strict).
decode' :: String -> [Maybe Word8]Source
Decode data (lazy).
:: Intlength (value should be in the range [5..85])
-> String
-> [String]

Chop up a string in parts. Each string in the resulting list is prepended with the length according to the xxencode "specificiation".


  • The length of the strings in the result will be (n -1) div 4 * 4 + 1. The -1 comes from the need to prepend the length (which explains the final +1). Keeping it to a multiple of 4 means that strings returned from encode can be chopped without requiring any changes.
unchop :: [String] -> StringSource
Concatenate the strings into one long string. Each string is assumed to be prepended with the length according to the xxencode specification.
Produced by Haddock version 2.4.2