A software experiment published on September 22 shows how the compression algorithm behind gzip can be repurposed as a rudimentary language model. The project, called GziPT, does not train a neural network or store learned weights. Instead, it asks which candidate continuation makes a block of text compress most efficiently, using that result as a rough measure of how well the new bytes fit the preceding material.

The idea rests on a close relationship between prediction and compression. Data that follows a familiar pattern can be encoded in fewer bits than surprising data. A compressor therefore contains an implicit model of what is likely to appear next, even if it was never designed as a text generator. In information-theory terms, symbols assigned higher probability require shorter descriptions.

GziPT uses Python's zlib implementation of DEFLATE, the algorithm also used by gzip. DEFLATE searches a recent 32-kilobyte window for byte sequences it has already encountered and represents a match with a compact back-reference. The experiment places a source corpus in that window, adds a prompt, and scores possible continuations by measuring the size of the resulting compressed data. Text that resembles patterns in the corpus generally receives a better score.

Generating text is harder than ranking a completed candidate. Choosing one byte at a time performs poorly because compressed output is measured in whole bytes: many possible next characters can produce the same length, concealing small differences. The implementation addresses that limitation with beam search. It explores several multi-byte continuations, retains the candidates that compress best and repeats the process before committing to output.

The scoring context also includes only a tail of the generated text. That constraint is intended to reduce a failure mode in which nearby repetitions become exceptionally cheap and the generator falls into verbatim loops. Because DEFLATE favors close matches, exposing the entire generated history can encourage repeated copying rather than a useful continuation.

Results shown by the developer are visibly less coherent than modern neural language-model output, but they demonstrate recognizable structure after the system is primed on a small Shakespeare corpus. The value of the project is therefore explanatory rather than competitive. It makes the compression-prediction connection concrete with a standard-library Python program and a familiar algorithm.

The experiment also illustrates why a compressor is not automatically a practical general-purpose language model. Its context is small, its score is coarse, and its strongest signal comes from literal byte patterns. Beam search can extract more from that signal, but it cannot supply the broad representations learned by contemporary models. GziPT is best understood as a compact demonstration that prediction is already embedded in ordinary compression software—and that a search procedure can turn that hidden preference into generated text.