Deleted Added
full compact
mkuzip.8 (156818) mkuzip.8 (162792)
1.\" ----------------------------------------------------------------------------
2.\" "THE BEER-WARE LICENSE" (Revision 42):
3.\" <sobomax@FreeBSD.ORG> wrote this file. As long as you retain this notice you
4.\" can do whatever you want with this stuff. If we meet some day, and you think
5.\" this stuff is worth it, you can buy me a beer in return. Maxim Sobolev
6.\" ----------------------------------------------------------------------------
7.\"
1.\" ----------------------------------------------------------------------------
2.\" "THE BEER-WARE LICENSE" (Revision 42):
3.\" <sobomax@FreeBSD.ORG> wrote this file. As long as you retain this notice you
4.\" can do whatever you want with this stuff. If we meet some day, and you think
5.\" this stuff is worth it, you can buy me a beer in return. Maxim Sobolev
6.\" ----------------------------------------------------------------------------
7.\"
8.\" $FreeBSD: head/usr.bin/mkuzip/mkuzip.8 156818 2006-03-17 20:48:10Z sobomax $
8.\" $FreeBSD: head/usr.bin/mkuzip/mkuzip.8 162792 2006-09-29 15:20:48Z ru $
9.\"
9.\"
10.Dd September 10, 2004
10.Dd March 17, 2006
11.Dt MKUZIP 8
12.Os
13.Sh NAME
14.Nm mkuzip
15.Nd compress disk image for use with
16.Xr geom_uzip 4
17class
18.Sh SYNOPSIS
19.Nm
20.Op Fl v
21.Op Fl o Ar outfile
22.Op Fl s Ar cluster_size
23.Ar infile
24.Sh DESCRIPTION
25The
26.Nm
27utility compresses a disk image file so that the
28.Xr geom_uzip 4
29class will be able to decompress the resulting image at run-time.
30This allows for a significant reduction of size of disk image at
31the expense of some CPU time required to decompress the data each
32time it is read.
11.Dt MKUZIP 8
12.Os
13.Sh NAME
14.Nm mkuzip
15.Nd compress disk image for use with
16.Xr geom_uzip 4
17class
18.Sh SYNOPSIS
19.Nm
20.Op Fl v
21.Op Fl o Ar outfile
22.Op Fl s Ar cluster_size
23.Ar infile
24.Sh DESCRIPTION
25The
26.Nm
27utility compresses a disk image file so that the
28.Xr geom_uzip 4
29class will be able to decompress the resulting image at run-time.
30This allows for a significant reduction of size of disk image at
31the expense of some CPU time required to decompress the data each
32time it is read.
33The
33.Nm
34.Nm
35utility
34works in two phases:
35.Bl -enum
36.It
37An
38.Ar infile
39image is split into clusters; each cluster is compressed using
40.Xr zlib 3 .
41.It
42The resulting set of compressed clusters along with headers that allow
43locating each individual cluster is written to the output file.
44.El
45.Pp
46The options are:
47.Bl -tag -width indent
48.It Fl o Ar outfile
49Name of the output file
50.Ar outfile .
51The default is to use the input name with the suffix
52.Pa .uzip .
53.It Fl s Ar cluster_size
54Split the image into clusters of
55.Ar cluster_size
56bytes, 16384 bytes by default.
57The
58.Ar cluster_size
59should be a multiple of 512 bytes.
60.It Fl v
61Display verbose messages.
62.El
63.Sh NOTES
64The compression ratio largely depends on the cluster size used.
65.\" The following two sentences are unclear: how can gzip(1) be
66.\" used in a comparable fashion, and wouldn't a gzip-compressed
67.\" image suffer from larger cluster sizes as well?
68For large cluster sizes (16K and higher), typical compression ratios
69are only 1-2% less than those achieved with
70.Xr gzip 1 .
71However, it should be kept in mind that larger cluster
72sizes lead to higher overhead in the
73.Xr geom_uzip 4
74class, as the class has to decompress the whole cluster even if
75only a few bytes from that cluster have to be read.
76.Pp
36works in two phases:
37.Bl -enum
38.It
39An
40.Ar infile
41image is split into clusters; each cluster is compressed using
42.Xr zlib 3 .
43.It
44The resulting set of compressed clusters along with headers that allow
45locating each individual cluster is written to the output file.
46.El
47.Pp
48The options are:
49.Bl -tag -width indent
50.It Fl o Ar outfile
51Name of the output file
52.Ar outfile .
53The default is to use the input name with the suffix
54.Pa .uzip .
55.It Fl s Ar cluster_size
56Split the image into clusters of
57.Ar cluster_size
58bytes, 16384 bytes by default.
59The
60.Ar cluster_size
61should be a multiple of 512 bytes.
62.It Fl v
63Display verbose messages.
64.El
65.Sh NOTES
66The compression ratio largely depends on the cluster size used.
67.\" The following two sentences are unclear: how can gzip(1) be
68.\" used in a comparable fashion, and wouldn't a gzip-compressed
69.\" image suffer from larger cluster sizes as well?
70For large cluster sizes (16K and higher), typical compression ratios
71are only 1-2% less than those achieved with
72.Xr gzip 1 .
73However, it should be kept in mind that larger cluster
74sizes lead to higher overhead in the
75.Xr geom_uzip 4
76class, as the class has to decompress the whole cluster even if
77only a few bytes from that cluster have to be read.
78.Pp
79The
77.Nm
80.Nm
81utility
78inserts a short shell script at the beginning of the generated image,
79which makes it possible to
80.Dq run
81the image just like any other shell script.
82The script tries to load the
83.Xr geom_uzip 4
84class if it is not loaded, configure the image as an
85.Xr md 4
86disk device using
87.Xr mdconfig 8 ,
88and automatically mount it using
89.Xr mount_cd9660 8
90on the mount point provided as the first argument to the script.
91.Sh EXIT STATUS
92.Ex -std
93.Sh SEE ALSO
94.Xr gzip 1 ,
95.Xr zlib 3 ,
96.Xr geom 4 ,
97.Xr geom_uzip 4 ,
98.Xr md 4 ,
99.Xr mdconfig 8 ,
100.Xr mount_cd9660 8
101.Sh AUTHORS
102.An Maxim Sobolev Aq sobomax@FreeBSD.org
82inserts a short shell script at the beginning of the generated image,
83which makes it possible to
84.Dq run
85the image just like any other shell script.
86The script tries to load the
87.Xr geom_uzip 4
88class if it is not loaded, configure the image as an
89.Xr md 4
90disk device using
91.Xr mdconfig 8 ,
92and automatically mount it using
93.Xr mount_cd9660 8
94on the mount point provided as the first argument to the script.
95.Sh EXIT STATUS
96.Ex -std
97.Sh SEE ALSO
98.Xr gzip 1 ,
99.Xr zlib 3 ,
100.Xr geom 4 ,
101.Xr geom_uzip 4 ,
102.Xr md 4 ,
103.Xr mdconfig 8 ,
104.Xr mount_cd9660 8
105.Sh AUTHORS
106.An Maxim Sobolev Aq sobomax@FreeBSD.org