Learn

Data Compression

Begin with the distinction between lossless and lossy compression. Explore coding examples before considering the tradeoffs of querying compressed data.

From smaller representation to useful computation

Compression changes how data is represented to reduce storage or transfer size. Begin with lossless and lossy compression, which explains what information must be preserved. Then follow run-length encoding and dictionary compression to see two ways repeated structure can be recorded compactly.

The system question is what happens after encoding: does the application need to decompress everything, or can the format support a query directly? Read querying compressed data for the tradeoff between compact storage, decoding, and materializing results. LuMATH’s related research direction is described on the computable compression page; the examples here explain existing concepts, not LuMATH performance.

What makes a compression method useful

An encoding is useful only in relation to both its data and its task. Lossless compression must allow the original information to be recovered exactly. Lossy compression can discard detail within a specified quality constraint. Run-length encoding works well when long runs repeat; dictionary methods can benefit when the same patterns recur. Neither is universally best.

For an application, the full cost includes encoding, storage or transfer, decoding, temporary memory, and the work performed on the result. If the application needs one aggregate over a large dataset, decoding every value first may be unnecessary work—but only if the representation supports that aggregate and returns the correct answer. The compressed-data query article walks through that question.

LuMATH’s computable-compression page describes a research direction in which representation and computation are designed together. The established encodings explained in this section are teaching examples, not LuMATH’s proprietary method, an available codec, or a measured result.

Explore this topic