English

CRAM: Compressed Random Access Memory

Data Structures and Algorithms 2015-03-17 v2

Abstract

We present a new data structure called the \emph{Compressed Random Access Memory} (CRAM) that can store a dynamic string TT of characters, e.g., representing the memory of a computer, in compressed form while achieving asymptotically almost-optimal bounds (in terms of empirical entropy) on the compression ratio. It allows short substrings of TT to be decompressed and retrieved efficiently and, significantly, characters at arbitrary positions of TT to be modified quickly during execution \emph{without decompressing the entire string}. This can be regarded as a new type of data compression that can update a compressed file directly. Moreover, at the cost of slightly increasing the time spent per operation, the CRAM can be extended to also support insertions and deletions. Our key observation that the empirical entropy of a string does not change much after a small change to the string, as well as our simple yet efficient method for maintaining an array of variable-length blocks under length modifications, may be useful for many other applications as well.

Keywords

Cite

@article{arxiv.1011.1708,
  title  = {CRAM: Compressed Random Access Memory},
  author = {Jesper Jansson and Kunihiko Sadakane and Wing-Kin Sung},
  journal= {arXiv preprint arXiv:1011.1708},
  year   = {2015}
}
R2 v1 2026-06-21T16:40:19.363Z