vix.ing · top · new · best · stats · spec

Decompressing Lempel-Ziv Compressed Text

2018/02/28 by Philip Bille, Mikko Berggren Ettienne, Bille, Philip +7
Biochemistry, Genetics and Molecular Biology · Computer Science · #Algorithms and Data Compression #DNA and Biological Computing #Data Structures and Algorithms (cs.DS) #FOS: Computer and information sciences #Network Packet Processing and Optimization

paper · pdf · doi:10.48550/arxiv.1802.10347

openalex publication_date 2018/02/28 · openalex created_date 2025/10/10 · openalex updated_date 2026/07/28

Abstract

We consider the problem of decompressing the Lempel--Ziv 77 representation of a string S of length n using a working space as close as possible to the size z of the input. The folklore solution for the problem runs in O(n) time but requires random access to the whole decompressed text. Another folklore solution is to convert LZ77 into a grammar of size O(zlog(n/z)) and then stream S in linear time. In this paper, we show that O(n) time and O(z) working space can be achieved for constant-size alphabets. On general alphabets of size σ, we describe (i) a trade-off achieving O(nlogδσ) time and O(zlog1-δσ) space for any 0≤ δ≤ 1, and (ii) a solution achieving O(n) time and O(zloglog (n/z)) space. The latter solution, in particular, dominates both folklore algorithms for the problem. Our solutions can, more generally, extract any specified subsequence of S with little overheads on top of the linear running time and working space. As an immediate corollary, we show that our techniques yield improved results for pattern matching problems on LZ77-compressed text.

Related