Commented LZ77 code