In May 1994, Michael Burrows and David Wheeler described a block-sorting compression method in Digital Equipment Corporation’s Systems Research Center Report 124. Their approach treated a fixed-size sequence of symbols as a block. It rearranged those symbols to make patterns easier for a subsequent encoder to exploit. The report credits an earlier idea by Wheeler and describes an implementation and experiments. The innovation was to change the order of the data while keeping a practical way to recover the original. [1]

One way to explain the transform is to write every cyclic rotation of the input as a row, sort the rows and take the last column. The encoder also retains the position of the row corresponding to the original block. This description explains what the transform does. A production implementation does not need to construct the full matrix of rotations in memory. [1]

The output contains the same symbols in a new order, plus the information needed to identify the original. The transform by itself does not make that column shorter. It can group similar characters or produce runs because sorting draws together positions that share a following context. The rest of a compression pipeline can then encode the reordered stream more economically. The 1994 report combined the rearrangement with subsequent coding, and evaluated the complete compressor on benchmark files. [1]

The later bzip2 program, developed by Julian Seward, is a concrete implementation in which block sorting is part of a lossless compressor. The Library of Congress format description identifies Burrows–Wheeler block sorting and Huffman coding as parts of the format. This shows adoption of the technique in a separate program. The savings observed on a particular text depend on the coding stages and input; they are not a constant property of the transform alone. [2][3]

After the rows are sorted, the last column identifies what precedes each sorted context in the circular block. The decoder can sort those same symbols to obtain the first column. Equal symbols preserve a consistent occurrence order between the first and last columns, so the decoder can build a map from one column to the other. With the recorded starting row, it can follow that mapping through the block and recover the original order. It does not need the other columns. [1]

The compression opportunity comes from local order. In a repetitive file, similar contexts often have similar preceding symbols. Sorting those contexts can make those symbols appear near each other. A later stage can take advantage of that locality. In data with few repeated patterns, rearrangement may yield less useful clustering. [1][3]

Analysis & application

When using the technique, benchmark the entire pipeline on representative files and count the extra bytes needed to store block metadata. Measure encode time, decode time and peak memory alongside size. Compare short, repetitive and already compressed inputs. Confirm that decompression reconstructs the exact input bytes, including empty inputs and blocks containing many repeated symbols. A quick test on one favorable text file is insufficient evidence about performance on a production mix. [1][3]

Choose block size as an engineering trade-off. Larger blocks can expose patterns across a longer span. They also increase the work and memory needed to process each block. Keep the intended decoder’s resource limits in view when selecting a format. [1][3]

The continued use of bzip2 illustrates how a transformation can become a component rather than an entire product. Different versions of the program preserve format compatibility, according to the Library of Congress. The format’s practical utility includes the encoder, decoder and ability to read older files. The case is a reminder to attribute a compression result to the full system and to separate improvements in encoded size from improvements in speed or resource use. [2][3]

FOLLOW THE EVIDENCE

The sources

  1. A Block-sorting Lossless Data Compression Algorithm Michael Burrows and David J. Wheeler, DEC Systems Research Center · cl.cam.ac.uk ·
  2. bzip2 Library of Congress · loc.gov
  3. bzip2 and libbzip2, version 1.0.8: A program and library for data compression Julian Seward · sourceware.org ·