SQ(1)
๐ SQ(1) ๐
okay so this is the General Commands Manual entry for sq and unsq, and it's giving โtiny compression tool with main character energyโ โจ stay with me bestie, it's literally so simple.
๐ธ NAME ๐ธ
sq, unsq โ squeeze or unsqueeze a sorted word list. That's the whole name section, periodt ๐
๐ SYNOPSIS ๐
sq < infile > outfile
unsq < infile > outfile
๐ฆ DESCRIPTION ๐ฆ
sq compresses a sorted list of words (a dictionary). For example:
sort -u /usr/dict/words | sq | gzip -9 > words.sq.Z
will compress dict by about a factor of 5. slay ๐
unsq uncompress the output of sq. For example:
gunzip < words.sq.gz | unsq | sort -f -o words
will uncompress a dictionary compressed with sq. iconic behavior honestly ๐ซถ
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, like this:
0โ9represent0โ9AโZrepresent10โ35aโzrepresent36โ61
no cap, that's the whole encoding vibe ๐
๐ BUGS ๐
sq and unsq can only handle words of up to 256 characters. The input must be sorted, and duplicates must be suppressed.
bestie please read that twice ๐ญ if your list is unsorted or full of dupes, this is not the moment. and 256 characters is the limit, fr fr.
๐ AUTHOR ๐
Mike Wexler
๐ฅ SEE ALSO ๐ฅ
cute little sign-off: the footer says source/version LOCAL and page tag SQ(1) โ and there's no date on it, bestie โ so that's the tea ๐โจ
๐ฆ where this page comes from
- nixos 26.05: ispell 3.4.06
- nixpkgs unstable: ispell 3.4.06
- opensuse-leap 16.0: ispell-sq 3.4.06-bp160.1.14 ยท BSD-3-Clause
- opensuse-leap 16.0: ispell-sq 3.4.06-bp160.1.14 ยท BSD-3-Clause
- opensuse-leap 16.0: ispell-sq 3.4.06-bp160.1.14 ยท BSD-3-Clause
- opensuse-leap 16.0: ispell-sq 3.4.06-bp160.1.14 ยท BSD-3-Clause
- Copyright 1992, 1993, 1999, 2001, Geoff Kuenning, Claremont, CA
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms