Page MenuHomePhabricator

File Metadata

Author
ppggff
Created
Feb 22 2016, 3:37 AM

test.php

#!/usr/bin/php
<?php
$input_stream = fopen("test.txt.gz", "rb");
stream_filter_append(
$input_stream,
'zlib.inflate',
STREAM_FILTER_READ,
array(
'window' => $argv[1],
));
$input_data = '';
while (!feof($input_stream)) {
$read_bytes = fread($input_stream, 64 * 1024);
$input_data .= $read_bytes;
}
fclose($input_stream);
$myfile = fopen("test.txt", "w");
fwrite($myfile, $input_data);
fclose($myfile);

Event Timeline

ppggff changed the visibility from "ppggff (ppggff)" to "Public (No Login Required)".Feb 22 2016, 3:40 AM