Skip to content

Instantly share code, notes, and snippets.

@joelwurtz
joelwurtz / gist:c06bcfbb6766cb2b1d53
Last active Mar 27, 2018
Zlib Stream PHP WTF :/
View gist:c06bcfbb6766cb2b1d53
<?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);
You can’t perform that action at this time.