-- |-- Module : Codec.Binary.DataEncoding-- Copyright : (c) 2007 Magnus Therning-- License : BSD3---- This module exposes several instances of 'DataCodec', one for each data-- encoding implemented in the library without causing the name clashing that-- would result from importing the individual encoding modules.---- Further documentation and information can be found at-- <http://www.haskell.org/haskellwiki/Library/Data_encoding>.moduleCodec.Binary.DataEncoding(DataCodec,encode,decode,decode',chop,unchop,base16,base32,base32Hex,base64,base64Url,base85,uu)whereimportData.WordimportqualifiedCodec.Binary.Base16asBase16importqualifiedCodec.Binary.Base32asBase32importqualifiedCodec.Binary.Base32HexasBase32HeximportqualifiedCodec.Binary.Base64asBase64importqualifiedCodec.Binary.Base64UrlasBase64UrlimportqualifiedCodec.Binary.Base85asBase85importqualifiedCodec.Binary.UuasUu-- {{{1 DataCodec-- | Used to group a specific data encoding's functions.dataDataCodec=DataCodec{encode::[Word8]->String,decode::String->Maybe[Word8],decode'::String->[MaybeWord8],chop::Int->String->[String],unchop::[String]->String}-- {{{1 base16-- | Base16 encoding, see "Codec.Binary.Base16" for more details on-- the individual functions.base16::DataCodecbase16=DataCodec{encode=Base16.encode,decode=Base16.decode,decode'=Base16.decode',chop=Base16.chop,unchop=Base16.unchop}-- {{{1 base32-- | Base32 encoding, see "Codec.Binary.Base32" for more details on-- the individual functions.base32::DataCodecbase32=DataCodec{encode=Base32.encode,decode=Base32.decode,decode'=Base32.decode',chop=Base32.chop,unchop=Base32.unchop}-- {{{1 base32Hex-- | Base32Hex encoding, see "Codec.Binary.Base32Hex" for more details-- on the individual functions.base32Hex::DataCodecbase32Hex=DataCodec{encode=Base32Hex.encode,decode=Base32Hex.decode,decode'=Base32Hex.decode',chop=Base32Hex.chop,unchop=Base32Hex.unchop}-- {{{1 base64-- | Base64 encoding, see "Codec.Binary.Base64" for more details on-- the individual functions.base64::DataCodecbase64=DataCodec{encode=Base64.encode,decode=Base64.decode,decode'=Base64.decode',chop=Base64.chop,unchop=Base64.unchop}-- {{{1 base64Url-- | Base64Url encoding, see "Codec.Binary.Base64Url" for more details-- on the individual functions.base64Url::DataCodecbase64Url=DataCodec{encode=Base64Url.encode,decode=Base64Url.decode,decode'=Base64Url.decode',chop=Base64Url.chop,unchop=Base64Url.unchop}-- {{{1 base85-- | Base85 encoding, see "Codec.Binary.Base85" for more details-- on the individual functions.base85::DataCodecbase85=DataCodec{encode=Base85.encode,decode=Base85.decode,decode'=Base85.decode',chop=Base85.chop,unchop=Base85.unchop}-- {{{1 uu-- | Uuencoding, see "Codec.Binary.Uu" for more details on the-- individual functions.uu::DataCodecuu=DataCodec{encode=Uu.encode,decode=Uu.decode,decode'=Uu.decode',chop=Uu.chop,unchop=Uu.unchop}