Skip to content

Releases

v0.3.1

Choose a tag to compare

@github-actions github-actions released this 14 Nov 00:28
Immutable release. Only release title and notes can be modified.
567bfe6

What's Changed

⚡ Performance

  • perf(zstd): a small dictionary given with the frame is copied again (#47)

🔧 Build, CI and tooling

  • ci: a performance change moves the patch version (#48)

Full Changelog: v0.3.0...v0.3.1

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 13 Nov 18:05
Immutable release. Only release title and notes can be modified.
23ba007

What's Changed

🚀 Features

  • feat(zstd): ZstdDictionary, a dictionary prepared once and shared (#40)
  • feat(zstd): streams past 3500 MiB, their indices corrected as libzstd's (#31)
  • feat(zstd): dictionaries in streamed frames (#27)
  • feat(zstd): ZstdStream compresses, as ZstandardStream does (#26)
  • feat(zstd): ZstdEncoder, the streamed frames of ZSTD_compressStream2 (#25)
  • feat(zstd): ZstdCompressionOptions, libzstd's parameters beyond the level (#23)
  • feat(zstd): ZstdStream, Zstandard read from another stream (#21)
  • feat(zstd): ZstdDecoder, streaming decompression (#20)
  • feat: big-endian refused, and the processors the libraries run on (#18)
  • feat(zstd): ZstdError and LastError public (#16)
  • feat(zstd): experimental options (EntropyAwareMatches), x64 compression closer to native, buffers sized to the blocks (#10)

⚡ Performance

  • perf(zstd): branchless extDict searches, wider row compares (#43)
  • perf(zstd): block splitters estimate less, compare histograms in AVX2 (#42)
  • perf(zstd): ZstdDecompressor refuses a cut frame or a small destination without an exception (#41)
  • perf(zstd): dictionary tables copied in vectors, a frame's dictionary read in place (#39)
  • perf(zstd): CompressAsync writes its jobs into the destination, sums the checksum beside them (#38)
  • perf(zstd): ZstdStream reuses pooled encoders and decoders (#37)
  • perf(zstd): fewer and smaller allocations in the codecs (#36)
  • perf(zstd): ZstdStream skips empty writes and copies out of the decoder's window (#35)
  • perf(zstd): the decoder's tables built faster, for small frames (#11)

📚 Documentation

  • docs(bench): x64 results on .NET 11.0.0 (#46)

📦 Dependencies

8 changes
  • chore(deps): update dependency ubuntu to v26 (#34)
  • chore(deps): update pre-commit hook betterleaks/betterleaks to v1.10.0 (#33)
  • chore(deps): update dependency nativecompressions.zstandard to 1.3.0 (#32)
  • chore(deps): update dependency nativecompressions.lz4 to 1.2.0 (#29)
  • chore(deps): update actions/setup-dotnet action to v6.1.0 (#28)
  • chore(deps): update dependency ubuntu to v26 (#9)
  • chore(deps): update dependency system.io.hashing to 10.0.14 (#6)
  • chore(deps): update zizmor to v1.32.0 (#8)

🔧 Build, CI and tooling

  • build: the .NET 11 GA SDK (#44)
  • ci: arm64, instruction sets turned off, and Native AOT (#17)
  • build: .NET 10 beside .NET 11 (#15)

🧹 Maintenance

  • test(fuzz): zstd-stream-compress, the encoder against ZSTD_compressStream2 (#30)
  • test(zstd): the streaming decoder fuzzed, on guard pages and zstd's corpora (#24)
  • test: coverage-guided fuzzing with libFuzzer (#19)
  • test: an oracle that runs on .NET 10 as on .NET 11 (#14)
  • chore(renovate): NativeCompressions.LZ4 held at lz4 1.10.0 (#13)

Full Changelog: v0.2.0...v0.3.0

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 11 Oct 21:10
Immutable release. Only release title and notes can be modified.
5bdece5

What's Changed

🚀 Features

  • feat(zstd): DecompressPrefix public, for callers that read only the start of a frame (#5)

Full Changelog: v0.1.0...v0.2.0

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 11 Oct 20:34
Immutable release. Only release title and notes can be modified.
5926fca

Zstandard and LZ4 for .NET, in 100 % managed C#. No native binary, no P/Invoke, Native AOT ready, and the same bytes as the reference libraries.

dotnet add package ManagedCompressions.Zstd
dotnet add package ManagedCompressions.Lz4

✨ Highlights

  • ⚡ Faster than native at decompression: Zstandard decodes up to 1.5× as fast as libzstd.
  • 🎯 Byte-identical output: every frame and block is the one libzstd 1.5.7 or lz4 1.10.0 writes, at every level, so the ratios are theirs.
  • 🚀 Native AOT and trimming: no reflection, no dynamic code, no analyzer warning, and the same speed as under the JIT.
  • ♻️ Zero allocation per call once warm.

📊 Speed against native

silesia.tar, one thread, JIT and Native AOT. Above 1.00× is faster than native.

Apple M4 Pro (arm64) Ryzen 9 7950X (x64)
Zstd decompression 1.30 – 1.49× 1.01 – 1.11×
Zstd compression 0.94 – 1.03× 0.92 – 1.09×
LZ4 decompression 1.03 – 1.04× 0.99 – 1.08×
LZ4 compression 0.85 – 0.96× 0.88 – 0.95×

📦 Packages

ManagedCompressions.Zstd Zstandard (RFC 8878): levels -131072 to 22, dictionaries, checksums, multithreaded CompressAsync
ManagedCompressions.Lz4 LZ4 block format (Parquet's LZ4_RAW), every level up to HC 12

Note

Requires .NET 11. No streaming API: one call per frame or block, in memory, up to 2 GiB.

Full benchmarks and methodology in the README.