On optimal parsing for LZ78-like compressors