Skip to content

Releases: mirage/decompress

v1.1.0

12 Mar 13:29
Compare
Choose a tag to compare

CHANGES:

  • add GZip support (@dinosaure, @copy, @hcarty, #79)
  • breaking changes, Higher returns a result value instead to raise an exception (@dinosaure, @copy, #80)
  • protect Zlib decoder on multiple no-op calls of decode
  • test when we generate an empty zlib flow
  • fix a bug on the DEFLATE layer when we must flush bits to avoid integer overflow
  • really use the internal continuation of the Zlib state
  • delete fmt depedency
  • update fuzzer
  • fix default level on Zl.Higher

v0.9.1

08 Oct 15:00
Compare
Choose a tag to compare

CHANGES:

  • Compatibility layer with bigarray-compat

v1.0.0

26 Sep 11:43
Compare
Choose a tag to compare

CHANGES:

** breaking changes **

decompress.1.0.0 is 3 times faster about decompression than before. A huge
amount of work was done to improve performance and coverage.

The main reason to update the API is to fix a bad design decision regarding split
compression and encoding. User is able to implement a new compression algorithm
and use it.

Release comes with regressions:

  • decompress only supports Bigarray now, not Bytes
  • GZIP layer does not exist anymore
  • state of RFC1951 encoder/decoder is not referentially transparent anymore

Of course, v1.0.0 comes with fixes and improvements:

  • decompress is able to compress/uncompress Calgary corpus
  • tests are improved and they include all coverage tests from zlib
  • compression algorithm has a fuzzer
  • encoder has a fuzzer
  • performance about decoder is 3 times better than decompress.v0.9.0 and 3
    times slower than zlib

decompress is split into 2 main modules:

  • dd which implements RFC1951
  • zz which implements ZLIB

API of them are pretty-close to what decompress.v0.9.0 does with some
advantages on dd:

  • User can use their own compression algorithm instead of Dd.L
  • encoder exposes more granular control over what it emits (which block, when, where)
  • Huffman tree generation is out of dd

As a response to #25, dd provides a higher level API resembling camlzip.

v0.9.0

10 Jul 12:46
4b4a40f
Compare
Choose a tag to compare

CHANGES:

v0.8.1

17 Oct 09:19
Compare
Choose a tag to compare

CHANGES:

v0.8

09 Jul 10:25
Compare
Choose a tag to compare

CHANGES:

  • Implementation of RFC1951 (task from @cfcs)

  • breaking change New interface of decompress

    We wrap API in Zlib_{inflate/deflate} and add RFC1951_{inflate/deflate}.

  • Move to jbuilder/dune (task from @samoht)

  • Better check on zlib header

  • Fixed infinite loop (task fron @cfcs)

    See 2e3af68, decompress has an infinite loop when the inflated dictionary
    does not provide any bindings (and length of opcode is <= 0). In this case,
    decompress expects an empty input and provide an empty output in any case.

  • Use re.1.7.2 on tests

  • Use camlzip.1.07 on tests

v0.7

18 Oct 21:26
Compare
Choose a tag to compare

v0.7 2017-10-18 Paris (France)

  • Fixed Inflate.write function
  • Fixed internal state to stick in a internal final state
  • Fixed compilation with js_of_ocaml (use trampoline function to avoid
    stack-overflow)
  • Fixed clash of name about state variable in the Inflate module
  • Add afl program
  • Export Adler-32 modules
  • Add -i and -o option in the dpipe binary to inform the size of the
    internal chunk
  • Change the value of -mode in the dpipe binary

Version 0.6

11 May 14:04
Compare
Choose a tag to compare

v0.6 2017-05-11 Cao Lãnh (Vietnam)

  • Fixed bug #29
  • Produce far pattern (Lz77 compression)
  • Optimize memory consumption of the Inflate module
  • Move repository from oklm-wsh to mirage
  • Learn topkg release

Best ever version of Decompress (best!)

10 Mar 14:08
Compare
Choose a tag to compare

This version is a stable version of Decompress before the version 1.0 (because we need to test this library in the real world before the 1.0 release). We reworked on the API (it's an API like @dbuenzli's interface) and did a lot of work about the optimization.

  • API changed a lot so we break the compatibilities with the previous versions.
  • Optimization in the Inflate and Deflate algorithm
  • We defunctorize totally Decompress and use a GADT to constraint the blit function to be used only between two Bigstring.t xor two Bytes.t.
  • We use an immutable state now to compute the Adler-32 checksum
  • We change the mutable state to an immutable state for the compression (Lz77 compression included) and the decompression
  • The compression allocates only what it needs (integer and array) but about the input and output, the user can allocate what he wants (like a big or small input and output buffer), he need to allocate a window but he can reuse the window to decompress an other data flow (you can look an example in test/test.ml)
  • The decompression allocates only what it needs and you can control that by partial_flush, sync_flush and full_flush - for example, you can limit the allocation to n hunks. You can see a full example in test/test.ml
  • We implement the compression algorithm and the decompression algorithm in 2 ways, a functional (CPS-style) and an imperative way. The first way is used without any constraints but it is slow, the second way is used to compute the compression and decompression in the fast way but with some constraints (like the size available in the input buffer) - flambda can optimize this way more easily (I hope)
  • The inflate algorithm generate an array with a mask to get the code with an O(1) complexity.
  • We remove the ring-buffer in the compression - that means it's needed to keep an iterator inside the ring-buffer (and use mod to restart at the beginning of the ring-buffer when we go to the end and sanitize any iterator to get the true position inside the ring-buffer) but we don't keep any pattern outside the input buffer. In others words, if you use a little input buffer, the compression will be bad, if you use an input buffer (with the length = 1 lsl 15), the compression will be optimal.
  • We removed all C code - you can use Decompress to all back-end (JS or Mirage) - it's specifically about the blit function, in fact, zlib expects a memcpy but the standard implementation of the blit function use memmove (you can look ocaml-memcpy btw), so we have an implementation of memcpy in OCam (but previously we had this implementation in C).
  • We moved to topkg build system, oasis sucks.
  • We removed the C shared-library
  • We add a Dockerfile
  • I WANT A BEER

BEER

Powered by Stork © Beer. Thanks to @yallop and @samoht for the optimization and @avsm for the Docker file and @hannesm for the beer.

First stable release

07 Apr 20:30
Compare
Choose a tag to compare
  • Fix lot of bugs in Inflate and Deflate
  • Optimize Lz77 compression
  • Separate the logic of Ring Buffer in Window (we use both in Lz77 compression)
  • Add level argument in Deflate (like zlib)
  • Add new program more useful (compared to dpipe): dcpr
  • Use cmdliner for dcpr
  • Add debug information with ppx (see --enable-trace)
  • Add reverse stub to use Decompress in C (for benchmarking) - require ctypes
  • Add rev program to use the dynamic library of Decompress produced by inverted stub
  • Improve interface with ExtBytes and ExtString
  • Add -safe-string option in compilation
  • Add conveniences functions for ocaml-git (like used_in)
  • Add more test (we test input/output size, level and compare with camlzip)