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

Handle stored files with general purpose bit 3 set #358

merged 1 commit into from Apr 23, 2018


Copy link

@idoru idoru commented Apr 3, 2018

In these cases, the @current_entry is unpacked from the local headers, but the size/compressed size/crc are all set to 0, which causes the PassThruDecompressor to read no bytes instead of the entry size.

This change makes Entry#get_input_stream pass the Entry itself down to Zip::InputStream so that when creating the Decompressor, it can be constructed with the correct number of bytes to be read (iff general purpose bit 3 is set and the size is 0).

May be related to #236 #295

Signed-off-by: Sam Coward

Signed-off-by: Sam Coward <>
Copy link

coveralls commented Apr 3, 2018

Coverage Status

Coverage increased (+0.005%) to 96.526% when pulling c787d94 on idoru:handle-gpbit-3 into 05af123 on rubyzip:master.

Copy link

@simonoff @olleolleolle any feedback? We'd like to use rubyzip in Cloud Foundry's Cloud Controller, but we're blocked on this PR.

@simonoff simonoff merged commit f073f64 into rubyzip:master Apr 23, 2018
Copy link


@idoru idoru deleted the handle-gpbit-3 branch April 27, 2018 20:21
This was referenced Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

5 participants