Realize a compressor based on the algorithm LZ78