Safe Haskell | Safe-Inferred |
---|
Implementation based on the specification found at http://yence.sourceforge.net/docs/protocol/version1_3_draft.html.
Further documentation and information can be found at http://www.haskell.org/haskellwiki/Library/Data_encoding.
- data EncIncData
- data EncIncRes i
- = EPart i (EncIncData -> EncIncRes i)
- | EFinal i
- encodeInc :: EncIncData -> EncIncRes [Word8]
- encode :: [Word8] -> [Word8]
- data DecIncData i
- data DecIncRes i
- decodeInc :: DecIncData [Word8] -> DecIncRes [Word8]
- decode :: [Word8] -> Maybe [Word8]
- chop :: Int -> [Word8] -> [[Word8]]
- unchop :: [[Word8]] -> [Word8]
Documentation
data EncIncData Source
Data type for the incremental encoding functions.
Data type for the result of calling the incremental encoding functions.
EPart i (EncIncData -> EncIncRes i) | a partial result together with the continuation to use for further encoding |
EFinal i | the final result of encoding (the response to |
encodeInc :: EncIncData -> EncIncRes [Word8]Source
Incremental encoder function.
data DecIncData i Source
Data type for the incremental decoding functions.
Data type for the result of calling the incremental encoding functions.
DPart [Word8] (DecIncData i -> DecIncRes i) | a partial result together with the continuation to user for further decoding |
DFinal [Word8] i | the final result of decoding (the response to |
DFail [Word8] i | a partial result for a failed decoding, together with the remainder of the data passed in so far |