2 encoding stream brotli auto flush
6 class_exists("http\\Encoding\\Stream\\Enbrotli") or die("SKIP need brotli support");
13 $defl = new http\Encoding\Stream\Enbrotli(http\Encoding\Stream::FLUSH_FULL);
14 $infl = new http\Encoding\Stream\Debrotli;
16 for ($f = fopen(__FILE__, "rb"); !feof($f); $data = fread($f, 0x100)) {
18 if ($data !== $d=$infl->update($defl->update($data))) {
19 printf("uh-oh »%s« != »%s«\n", $data, $d);
24 echo $infl->update($defl->finish());
27 var_dump($infl->done(), $defl->done());