1 | .\" |
---|
2 | .\" $Id: sq.1,v 1.1.1.1 1997-09-03 21:08:09 ghudson Exp $ |
---|
3 | .\" |
---|
4 | .\" Copyright 1992, 1993, Geoff Kuenning, Granada Hills, CA |
---|
5 | .\" All rights reserved. |
---|
6 | .\" |
---|
7 | .\" Redistribution and use in source and binary forms, with or without |
---|
8 | .\" modification, are permitted provided that the following conditions |
---|
9 | .\" are met: |
---|
10 | .\" |
---|
11 | .\" 1. Redistributions of source code must retain the above copyright |
---|
12 | .\" notice, this list of conditions and the following disclaimer. |
---|
13 | .\" 2. Redistributions in binary form must reproduce the above copyright |
---|
14 | .\" notice, this list of conditions and the following disclaimer in the |
---|
15 | .\" documentation and/or other materials provided with the distribution. |
---|
16 | .\" 3. All modifications to the source code must be clearly marked as |
---|
17 | .\" such. Binary redistributions based on modified source code |
---|
18 | .\" must be clearly marked as modified versions in the documentation |
---|
19 | .\" and/or other materials provided with the distribution. |
---|
20 | .\" 4. All advertising materials mentioning features or use of this software |
---|
21 | .\" must display the following acknowledgment: |
---|
22 | .\" This product includes software developed by Geoff Kuenning and |
---|
23 | .\" other unpaid contributors. |
---|
24 | .\" 5. The name of Geoff Kuenning may not be used to endorse or promote |
---|
25 | .\" products derived from this software without specific prior |
---|
26 | .\" written permission. |
---|
27 | .\" |
---|
28 | .\" THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND |
---|
29 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
---|
30 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
---|
31 | .\" ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE |
---|
32 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
---|
33 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
---|
34 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
---|
35 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
---|
36 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
---|
37 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
---|
38 | .\" SUCH DAMAGE. |
---|
39 | .\" |
---|
40 | .\" $Log: not supported by cvs2svn $ |
---|
41 | .\" Revision 1.6 1994/01/25 07:12:07 geoff |
---|
42 | .\" Get rid of all old RCS log lines in preparation for the 3.1 release. |
---|
43 | .\" |
---|
44 | .\" |
---|
45 | .TH SQ 1 LOCAL |
---|
46 | .SH NAME |
---|
47 | sq \- squeeze a sorted word list |
---|
48 | unsq \- unsqueeze a sorted word list |
---|
49 | .SH SYNOPSIS |
---|
50 | .B sq |
---|
51 | < infile > outfile |
---|
52 | .PP |
---|
53 | .B unsq |
---|
54 | < infile > outfile |
---|
55 | .SH DESCRIPTION |
---|
56 | .I sq |
---|
57 | compresses a sorted list of words (a dictionary). |
---|
58 | For example: |
---|
59 | .RS |
---|
60 | sort /usr/dict/words | sq | compress > words.sq.Z |
---|
61 | .RE |
---|
62 | will compress dict by about a factor of 4. |
---|
63 | .PP |
---|
64 | .I unsq |
---|
65 | uncompress the output of |
---|
66 | .I sq. |
---|
67 | For example: |
---|
68 | .RS |
---|
69 | compress -d < words.sq.Z | unsq | sort -f -o words |
---|
70 | .RE |
---|
71 | will uncompress a dictionary compressed with |
---|
72 | .I sq. |
---|
73 | .P |
---|
74 | The squeezing is achieved by eliminating common prefixes, and replacing |
---|
75 | them with a single character which encodes the number of characters |
---|
76 | shared with the preceding word. |
---|
77 | The prefix size is encoded as a single printable character: |
---|
78 | 0-9 represent 0-9, A-Z represent 10-35, and a-z represent 36-61. |
---|
79 | .SH AUTHOR |
---|
80 | Mike Wexler |
---|
81 | .SH SEE ALSO |
---|
82 | compress(1), sort(1). |
---|