bz3 1.0.0.0 → 1.0.0.1
raw patch · 4 files changed
+9/−6 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- bz3.cabal +1/−1
- c/libbz3.c +3/−1
- src/Codec/Bz3/Binary.hs +1/−4
CHANGELOG.md view
@@ -1,3 +1,7 @@+# 1.0.0.1++ * Bump C sources to 1.5.3+ # 1.0.0.0 * `compressFile` now takes block size
bz3.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.4 name: bz3-version: 1.0.0.0+version: 1.0.0.1 synopsis: High-level bindings to bz3 description: Streaming compression/decompression in bz3 format via lazy bytestrings
c/libbz3.c view
@@ -874,7 +874,7 @@ /* High level API implementations. */ BZIP3_API int bz3_compress(u32 block_size, const u8 * const in, u8 * out, size_t in_size, size_t * out_size) {- if (block_size > in_size) block_size = in_size + 16;+ if (block_size > in_size) block_size = bz3_bound(in_size); block_size = block_size <= KiB(65) ? KiB(65) : block_size; struct bz3_state * state = bz3_new(block_size);@@ -991,6 +991,8 @@ } bz3_free(state);+ free(compression_buf);+ return BZ3_OK; }
src/Codec/Bz3/Binary.hs view
@@ -3,7 +3,6 @@ -- https://github.com/kspalaiologos/bzip3/blob/master/doc/bzip3_format.md module Codec.Bz3.Binary ( Chunk (..) , getFileH- , getFrameH , getChunk , putFileH , putChunk@@ -24,10 +23,8 @@ putWord32le maxSz -- max block sz-getFileH, getFrameH :: Get Word32+getFileH :: Get Word32 getFileH = do {sig <- getByteString 5; unless (sig=="BZ3v1") $ fail "bad signature"; getWord32le}--getFrameH = getFileH <* getWord32le putChunk :: Chunk -> Put putChunk (Chunk csz osz) = putWord32le csz *> putWord32le osz