Skip to main content
QUICK REVIEW

[Paper Review] From LZ77 to the Run-Length Encoded Burrows-Wheeler Transform, and Back

Alberto Policriti, Nicola Prezza|arXiv (Cornell University)|Feb 4, 2017
Algorithms and Data CompressionComputer Science15 references6 citations
TL;DR

This paper presents space-efficient algorithms to convert between LZ77 and Run-Length Encoded Burrows-Wheeler Transform (RLBWT), two key compressed text representations. It achieves conversion in time and space proportional to the compressed sizes $ r $ and $ z $, enabling efficient manipulation of highly repetitive data without full decompression.

ABSTRACT

The Lempel-Ziv factorization (LZ77) and the Run-Length encoded Burrows-Wheeler Transform (RLBWT) are two important tools in text compression and indexing, being their sizes $z$ and $r$ closely related to the amount of text self-repetitiveness. In this paper we consider the problem of converting the two representations into each other within a working space proportional to the input and the output. Let $n$ be the text length. We show that $RLBWT$ can be converted to $LZ77$ in $\mathcal{O}(n\log r)$ time and $\mathcal{O}(r)$ words of working space. Conversely, we provide an algorithm to convert $LZ77$ to $RLBWT$ in $\mathcal{O}\big(n(\log r + \log z)\big)$ time and $\mathcal{O}(r+z)$ words of working space. Note that $r$ and $z$ can be \emph{constant} if the text is highly repetitive, and our algorithms can operate with (up to) \emph{exponentially} less space than naive solutions based on full decompression.

Motivation & Objective

  • Address the need for efficient, space-bounded conversion between two major compressed text representations: LZ77 and RLBWT.
  • Enable computation on compressed data structures without full decompression, crucial for handling massive, repetitive datasets like genomic archives.
  • Overcome the limitations of naive decompression-based methods that require space proportional to the uncompressed text size.
  • Provide a foundation for constructing compressed self-indexes directly from LZ77 or RLBWT inputs with optimal space usage.
  • Achieve conversions using working space proportional to the compressed sizes $ r $ (RLBWT runs) and $ z $ (LZ77 factors), not the full text length $ n $.

Proposed method

  • Use a dynamic data structure $ \mathcal{Z} $ to maintain mappings between text positions and RLBWT positions during incremental construction.
  • Leverage the RLBWT data structure itself to efficiently extract characters from LZ77 by simulating the inverse BWT process with run-length compression.
  • Apply the LF (last-to-first) mapping and extend operations on a run-length BWT structure to incrementally build the RLBWT of the reversed text.
  • Use a sorted list $ \mathcal{D} $ of LZ77 phrases to process them in order, ensuring correct position tracking during character extraction and insertion.
  • Employ a dynamic structure $ \mathcal{Z} $ that supports map, assign, and expand queries to maintain consistency between text and RLBWT positions.
  • Convert the final RLBWT of the reversed text into $ RLBWT^+(T) $, the standard RLBWT representation, using an inverse run-length BWT construction.

Experimental results

Research questions

  • RQ1Can we convert from RLBWT to LZ77 in time and space proportional to the compressed representation sizes $ r $ and $ n $?
  • RQ2Can we convert from LZ77 to RLBWT using only $ \mathcal{O}(r + z) $ working space, avoiding full decompression?
  • RQ3Is it possible to extract characters from LZ77 efficiently using the RLBWT structure as a dynamic text extractor?
  • RQ4Can the conversion algorithms be designed to operate in time sublinear in $ n $, i.e., proportional to $ r + z $?
  • RQ5What are the theoretical and practical trade-offs of using dynamic data structures in compressed computation pipelines?

Key findings

  • The algorithm converts RLBWT to LZ77 in $ \mathcal{O}(n\log r) $ time and $ \mathcal{O}(r) $ words of working space, with output streamed to disk.
  • The algorithm converts LZ77 to RLBWT in $ \mathcal{O}(n(\log r + \log z)) $ time and $ \mathcal{O}(r + z) $ words of working space.
  • The working space is exponentially smaller than naive decompression-based approaches when $ r $ and $ z $ are small (e.g., in highly repetitive texts).
  • The method uses dynamic data structures to maintain position mappings between text and RLBWT, enabling efficient character extraction during construction.
  • The conversion from LZ77 to RLBWT relies on simulating the inverse BWT process using the RLBWT structure as a dynamic text extractor.
  • The final RLBWT is constructed by inverting the RLBWT of the reversed text, which is efficiently computed using the same dynamic structure.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.