Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for find_decompressed_size with skippable frames #68

Merged
merged 2 commits into from
Sep 15, 2024

Conversation

nhz2
Copy link
Member

@nhz2 nhz2 commented Sep 8, 2024

The implementation of find_decompressed_size is missing the special checks for skippable frames found in zstd

This PR adds tests to ensure the current implementation works correctly with skippable frames.

This PR also fixes initialization problems in some of the tests.

Copy link

codecov bot commented Sep 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.55%. Comparing base (a1fe6df) to head (43988dd).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #68   +/-   ##
=======================================
  Coverage   61.55%   61.55%           
=======================================
  Files           5        5           
  Lines         372      372           
=======================================
  Hits          229      229           
  Misses        143      143           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nhz2 nhz2 requested a review from mkitti September 8, 2024 17:42
@mkitti
Copy link
Member

mkitti commented Sep 8, 2024

How did you generate the skippable frames? Did you use the static API? If so, I made a module with the static API available for testing. Perhaps you should include code to generate the skippabke frames.

@nhz2
Copy link
Member Author

nhz2 commented Sep 8, 2024

I made the skippable frame by looking at the output of the pzstd, and from the description in https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#skippable-frames

@mkitti
Copy link
Member

mkitti commented Sep 9, 2024

There is also ZSTD_writeSkippableFrame from the static API.

I think we might want to consider a generational step where we use the static API to generate the bytes just so it is clear where they came from.

For that reason, I kept the static API around here:

https://github.com/JuliaIO/CodecZstd.jl/blob/master/test/LibZstd_clang_static.jl

@nhz2 nhz2 merged commit cef9aaa into master Sep 15, 2024
12 checks passed
@nhz2 nhz2 deleted the nz/test-skippable-frames branch September 15, 2024 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants