Final version of LZ78 DM