# The SBC-tree: an index for run-length compressed sequences

## Abstract

Run-Length-Encoding (RLE) is a data compression technique that is used in various applications, e.g., time series, biological sequences, and multimedia databases. One of the main challenges is how to operate on (e.g., index, search, and retrieve) compressed data without decompressing it. In this paper, we introduce the *S*tring *B*-tree for *C*ompressed sequences, termed the *SBC-tree*, for indexing and searching RLE-compressed sequences of arbitrary length. The SBC-tree is a two-level index structure based on the well-known String B-tree and a 3-sided range query structure [*7*]. The SBC-tree supports pattern matching queries such as *substring matching, prefix matching*, and *range search* operations over RLE-compressed sequences. The SBC-tree has an optimal external-memory space complexity of *O(N/B)* pages, where *N* is the total length of the compressed sequences, and *B* is the disk page size. *Substring matching, prefix matching*, and *range search* execute in an optimal O(log_{B} *N* + |*p*|+*T*/*B*) I/O operations, where |*p*| is the length of the compressed query pattern and *T* is the query output size. The SBC-tree is also dynamic and supports *insert* and *delete* operations efficiently. The insertion and deletion of all suffixes of a compressed sequence of length *m* take O(*m* log_{B}(*N* + *m*)) amortized I/O operations. The SBC-tree index is realized inside PostgreSQL. Performance results illustrate that using the SBC-tree to index RLE-compressed sequences achieves up to an order of magnitude reduction in storage, while retains the optimal search performance achieved by the String B-tree over the uncompressed sequences.

## Keywords

data structures, trees, data compaction and compression, retrieval

## Date of this Version

2008

## Comments

EDBT '08 Proceedings of the 11th international conference on Extending database technology: Advances in database technology