Add `pledgeinsize`
This is part of https://github.com/JuliaIO/TranscodingStreams.jl/pull/239
This PR reduces the allocations needed when decompressing data compressed with transcode.
For example:
julia> using BenchmarkTools
julia> using CodecZstd
julia> c = transcode(ZstdCompressor, rand(UInt8, 10000));
julia> @btime transcode($(ZstdDecompressor()), $(c));
With this PR and https://github.com/JuliaIO/TranscodingStreams.jl/pull/239: 416.579 ns (4 allocations: 10.05 KiB)
Before: 510.451 ns (5 allocations: 19.72 KiB)
Codecov Report
:x: Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 63.11%. Comparing base (eef39ab) to head (db69f63).
:warning: Report is 1 commits behind head on master.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| src/libzstd.jl | 66.66% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #64 +/- ##
==========================================
+ Coverage 61.49% 63.11% +1.61%
==========================================
Files 4 4
Lines 361 366 +5
==========================================
+ Hits 222 231 +9
+ Misses 139 135 -4
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
What is the status of this pull request at the moment?
It has some minor conflicts that need to be resolved. I also want to try to maintain support for older versions of TranscodingStreams.