English

From LZ77 to the Run-Length Encoded Burrows-Wheeler Transform, and Back

Data Structures and Algorithms 2017-02-07 v1

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 zz and rr 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 nn be the text length. We show that RLBWTRLBWT can be converted to LZ77LZ77 in O(nlogr)\mathcal{O}(n\log r) time and O(r)\mathcal{O}(r) words of working space. Conversely, we provide an algorithm to convert LZ77LZ77 to RLBWTRLBWT in O(n(logr+logz))\mathcal{O}\big(n(\log r + \log z)\big) time and O(r+z)\mathcal{O}(r+z) words of working space. Note that rr and zz 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.

Keywords

Cite

@article{arxiv.1702.01340,
  title  = {From LZ77 to the Run-Length Encoded Burrows-Wheeler Transform, and Back},
  author = {Alberto Policriti and Nicola Prezza},
  journal= {arXiv preprint arXiv:1702.01340},
  year   = {2017}
}
R2 v1 2026-06-22T18:09:30.903Z