Fixed the bad memory access issue in LZ78 decompressor