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

External compression and setting -B may cause incorrect source block size & count #113

Closed
GoogleCodeExporter opened this issue Mar 24, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

@GoogleCodeExporter GoogleCodeExporter commented Mar 24, 2015

The code that opens and reads the first block of the source file has to decide 
whether it is compressed, in which case it forks a decompress process and 
continues reading the data.

The value for -B defaults to 64MB with 32 buffers of 2MB each.

If the file size is known to be less than -B or if it fits entirely within the 
first block read, then the main program sets up the library with a single block 
containing the entire contents.  This improves compression slightly.

However, the logic in 3.0z and earlier sets up the single-block case when the 
compressed size is smaller than -B, not taking into account the decompression 
that takes place.  As a result, it is quite possible that raising -B reduces 
compression.


Original issue reported on code.google.com by josh.mac...@gmail.com on 24 Aug 2010 at 4:57

@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Mar 24, 2015

SVN 324 fixed.

Original comment by josh.mac...@gmail.com on 24 Aug 2010 at 6:08

@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Mar 24, 2015

SVN 336 Really Fixed with a big code cleanup.

Original comment by josh.mac...@gmail.com on 7 Nov 2010 at 8:26

@GoogleCodeExporter
Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Mar 24, 2015

Original comment by josh.mac...@gmail.com on 9 Jan 2011 at 8:46

  • Changed state: Fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant