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

1 byte input & output buffer not working #1

Closed
GoogleCodeExporter opened this issue May 21, 2015 · 1 comment
Closed

1 byte input & output buffer not working #1

GoogleCodeExporter opened this issue May 21, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. port the example buftest.c and xzminidec.c from the xz-embedded library to 
miniz with a 1 byte input and output buffer

What is the expected output? What do you see instead?
I see duplicated bytes in the output

What version of the product are you using? On what operating system?
v111b

Please provide any additional information below.
I think porting the test/examples/demos from the xz-embedded or the xz library 
proper and/or other decompression libraries and including them into miniz would 
be a good idea.

Original issue reported on code.google.com by janez...@gmail.com on 20 Jul 2011 at 6:21

@GoogleCodeExporter
Copy link
Author

I discussed this issue with Janez by email, tinfl has an output buffer 
requirement that wasn't well commented in earlier release. tinfl is purposely 
designed this way- the higher level API's in miniz (such as the zlib-emulation 
functions) support tiny input/output buffer.

tinfl requires that the output buffer be either the size of the decompressed 
output stream (a "non-wrapping" output buffer - you must specify the proper 
tinfl flag to enable this), or the output buffer must be a power of 2 size that 
is at least as large as the LZ dictionary (typically 32KB). The input buffer 
for decompression can be 1 byte, and I've tested this on many files. 

Original comment by richge...@gmail.com on 19 May 2012 at 11:43

  • Changed state: Fixed

uroni pushed a commit that referenced this issue Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant