Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Functions throw LZErrno
on failure
Compression functions should work on arbitrary data
Synopsis
- compress :: ByteString -> ByteString
- compressBest :: ByteString -> ByteString
- compressFast :: ByteString -> ByteString
- compressSz :: ByteString -> Int -> ByteString
- compressSzBest :: ByteString -> Int -> ByteString
- compressSzFast :: ByteString -> Int -> ByteString
- compressWith :: CompressionLevel -> ByteString -> ByteString
- compressWithSz :: CompressionLevel -> ByteString -> Int -> ByteString
- compressFile :: FilePath -> IO ByteString
- compressFileLevel :: CompressionLevel -> FilePath -> IO ByteString
- compressFileBest :: FilePath -> IO ByteString
- compressFileFast :: FilePath -> IO ByteString
- compressFineTune :: LzOptions -> ByteString -> Int -> ByteString
- data CompressionLevel
- data LzOptions = LzOptions {
- dictionarySize :: !Int
- matchLenLimit :: !Int
- decompress :: ByteString -> ByteString
- data LZErrno
- lZVersion :: String
- lZApiVersion :: Integral a => a
Compression
compress :: ByteString -> ByteString Source #
Alias for compressWith
Six
compressBest :: ByteString -> ByteString Source #
Alias for compressWith
maxBound
Since: 0.3.2.0
compressFast :: ByteString -> ByteString Source #
Alias for compressWith
minBound
Since: 0.3.2.0
:: ByteString | |
-> Int | Size of input data, in bytes |
-> ByteString |
Alias for compressWithSz
Six
Since: 1.0.2.0
:: ByteString | |
-> Int | Size of input data, in bytes |
-> ByteString |
Alias for compressWithSz
maxBound
Since: 1.0.2.0
:: ByteString | |
-> Int | Size of input data, in bytes |
-> ByteString |
Alias for compressWithSz
minBound
Since: 1.0.2.0
compressWith :: CompressionLevel -> ByteString -> ByteString Source #
:: CompressionLevel | |
-> ByteString | |
-> Int | Size of data being compressed, in bytes. |
-> ByteString |
Since: 1.0.0.0
compressFile :: FilePath -> IO ByteString Source #
Use this to avoid forcing the whole file into memory at once
Since: 1.0.0.0
compressFileLevel :: CompressionLevel -> FilePath -> IO ByteString Source #
Since: 1.0.3.0
compressFileBest :: FilePath -> IO ByteString Source #
Since: 1.0.3.0
compressFileFast :: FilePath -> IO ByteString Source #
Since: 1.0.3.0
:: LzOptions | |
-> ByteString | |
-> Int | Size of data being compressed, in bytes. |
-> ByteString |
data CompressionLevel Source #
Instances
Bounded CompressionLevel Source # | |
Defined in Codec.Lzip | |
Enum CompressionLevel Source # | |
Defined in Codec.Lzip succ :: CompressionLevel -> CompressionLevel # pred :: CompressionLevel -> CompressionLevel # toEnum :: Int -> CompressionLevel # fromEnum :: CompressionLevel -> Int # enumFrom :: CompressionLevel -> [CompressionLevel] # enumFromThen :: CompressionLevel -> CompressionLevel -> [CompressionLevel] # enumFromTo :: CompressionLevel -> CompressionLevel -> [CompressionLevel] # enumFromThenTo :: CompressionLevel -> CompressionLevel -> CompressionLevel -> [CompressionLevel] # |
LzOptions | |
|
Decompression
decompress :: ByteString -> ByteString Source #
This does not do any error recovery; for that you should use lziprecover.
Doesn't work on empty ByteString
s
Throws LZErrno
on error
Instances
Enum LZErrno Source # | |
Exception LZErrno Source # | |
Defined in Codec.Lzip.Raw toException :: LZErrno -> SomeException # fromException :: SomeException -> Maybe LZErrno # displayException :: LZErrno -> String # | |
Show LZErrno Source # | |
Eq LZErrno Source # | |
Miscellany
lZApiVersion :: Integral a => a Source #
Since: 0.3.1.0