go-compression.github.io icon indicating copy to clipboard operation
go-compression.github.io copied to clipboard

LZ77 Encoder/Decoder is Buggy

Open phillipcutter opened this issue 5 years ago • 2 comments

https://www.reddit.com/r/programming/comments/j3bsi1/the_hitchhikers_guide_to_compression_a_beginners/g7bzd5r?utm_source=share&utm_medium=web2x&context=3

FYI your LZ77 visualiser is buggy.

Input: Potayto Potahto
Compressed: Potay<3,1><5,1><7,1><8,4><12,1><8,2>
Decompressed: PotaytoPPotaPto

phillipcutter avatar Oct 01 '20 22:10 phillipcutter

Agree, the encoder doesn't work at all. It seems to be, among probably a few other bugs, ignoring new symbols the second it finds its first back-reference. It's hard to believe this is one of the first results on google haha

AlgoRythm-Dylan avatar Aug 30 '23 20:08 AlgoRythm-Dylan

I think there's a lot of value in these docs besides some bugs in the interactive examples. There's also not a lot of easily consumable content on the subject, so I don't think the Google search ranking is such a surprise.

I'd love to tackle these bugs myself, but unfortunately I don't have the time. If you'd like to tackle them and submit a pull request, I'd be more than happy to review it.

phillipcutter avatar Aug 30 '23 22:08 phillipcutter