1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
.\" Copyright (C), 1995, Graeme W. Wilford. (Wilf.)
.\" Copyright (c) 2002, 2007 Colin Watson.
.\"
.\" You may distribute under the terms of the GNU General Public
.\" License as specified in the file docs/COPYING.GPLv2 that comes with the
.\" man-db distribution.
.\"
.\" Thu Sep 21 19:22:47 BST 1995 Wilf. (G.Wilford@ee.surrey.ac.uk)
.\"
.BS 1 "Compression"
.BS 2 "Compressed manual pages"
.lp
It is possible to maintain a system of compressed manual pages.
This imposes a small overhead on the formatting process, but is nevertheless
usually reasonable in order to avoid unnecessary consumption of disk space.
.lp
Presently, the compression extension/decompressor pairs must be known at
compile time although any number may be defined and used.
The following structure is predefined in \*M:
.TS
center box tab(@);
l | l .
Extension@Decompressor
_
gz@gzip \-dc
z@gzip \-dc
Z@compress \-dc
.TE
It is a relatively easy operation to include further pairs in this
structure.
See
.i lib/compression.c
for details and an example.
.lp
Support for compressed manual pages is compiled into the \*M utilities by
default, depending on the decompressors available at configure time.
.BS 2 "Compressed cat pages"
.lp
\*M compresses cat files by default.
During configuration,
.b configure
will try to find
.b gzip
and, if found, all cat files produced by
.b man
will be compressed with
.ip
.b "gzip \-7c"
.lp
and have a
.b .gz
extension appended.
If
.b gzip
is not found,
.ip
.b "compress \-c"
.lp
is used as the compressor and the extension
.b .Z
is appended.
.lp
To store cat files in an uncompressed state and to disable compressed
extension processing completely, edit
.i config.h
and comment out the following line
.lp
#define COMP_CAT 1
.lp
.BS 3 "Stray cats"
.lp
Normally,
.b man
will only look for cat files with the default compression extension.
The default compression extension is dependent on the default compressor
and may be an empty string if the support for compressed cats is disabled.
.lp
It is possible for a system to be supplied with stray cat files located in the
traditional cat page hierarchy.
To make matters worse, they may have
compression extensions other than the default and reside on read-only media.
In such circumstances, stray cat files will be accepted with any compression
extension that is also supported for manual pages.
.lp
This special treatment of stray cat pages is removed if
support for compressed manual pages is turned off or not available.
|