sq 中文man頁面
名稱 (NAME)
sq - 壓縮一個(gè)排過序的單詞列表 unsq - 解壓一個(gè)排過序的單詞列表
總覽 (SYNOPSIS)
sq < infile > outfile
unsq < infile > outfile
描述 (DESCRIPTION)
sq 壓縮 一個(gè) 排過序的 單詞 列表 (一個(gè) 字典). 比如:
- sort /usr/dict/words | sq | compress > words.sq.Z
會(huì) 大概 以 4 為 因數(shù) 壓縮 字典.
unsq 解壓 sq 的 輸出. 比如:
- compress -d < words.sq.Z | unsq | sort -f -o words
會(huì) 解壓 sq 壓縮 的 字典. 根據(jù) 文檔 描述, 它 通過 省略 相同 的 詞頭 來 壓縮, 用 一個(gè) 單獨(dú) 的 字符 取代這個(gè) 詞頭, 這個(gè) 字符 對(duì) 與 前一個(gè)詞 相同的 字符數(shù) 進(jìn)行 編碼. 詞頭 的 大小 用 一個(gè) 編了碼 的 可打印 的 字符 表示: 0-9 代表 0-9, A-Z 代表 10-35, a-z 代表 36-61.
作者 (AUTHOR)
Mike Wexler
參見 (SEE ALSO)
compress(1), sort(1).
#p#
NAME
sq - squeeze a sorted word list unsq - unsqueeze a sorted word list
SYNOPSIS
sq < infile > outfile
unsq < infile > outfile
DESCRIPTION
sq compresses a sorted list of words (a dictionary). For example:
- sort /usr/share/dict/words | sq | compress > words.sq.Z
will compress dict by about a factor of 4.
unsq uncompress the output of sq. For example:
- compress -d < words.sq.Z | 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.
AUTHOR
Mike Wexler
SEE ALSO
compress(1), sort(1).