text-compression-0.1.0.10: A text compression library.
Copyright(c) Matthew Mosior 2022
LicenseBSD-style
Maintainermattm.github@gmail.com
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.MTF

Description

Move-to-front transform (MTF)

Synopsis

To MTF functions

bytestringToBWTToMTFB :: ByteString -> MTFB Source #

Helper function for converting a ByteString to a MTFB via a BWT first.

bytestringToBWTToMTFT :: ByteString -> MTFT Source #

Helper function for converting a ByteString to a MTFT via a BWT first.

textToBWTToMTFB :: Text -> MTFB Source #

Helper function for converting a Text to a MTFB via a BWT first.

textToBWTToMTFT :: Text -> MTFT Source #

Helper function for converting a Text to a MTFT via a BWT first.

textBWTToMTFB :: TextBWT -> MTFB Source #

Take a BWT of Word8s and generate the Move-to-front transform (MTFB).

bytestringBWTToMTFB :: BWT Word8 -> MTFB Source #

Take a BWT of Word8s and generate the Move-to-front transform (MTFB).

textBWTToMTFT :: TextBWT -> MTFT Source #

Take a BWT of Word8s and generate the Move-to-front transform (MTFB).

bytestringBWTToMTFT :: BWT Word8 -> MTFT Source #

Take a BWT of Word8s and generate the Move-to-front transform (MTFT).

textToMTFB :: Seq (Maybe Text) -> MTFB Source #

Takes a Text and returns the Move-to-front transform (MTFB).

bytestringToMTFB :: Seq (Maybe ByteString) -> MTFB Source #

Takes a Seq of ByteStrings and returns the Move-to-front transform (MTFB).

textToMTFT :: Seq (Maybe Text) -> MTFT Source #

Takes a Text and returns the Move-to-front transform (MTFT).

bytestringToMTFT :: Seq (Maybe ByteString) -> MTFT Source #

Takes a ByteString and returns the Move-to-front transform (MTFT).

From MTF functions

bytestringFromBWTFromMTFB :: MTFB -> ByteString Source #

Helper function for converting a BWTed MTFB back to the original ByteString.

bytestringFromBWTFromMTFT :: MTFT -> ByteString Source #

Helper function for converting a BWTed MTFT back to the original ByteString.

textFromBWTFromMTFB :: MTFB -> Text Source #

Helper function for converting a BWTed MTFB back to the original Text.

textFromBWTFromMTFT :: MTFT -> Text Source #

Helper function for converting a BWTed MTFT back to the original Text.

textBWTFromMTFT :: MTFT -> BWT Text Source #

Takes a MTFT and returns the BWT of Texts.

bytestringBWTFromMTFT :: MTFT -> BWT ByteString Source #

Takes a MTFT and returns the BWT of ByteStrings.

textBWTFromMTFB :: MTFB -> BWT Text Source #

Takes a MTFB and returns the BWT of Texts.

textFromMTFB :: MTFB -> Seq (Maybe Text) Source #

Takes a MTFB and returns the original Seq of Texts.

bytestringFromMTFB :: MTFB -> Seq (Maybe ByteString) Source #

Takes a MTFB and returns the original Seq of ByteStrings.

textFromMTFT :: MTFT -> Seq (Maybe Text) Source #

Takes a MTFT and returns the original Seq of Texts.

bytestringFromMTFT :: MTFT -> Seq (Maybe ByteString) Source #

Takes a MTFT and returns the original Seq of ByteStrings.