decode($in); $this->assertEquals($expect, $out); } public function testEncodingExamplesFromRfc7541() { $dict = Dictionary::createRfc7541Dictionary(); $huff = new Codec($dict); $in = "www.example.com"; $expect = "\xf1\xe3\xc2\xe5\xf2\x3a\x6b\xa0\xab\x90\xf4\xff"; $out = $huff->encode($in); $this->assertEquals($expect, $out); } }