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 API to support random access at block boundaries #170

Merged
merged 2 commits into from
Mar 20, 2025

Conversation

philiptaylor
Copy link
Contributor

@philiptaylor philiptaylor commented Mar 17, 2025

See comment #166 for rationale. Basically, this allows users to implement random access in the same way as zlib's zran.c, and avoids the downsides of serializing the entire DecompressorOxide state.

I've used this API in https://github.com/zaynar/indexed_deflate (WIP) and done some very basic testing on a few large .gz files.

Currently that code only uses BlockBoundaryState::num_bits. The other state fields are completely untested. If the basic concept of this patch seems acceptable, I can try to add some better testing here.

@philiptaylor
Copy link
Contributor Author

(Oops, just realised my indexed_deflate repository was private. Made it public now.)

@oyvindln oyvindln merged commit 240bcdd into Frommi:master Mar 20, 2025
9 checks passed
@philiptaylor philiptaylor deleted the block_boundary branch March 23, 2025 15:31
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