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

Approach: Build GZIP format around DEFLATE compression #7

Closed
clue opened this issue Nov 12, 2015 · 3 comments
Closed

Approach: Build GZIP format around DEFLATE compression #7

clue opened this issue Nov 12, 2015 · 3 comments

Comments

@clue
Copy link
Owner

clue commented Nov 12, 2015

Issue #3 introduced compression and decompression based on zlib stream compression filters.

This works reasonably well with some inconsistencies listed in the README.

One notable exception is HHVM support. HHVM currently only supports raw DEFLATE (de)compression and not the widespread GZIP format.

Given that GZIP is essentially a small header and footer around the actual DEFLATE body, we should look into implementing the GZIP format ourselves.

@clue clue self-assigned this Nov 12, 2015
@joelwurtz
Copy link

Following #3, i was thinking this was also the case for PHP (but apparently setting a window parameter change the decompression format), but you can take an example at what i have done here to handle the header / footer around the GZIP format it may be helpful :

https://github.com/php-http/encoding/blob/845a9e5eb58406410a2dfe9b3a7f37fac31bf57d/src/GzipEncodeStream.php

@clue
Copy link
Owner Author

clue commented Nov 12, 2015

@joelwurtz yeah, PHP already has support for the GZIP format. However, some of the known inconsistencies listed in the README could probably we worked around if we also utilize a custom GZIP format parser (in particular detecting an invalid stream). Thanks for sharing the link, certainly helps verifying our own implementation.

FWIW, the implementation is almost done, just adding some additional tests cases right now.

@clue
Copy link
Owner Author

clue commented May 11, 2018

Note that this is already supported on all Zend PHP versions, only HHVM lacks support for ZLIB and GZIP encoding.

I still think that this feature makes perfect sense 👍 However, there are currently no immediate plans to build this from my end (no demand at the moment and more important outstanding issues currently), but I would be really happy to accept PRs 👍

(If you need this for a commercial project and you want a quote, please check out my profile and send me an email)

@clue clue closed this as completed May 11, 2018
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

2 participants