    module Data.Conduit.Codec.Base16 where

    import qualified Codec.Binary.Base16 as B16
    import qualified Data.Conduit.Codec.Util as U

    import Data.Conduit
    import Data.ByteString as BS

    encode :: (Monad m) => Conduit ByteString m ByteString
    encode = U.encodeII B16.encode

    decode :: (Monad m, MonadThrow m) => Conduit ByteString m ByteString
    decode = U.decodeII B16.b16_dec empty