2 encoding stream chunked flush
11 $dech = new http\Encoding\Stream\Dechunk(http\Encoding\Stream::FLUSH_FULL);
12 $file = file(__FILE__);
14 foreach ($file as $i => $line) {
17 $data .= $dech->update(sprintf("%lx\r\n%s\r\n", strlen($line), $line));
19 $data .= $dech->update(sprintf("%lx\r\n", strlen($line)));
20 $data .= $dech->flush();
21 $data .= $dech->update($line);
22 $data .= $dech->flush();
23 $data .= $dech->update("\r\n");
26 $dech->done() and printf("uh-oh done() reported true!\n");
28 $data .= $dech->update("0\r\n");
29 var_dump($dech->done());
30 $data .= $dech->finish();
31 var_dump(implode("", $file) === $data);