module Codec.Binary.Base91.Text (decode, encode) where
import Codec.Binary.Base91.Control (Applicative' (..), Foldable' (..))
import Data.Text (Text)
import Data.Word (Word8)
import qualified Codec.Binary.Base91 as Base91
import qualified Data.Text as T
encode :: [Word8] -> Text
encode = Base91.encode
decode :: Text -> [Word8]
decode = Base91.decode
instance Applicative' Text where
type Item (Text) = Char
pure' = T.singleton
instance Foldable' Text where
type Element (Text) = Char
fold' = T.foldl'