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

wrong compressedBuffer size when compressing #29

Open
chaosct opened this issue Sep 17, 2020 · 1 comment
Open

wrong compressedBuffer size when compressing #29

chaosct opened this issue Sep 17, 2020 · 1 comment

Comments

@chaosct
Copy link

chaosct commented Sep 17, 2020

When compressing, compressedBuffer should be resized to LZ4_compressBound(inputSize), and not inputSize, as with very random data compressedBuffer may end being larger than the uncompressed data.

compressedBuffer.resize(inputSize);

@bakercp
Copy link
Owner

bakercp commented Dec 4, 2020

Good catch. Can you submit a PR?

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

2 participants