English

Relations Between Greedy and Bit-Optimal LZ77 Encodings

Discrete Mathematics 2018-01-10 v2

Abstract

This paper investigates the size in bits of the LZ77 encoding, which is the most popular and efficient variant of the Lempel-Ziv encodings used in data compression. We prove that, for a wide natural class of variable-length encoders for LZ77 phrases, the size of the greedily constructed LZ77 encoding on constant alphabets is within a factor O(lognlogloglogn)O(\frac{\log n}{\log\log\log n}) of the optimal LZ77 encoding, where nn is the length of the processed string. We describe a series of examples showing that, surprisingly, this bound is tight, thus improving both the previously known upper and lower bounds. Further, we obtain a more detailed bound O(min{z,lognloglogz})O(\min\{z, \frac{\log n}{\log\log z}\}), which uses the number zz of phrases in the greedy LZ77 encoding as a parameter, and construct a series of examples showing that this bound is tight even for binary alphabet. We then investigate the problem on non-constant alphabets: we show that the known O(logn)O(\log n) bound is tight even for alphabets of logarithmic size, and provide tight bounds for some other important cases.

Keywords

Cite

@article{arxiv.1707.09789,
  title  = {Relations Between Greedy and Bit-Optimal LZ77 Encodings},
  author = {Dmitry Kosolobov},
  journal= {arXiv preprint arXiv:1707.09789},
  year   = {2018}
}

Comments

14 pages

R2 v1 2026-06-22T21:02:07.618Z