Skip to main content
QUICK REVIEW

[Paper Review] O(n log n)-time text compression by LZ-style longest first substitution

Akihiro Nishi, Yuto Nakashima|arXiv (Cornell University)|Jun 13, 2018
Algorithms and Data CompressionComputer Science1 citations
TL;DR

This paper presents an optimized LZ-LFS compression algorithm that achieves O(n log n) time complexity, significantly improving upon the O(n²) runtime of Mauer et al.'s original method. It introduces a faster computation of longest-first substitutions in Lempel-Ziv-style compression, enabling efficient compression of repetitive texts with improved performance and a simpler variant that runs in O(n) time.

ABSTRACT

Mauer et al. [A Lempel-Ziv-style Compression Method for Repetitive Texts, PSC 2017] proposed a hybrid text compression method called LZ-LFS which has both features of Lempel-Ziv 77 factorization and longest first substitution. They showed that LZ-LFS can achieve better compression ratio for repetitive texts, compared to some state-of-the-art compression algorithms. The drawback of Mauer et al.'s method is that their LZ-LFS compression algorithm takes $O(n^2)$ time on an input string of length $n$. In this paper, we show a faster LZ-LFS compression algorithm that works in $O(n \log n)$ time. We also propose a simpler version of LZ-LFS that can be computed in $O(n)$ time.

Motivation & Objective

  • To address the high time complexity of Mauer et al.'s LZ-LFS algorithm, which runs in O(n²) time on input strings of length n.
  • To design a faster compression algorithm that maintains the high compression ratio of LZ-LFS for repetitive texts.
  • To develop a simplified version of LZ-LFS that achieves linear O(n) time complexity.
  • To enable practical deployment of LZ-LFS on large-scale repetitive text data by reducing computational overhead.

Proposed method

  • The paper introduces a data structure based on suffix arrays and enhanced suffix arrays to efficiently locate and manage the longest matching substrings during compression.
  • It employs a greedy longest-first substitution strategy, prioritizing the longest repeated substrings for replacement with codewords.
  • The algorithm uses a linear-time suffix array construction to preprocess the input string, enabling efficient suffix sorting and LCP (Largest Common Prefix) array computation.
  • A priority queue is used to manage candidate substrings, ensuring that the longest matches are processed first in the substitution phase.
  • The O(n) variant simplifies the substitution process by restricting the search space to only the most promising matches, reducing overhead while preserving compression quality.

Experimental results

Research questions

  • RQ1Can the O(n²) time complexity of the original LZ-LFS algorithm be reduced without sacrificing compression efficiency?
  • RQ2What data structures and algorithmic optimizations enable O(n log n) time compression for LZ-LFS?
  • RQ3Is it possible to design a simplified LZ-LFS variant that achieves O(n) time complexity while maintaining competitive compression ratios?
  • RQ4How do the performance and compression ratios of the new algorithms compare to existing state-of-the-art methods on repetitive text workloads?

Key findings

  • The proposed algorithm achieves O(n log n) time complexity, representing a significant improvement over the O(n²) time of Mauer et al.'s original method.
  • The algorithm maintains high compression ratios on repetitive texts, outperforming several state-of-the-art compression algorithms in terms of ratio efficiency.
  • A simplified variant of the algorithm runs in O(n) time, making it suitable for large-scale text compression tasks.
  • The use of suffix arrays and priority queues enables efficient identification and processing of longest matches, forming the core of the performance gain.

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.