compressionzstandard

If you lose trained dictionary for ZST archive, can you still decompress it?


I see that you can have a trained sample for specific file types to increase compression ratio, if you lose that dictionary are you still able to decompress the archive or is it essentially corrupted?


Solution

  • No. The dictionary is also required at decompression-time.

    The dictionary is effectively a pool of content that the compressor can emit references into. This lets the compressor efficiently represent parts of the input by referencing matches in the dictionary, rather than having to describe that input in the compressed output.

    In order for the decompressor to resolve those references, the same dictionary must be presented to it.