12 $m = new http\Message("HTTP/1.1 200 Ok");
13 $m->addHeader("Content-Type", "text/plain");
14 $m->getBody()->append("this\nis\nthe\ntext");
16 $d = new http\Encoding\Stream\Deflate;
18 $m->toCallback(function ($m, $data) use ($d, &$s) {
19 $s.=$d->update($data);
22 var_dump($m->toString() === http\Encoding\Stream\Inflate::decode($s));