lzma-conduit 1.2.0 → 1.2.1
raw patch · 2 files changed
+14/−15 lines, 2 filesdep ~basedep ~conduitdep ~resourcetPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: base, conduit, resourcet
API changes (from Hackage documentation)
- Data.Conduit.Lzma: compress :: (MonadIO m) => Maybe Int -> Conduit ByteString m ByteString
+ Data.Conduit.Lzma: compress :: (MonadIO m) => Maybe Int -> ConduitM ByteString ByteString m ()
- Data.Conduit.Lzma: decompress :: (MonadThrow m, MonadIO m) => Maybe Word64 -> Conduit ByteString m ByteString
+ Data.Conduit.Lzma: decompress :: (MonadThrow m, MonadIO m) => Maybe Word64 -> ConduitM ByteString ByteString m ()
Files
- lzma-conduit.cabal +8/−9
- src/Data/Conduit/Lzma.hs +6/−6
lzma-conduit.cabal view
@@ -1,9 +1,10 @@+cabal-version: 1.12 name: lzma-conduit-version: 1.2.0+version: 1.2.1 synopsis: Conduit interface for lzma/xz compression. description:- High level bindings to xz-utils.- .+ This package provides an Conduit interface for the LZMA compression algorithm used in the .xz file format.+ license: BSD3 license-file: LICENSE author: Nathan Howell <nhowell@alphaheavy.com>@@ -13,13 +14,12 @@ category: Codec, Compression, Conduit build-type: Simple-cabal-version: >= 1.10+tested-with: GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2 extra-source-files: tests/Main.hs library- ghc-prof-options: -fprof-auto default-language: Haskell2010 hs-source-dirs:@@ -27,11 +27,11 @@ exposed-modules: Data.Conduit.Lzma build-depends:- base >= 3 && < 5,+ base >= 4.5 && < 5, bytestring >= 0.9.1 && < 0.11,- conduit >= 1.0 && < 1.3,+ conduit >= 1.1.0 && < 1.4, lzma >= 0.0.0.3 && < 0.1,- resourcet >= 0.4 && < 1.2,+ resourcet >= 1.1.0 && < 1.3, transformers >= 0.2 && < 0.6 ghc-options: -Wall@@ -63,4 +63,3 @@ source-repository head type: git location: https://github.com/alphaHeavy/lzma-conduit.git-
src/Data/Conduit/Lzma.hs view
@@ -32,7 +32,7 @@ decompress :: (MonadThrow m, MonadIO m) => Maybe Word64 -- ^ Memory limit, in bytes.- -> Conduit ByteString m ByteString+ -> ConduitM ByteString ByteString m () decompress memlimit = decompressWith Lzma.defaultDecompressParams { Lzma.decompressMemLimit = fromMaybe maxBound memlimit@@ -43,11 +43,11 @@ decompressWith :: (MonadThrow m, MonadIO m) => Lzma.DecompressParams- -> Conduit ByteString m ByteString+ -> ConduitM ByteString ByteString m () decompressWith parms = do c <- peek case c of- Nothing -> monadThrow $ userError $ "Data.Conduit.Lzma.decompress: invalid empty input"+ Nothing -> throwM $ userError $ "Data.Conduit.Lzma.decompress: invalid empty input" Just _ -> liftIO (Lzma.decompressIO parms) >>= go where go s@(Lzma.DecompressInputRequired more) = do@@ -65,14 +65,14 @@ then App.pure () else leftover rest go (Lzma.DecompressStreamError err) =- monadThrow $ userError $ "Data.Conduit.Lzma.decompress: error: "++prettyRet err+ throwM $ userError $ "Data.Conduit.Lzma.decompress: error: "++prettyRet err -- | Compress a 'ByteString' into a xz container stream. compress :: (MonadIO m) => Maybe Int -- ^ Compression level from [0..9], defaults to 6.- -> Conduit ByteString m ByteString+ -> ConduitM ByteString ByteString m () compress level = -- mval <- await -- undefined $ fromMaybe B.empty mval@@ -85,7 +85,7 @@ compressWith :: MonadIO m => Lzma.CompressParams- -> Conduit ByteString m ByteString+ -> ConduitM ByteString ByteString m () compressWith parms = do s <- liftIO (Lzma.compressIO parms) go s