# Space-Efficient Re-Pair Compression

arXiv: https://arxiv.org/abs/1611.01479 · HTML: https://mlsanity.com/paper/1611.01479/

## Key facts

- Cited by 1 papers in the map (data through 24 Nov 2026).
- Submitted 4 Nov 2016.

## Built on by (most cited first, 1 of 1)

- [Hybrid Compression for Memory-Efficient Matrix-Vector Multiplication](https://mlsanity.com/paper/2611.18792/) (2026)

## Abstract (arXiv)

Re-Pair is an effective grammar-based compression scheme achieving strong compression rates in practice. Let n, σ, and d be the text length, alphabet size, and dictionary size of the final grammar, respectively. In their original paper, the authors show how to compute the Re-Pair grammar in expected linear time and 5n + 4σ2 + 4d + √n words of working space on top of the text. In this work, we propose two algorithms improving on the space of their original solution. Our model assumes a memory word of lceillog2 nrceil bits and a re-writable input text composed by n such words. Our first algorithm runs in expected mathcal O(n/ε) time and uses (1+ε)n +√ n words of space on top of the text for any parameter 0<ε ≤ 1 chosen in advance. Our second algorithm runs in expected mathcal O(nlog n) time and improves the space to n +√ n words.
