unsq(1)

unsq1

Squeeze or unsqueeze a sorted word list

Part of sq(1).

Usage

sq < infile > outfile

unsq < infile > outfile

Overview

sq compresses a sorted list of words (a dictionary). For example:

sort -u /usr/share/dict/words | sq | gzip -9 > words.sq.gz

will compress dict by about a factor of 5.

unsq uncompress the output of sq. For example:

gunzip < words.sq.gz | unsq | sort -f -o words

will uncompress a dictionary compressed with sq.

The squeezing is achieved by eliminating common prefixes, and replacing them with a single character which encodes the number of characters shared with the preceding word. The prefix size is encoded as a single printable character: 0-9 represent 0-9, A-Z represent 10-35, and a-z represent 36-61.

Releases

15 releases since Debian 1.1 (Buzz); the text changed 3 times.

  1. 1.1–2.1
  2. 2.2–5.0
  3. 6.0
  4. 7–10

Bugs

sq and unsq can only handle words of up to 256 characters. The input must be sorted, and duplicates must be suppressed.

Author

Mike Wexler

From ispell 3.4.00-6+b1 in Debian 10 (Buster). Parsed by carta from the page's man source.