Major Changes
- Support for block compression and decompression using
ReadOnlySequence<byte>
as the source andIBufferWriter<byte>
as the destination Snappy.TryCompress
andSnappy.TryDecompress
overloads that return false instead of throwing an exception if the output buffer is too smallSnappyStream
compression now recognizes blocks that compress poorly and encodes them as uncompressed data- Temporary buffers returned to the
ArrayPool
are now cleared with zeroes before they are returned to protect any sensitive data being compressed or decompressed. This adds some overhead but benchmarks showed it wasn't very significant and it's worthwhile for better security. - General performance improvements
- Improved documentation
What's Changed
- Redesign LeftShiftOverflows test by @brantburnett in #95
- Optimize Read to use Math.Min by @brantburnett in #97
- Implement a faster encoding algoritm for varint by @brantburnett in #98
- Add .NET 9 targets for testing by @brantburnett in #100
- Remove an unnecessary branch from Log2Floor by @brantburnett in #101
- Optimize varint reading for Intel using intrinsics by @brantburnett in #102
- Refactor VarInt reading to support TryRead by @brantburnett in #103
- Use VarIntEncoding.TryRead in SnappyDecompressor by @brantburnett in #104
- Add overloads to decompress from ReadOnlySequence by @brantburnett in #105
- Compress from ReadOnlySequence to an IBufferWriter by @brantburnett in #107
- Add code coverage report to CI by @brantburnett in #108
- Improve the efficiency of decompressing to IBufferWriter by @brantburnett in #109
- Drop .NET 7 target by @brantburnett in #110
- Allow benchmarks to run on Linux/Mac by @brantburnett in #111
- Add coverage summary to build results by @brantburnett in #112
- Add some tweaks to SnappyStream by @brantburnett in #113
- Add uncompressed block support to stream compression by @brantburnett in #114
- Parallelize Windows tests in GHA by @brantburnett in #115
- Use artifacts dir and add NuGet package source mapping by @brantburnett in #116
- Validate proper implementation of bufferWriter to prevent overflows by @brantburnett in #117
- Add TryCompress and TryDecompress by @brantburnett in #118
- Update readme, add a package icon, and add package validation by @brantburnett in #119
- Add a documentation site by @brantburnett in #120
- Ensure compression buffers do not overlap by @brantburnett in #121
- Misc documentation and code coverage improvements by @brantburnett in #122
- Create SECURITY.md by @brantburnett in #123
- Clear buffers before returning them to the ArrayPool by @brantburnett in #124
Full Changelog: release/1.1.6...release/1.2.0