-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Compression and decompression in the exomizer format -- -- This package provides a pure interface for compressing and -- decompressing data represented as strict ByteStrings. -- -- Only the raw, mem and level compressions -- are supported. -- -- This library uses the exomizer 2.0.10. -- -- exomizer is created by Magnus Lind (magli143@gmail.com) -- https://bitbucket.org/magli143/exomizer/wiki/Home @package exomizer @version 1.0.0 -- | Cruncher interface exomizer mem style. module Exomizer.Mem -- | Parameters for compression data CrunchOptions coEncoding :: CrunchOptions -> Maybe String coMaxPasses :: CrunchOptions -> Int coMaxLen :: CrunchOptions -> Int coMaxOffset :: CrunchOptions -> Int coUseLiteralSequences :: CrunchOptions -> Bool coFavourSpeed :: CrunchOptions -> Bool -- | Default compression parameters defaultCrunchOptions :: CrunchOptions -- | Check if the options are valid validCrunchOptions :: CrunchOptions -> Bool -- | Information about the compressed data (result of the compression) data CrunchInfo ciLiteralSequencesUsed :: CrunchInfo -> Bool ciNeededSafetyOffset :: CrunchInfo -> Int ciUsedEncoding :: CrunchInfo -> String -- | Direction data Direction -- | Starting at the lowest and ending the byte after the highest Forward :: Direction -- | Starting one byte after the highest and ending on the lowest Backwards :: Direction -- | Direction of reading (the compressed data) and writing (the -- uncompressed data) -- --
--   readDirection `ReadWrite` writeDirection
--   
data ReadWrite ReadWrite :: Direction -> Direction -> ReadWrite -- | Forward: both read and write forward :: ReadWrite -- | Backwards: both read and write backwards :: ReadWrite -- | Crunch data exomizer mem style. This function does not have -- automatic joining of multiple chunks, see joinChunks. memCrunch :: ReadWrite -> CrunchOptions -> (Int16, ByteString) -> (ByteString, CrunchInfo) -- | Identical to memCrunch but does not return the -- CrunchInfo. memCrunch_ :: ReadWrite -> CrunchOptions -> (Int16, ByteString) -> ByteString -- | Join the supplied chunks into one. The spaces in between are filled -- with the supplied byte. -- -- There is no check for overlap or if the result exceeds the memory -- space. joinChunks :: Word8 -> [(Int16, ByteString)] -> (Int16, ByteString) -- | Cruncher interface exomizer raw style. module Exomizer.Raw -- | Parameters for compression data CrunchOptions coEncoding :: CrunchOptions -> Maybe String coMaxPasses :: CrunchOptions -> Int coMaxLen :: CrunchOptions -> Int coMaxOffset :: CrunchOptions -> Int coUseLiteralSequences :: CrunchOptions -> Bool coFavourSpeed :: CrunchOptions -> Bool -- | Default compression parameters defaultCrunchOptions :: CrunchOptions -- | Check if the options are valid validCrunchOptions :: CrunchOptions -> Bool -- | Information about the compressed data (result of the compression) data CrunchInfo ciLiteralSequencesUsed :: CrunchInfo -> Bool ciNeededSafetyOffset :: CrunchInfo -> Int ciUsedEncoding :: CrunchInfo -> String -- | Direction data Direction -- | Starting at the lowest and ending the byte after the highest Forward :: Direction -- | Starting one byte after the highest and ending on the lowest Backwards :: Direction -- | Direction of reading (the compressed data) and writing (the -- uncompressed data) -- --
--   readDirection `ReadWrite` writeDirection
--   
data ReadWrite ReadWrite :: Direction -> Direction -> ReadWrite -- | Forward: both read and write forward :: ReadWrite -- | Backwards: both read and write backwards :: ReadWrite -- | Crunch data exomizer raw style. rawCrunch :: ReadWrite -> CrunchOptions -> ByteString -> (ByteString, CrunchInfo) -- | Identical to rawCrunch but does not return the -- CrunchInfo. rawCrunch_ :: ReadWrite -> CrunchOptions -> ByteString -> ByteString -- | Decrunch some data. -- -- WARNING: The linked exomizer library (and with that the program) may -- segfault when the input data is not valid! rawDecrunch :: ReadWrite -> ByteString -> ByteString -- | The functions of this module are identical to use the command line -- tool. -- -- The modules Exomizer.Raw and Exomizer.Mem give more -- options. -- -- Each function is listed with and without an underscore at the end. The -- variant with the underscore does not return the compression info but -- the compression result is identical. module Exomizer -- | Parameters for compression data CrunchOptions coEncoding :: CrunchOptions -> Maybe String coMaxPasses :: CrunchOptions -> Int coMaxLen :: CrunchOptions -> Int coMaxOffset :: CrunchOptions -> Int coUseLiteralSequences :: CrunchOptions -> Bool coFavourSpeed :: CrunchOptions -> Bool -- | Default compression parameters defaultCrunchOptions :: CrunchOptions -- | Information about the compressed data (result of the compression) data CrunchInfo ciLiteralSequencesUsed :: CrunchInfo -> Bool ciNeededSafetyOffset :: CrunchInfo -> Int ciUsedEncoding :: CrunchInfo -> String -- | Same as exomizer raw exomizerRaw :: CrunchOptions -> ByteString -> (ByteString, CrunchInfo) -- | Same as exomizer raw exomizerRaw_ :: CrunchOptions -> ByteString -> ByteString -- | Same as exomizer raw -b exomizerRawBackwards :: CrunchOptions -> ByteString -> (ByteString, CrunchInfo) -- | Same as exomizer raw -b exomizerRawBackwards_ :: CrunchOptions -> ByteString -> ByteString -- | Same as exomizer raw -r exomizerRawReverse :: CrunchOptions -> ByteString -> (ByteString, CrunchInfo) -- | Same as exomizer raw -r exomizerRawReverse_ :: CrunchOptions -> ByteString -> ByteString -- | Same as exomizer raw -b -r exomizerRawBackwardsReverse :: CrunchOptions -> ByteString -> (ByteString, CrunchInfo) -- | Same as exomizer raw -b -r exomizerRawBackwardsReverse_ :: CrunchOptions -> ByteString -> ByteString -- | Same as exomizer mem -l none exomizerMem :: CrunchOptions -> [(Int16, ByteString)] -> (ByteString, CrunchInfo) -- | Same as exomizer mem -l none exomizerMem_ :: CrunchOptions -> [(Int16, ByteString)] -> ByteString -- | Same as exomizer mem -l none -f exomizerMemForward :: CrunchOptions -> [(Int16, ByteString)] -> (ByteString, CrunchInfo) -- | Same as exomizer mem -l none -f exomizerMemForward_ :: CrunchOptions -> [(Int16, ByteString)] -> ByteString -- | Same as exomizer level exomizerLevel_ :: CrunchOptions -> [(Int16, ByteString)] -> ByteString -- | Same as exomizer level -f exomizerLevelForward_ :: CrunchOptions -> [(Int16, ByteString)] -> ByteString