Data Compression

> Code - (Programming|Computer) Language > Algorithm

1 - About

Data compression or source coding is the process of encoding information using fewer bits (or other information-bearing units) than an unencoded representation would use through use of specific encoding schemes.


3 - Method

  • run-length encoding,
  • cluster coding
  • and dictionary coding.

3.1 - Dictionary encoding

Columns are stored as sequences of bit-coded integers.

A check for equality can then be executed on the integers; for example, during scans or join operations. This is much faster than comparing, for example, string values.

4 - Example

  • If a column is sorted, often there are repeated adjacent values

5 - Algorithm

6 - Library