Skip to content

Instantly share code, notes, and snippets.

@joelwurtz
Last active March 27, 2018 13:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joelwurtz/c06bcfbb6766cb2b1d53 to your computer and use it in GitHub Desktop.
Save joelwurtz/c06bcfbb6766cb2b1d53 to your computer and use it in GitHub Desktop.
Zlib Stream PHP WTF :/
<?php
// Filter for zlib compress (RFC 1950)
stream_filter_append($resource, 'zlib.deflate', ['window' => 15]);
// Filter for deflate (RFC 1951)
stream_filter_append($resource, 'zlib.deflate', ['window' => -15]);
// Filter for gzip (RFC 1952)
stream_filter_append($resource, 'zlib.deflate', ['window' => 31);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment