This allows the algorithm to output some standard bytes that were encoded with Huffman codes, and when it encounters a pair the decompressor travels backwards through the stream bytes, outputs bytes, and then advances to the next value in the decoding stream. This algorithm can thus compress data with much repitition very well. LZ77, although very nice, has legal problems associated with it. The .gif file format used a variation of LZ77 that turned out to be patented by Unisys. I am not positive of any resolution, but the graphics world continues to use .gif, despite its numerous shortcomings.
Legal issues become very important when coding compression algorithms.
LZ78 uses a dictionary and outputs nothing but indices into the dictionary. This can be implemented very quickly using a hash-table, but does not compress as well as LZ77. Every value must be stored in the dictionary. The decompressor simply outputs values until it reaches a dictionary request, and it outputs whatever value is at that location in the stream. It has mostly been abandoned for LZ77.