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

COMPRESSOBJ_FLUSH_BLOCK may not fully flush #55

Closed
indygreg opened this issue Oct 6, 2018 · 1 comment
Closed

COMPRESSOBJ_FLUSH_BLOCK may not fully flush #55

indygreg opened this issue Oct 6, 2018 · 1 comment

Comments

@indygreg
Copy link
Owner

indygreg commented Oct 6, 2018

I'm reasonably certain that using COMPRESSOBJ_FLUSH_BLOCK with the incremental compressor may result in partially flushed output. I'm pretty sure the comment and code around /* The output buffer is of size ZSTD_CStreamOutSize(), which is guaranteed to hold a full block. */ is wrong.

indygreg added a commit that referenced this issue Oct 7, 2018
If ZSTD_compress_generic() returns a positive number that isn't an
integer, there is remaining data to flush. Even if we use ZSTD_e_flush
and the output buffer is supposedly big enough to hold a full block.
@indygreg
Copy link
Owner Author

indygreg commented Oct 7, 2018

This should be fixed in the upcoming 0.10 release.

@indygreg indygreg closed this as completed Oct 7, 2018
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

No branches or pull requests

1 participant