lzlib 1.0.4.0 → 1.0.5.0
raw patch · 5 files changed
+24/−21 lines, 5 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Codec.Lzip: LzDataError :: LZErrno
+ Codec.Lzip: LzHeaderError :: LZErrno
+ Codec.Lzip: LzLibraryError :: LZErrno
+ Codec.Lzip: LzMemError :: LZErrno
+ Codec.Lzip: LzUnexpectedEof :: LZErrno
+ Codec.Lzip: data LZErrno
Files
- CHANGELOG.md +4/−0
- lzlib.cabal +1/−2
- src/Codec/Lzip.hs +12/−0
- src/Codec/Lzip/Pure.hs +0/−13
- src/Codec/Lzip/Raw.chs +7/−6
CHANGELOG.md view
@@ -1,5 +1,9 @@ # lzlib +## 1.0.5.0++ * Export `LZError`+ ## 1.0.4.0 * Add `Enum` instance to `CompressionLevel`
lzlib.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.18 name: lzlib-version: 1.0.4.0+version: 1.0.5.0 license: BSD3 license-file: LICENSE copyright: Copyright: (c) 2019-2020 Vanessa McHale@@ -46,7 +46,6 @@ c-sources: cbits/lzlib.c hs-source-dirs: src other-modules: Codec.Lzip.Raw- other-modules: Codec.Lzip.Pure default-language: Haskell2010 other-extensions: DeriveDataTypeable TupleSections include-dirs: cbits
src/Codec/Lzip.hs view
@@ -1,5 +1,8 @@ {-# LANGUAGE TupleSections #-} +-- | Functions throw 'LZErrno' on failure+--+-- Compression functions should work on arbitrary data module Codec.Lzip ( -- * Compression compress , compressBest@@ -14,6 +17,13 @@ , compressFileBest , compressFileFast , CompressionLevel (..)+ , LZErrno+ ( LzMemError+ , LzHeaderError+ , LzUnexpectedEof+ , LzDataError+ , LzLibraryError+ ) -- * Decompression , decompress -- * Miscellany@@ -75,6 +85,8 @@ -- [lziprecover](https://www.nongnu.org/lzip/lziprecover.html). -- -- Doesn't work on empty 'BSL.ByteString's+--+-- Throws 'LZErrno' on error decompress :: BSL.ByteString -> BSL.ByteString decompress bs = runST $ do
− src/Codec/Lzip/Pure.hs
@@ -1,13 +0,0 @@-module Codec.Lzip.Pure ( Member (..)- ) where--import qualified Data.ByteString.Lazy as BSL-import Data.Word (Word32, Word64, Word8)---- see: https://www.nongnu.org/lzip/manual/lzip_manual.html#File-format-data Member =- Member !Word8 !Word8 BSL.ByteString Word32 !Word64 Word64--- for some reason this is little endian------ pure bz2? huffman coding!--- https://www.sourceware.org/bzip2/manual/manual.html#limits
src/Codec/Lzip/Raw.chs view
@@ -5,11 +5,15 @@ -- -- This library uses 'Foreign.ForeignPtr.ForeignPtr's; to convert a @'Ptr' 'LZDecoder'@ to a @'Foreign.ForeignPtr.ForeignPtr' 'LZDecoder'@, use 'Foreign.ForeignPtr.newForeignPtr' module Codec.Lzip.Raw ( -- * Prolegomena- LZErrno (..)+ LZErrno+ ( LzMemError+ , LzHeaderError+ , LzUnexpectedEof+ , LzDataError+ , LzLibraryError+ ) , lZVersion- , lZStrerror , lZMinDictionarySize- , lZMaxDictionarySize , UInt8 -- * Compression functions , LZEncoder@@ -20,7 +24,6 @@ , lZCompressRead , lZCompressWrite , lZCompressWriteSize- , lZCompressErrno , lZCompressFinished -- * Decompression functions , LZDecoder@@ -58,7 +61,6 @@ {# fun pure LZ_version as ^ {} -> `String' #} {# fun pure LZ_strerror as ^ { `LZErrno' } -> `String' #} {# fun pure LZ_min_dictionary_size as ^ {} -> `CInt' #}-{# fun pure LZ_max_dictionary_size as ^ {} -> `CInt' #} instance Show LZErrno where show = lZStrerror@@ -75,7 +77,6 @@ {# fun LZ_compress_read as ^ { `LZEncoderPtr', `Ptr UInt8', `CInt' } -> `CInt' #} {# fun LZ_compress_write as ^ { `LZEncoderPtr', `Ptr UInt8', `CInt' } -> `CInt' #} {# fun LZ_compress_write_size as ^ { `LZEncoderPtr' } -> `CInt' #}-{# fun LZ_compress_errno as ^ { `LZEncoderPtr' } -> `LZErrno' #} {# fun LZ_compress_finished as ^ { `LZEncoderPtr' } -> `CInt' #} -- | Abstract data type