Skip to content

v0.3.2

Choose a tag to compare

@RezaKargar RezaKargar released this 17 Jun 10:12
· 1 commit to main since this release

fastlz level 2 support

PHP's fastlz_compress switches from level 1 to level 2 for inputs ≥ 64 KB, and fastlz_decompress selects the decoder from the stream's first byte. The underlying dgryski/go-fastlz decoder implements level 1 only, so large memcached payloads (e.g. > 64 KB) failed with fastlz: corrupt input.

This release adds a pure-Go port of the reference fastlz2_decompress and dispatches to it based on the level encoded in the stream; level 1 continues to use go-fastlz.

  • No new dependencies (stdlib only)
  • Verified against the reference C implementation; the level-2 golden vector in testdata round-trips
  • Test suite stays cgo-free