Skip to content

Conversation

sagara-
Copy link
Contributor

@sagara- sagara- commented Dec 8, 2017

gzdeflate() creates a single compression stream, so they can't be concatenated together, which causes the original code to fail on data > 1mb. This patch uses deflate_init (available starting from PHP 7) to properly incrementally compress data. This can be tested by compressing something with size > 1024kb, such as a file created via fallocate -l1025K dummy.bin.

@ctf0
Copy link

ctf0 commented Dec 17, 2017

@maennchen could u plz merge this and tag a new release ? as atm any streaming ops will give a corrupted zip file.

@maennchen
Copy link
Owner

@ctf0 I'm testing some known edge cases (mostly with Apple's Unarchiver) right now. Will merge it right after if everything works as expected.

@maennchen
Copy link
Owner

Everything good to go! Thank you very much ❤️

@maennchen maennchen merged commit 253855c into maennchen:master Dec 18, 2017
@maennchen
Copy link
Owner

Released as v0.5.1

@sagara- sagara- deleted the fix-stream-compression branch December 19, 2017 00:39
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

Successfully merging this pull request may close these issues.

3 participants