Search code examples
c#algorithmcompressionlzw

LZ complexity algorithm


Could you please explain me the thing: how does LZ complexity algorithm incorporate with data compression? Does it (or meant to) compress data or it only estimates the number of unique substrings in vocabulary?

Thanks!


Solution

  • You can calculate LZ complexity without actually doing any compression, although the calculation will look a lot like what happens when LZ-compressing the input data. See, e.g., calculating Lempel-Ziv (LZ) complexity (aka sequence complexity) of a binary string where one of the answers has (non-compressing) code for calculating LZ complexity.