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$ 9.\" 10.Dd July 29, 2001 11.Dt MDGZIP 8 12.Os 13.Sh NAME 14.Nm mkuzip 15.Nd compress a 16.Xr geom_uzip 4 17image 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 in such a way that the 28.Xr geom_uzip 4 29class will be able to decompress resulting image in run-time 30when it loaded into memory. This allows for significant reduction 31of memory footprint of memory-based filesystem at the expense of 32some CPU time required to decompress the data each time it is 33read. Internally, operation is done in two phases as follows: 34.Bl -enum 35.It 36An 37.Ar infile 38image is split into clusters and each cluster compressed using 39.Xr zlib 3 . 40.It 41Resulting set of clusters along with headers allowing to 42independently locate each individual cluster is written into 43output file. 44.El 45.Pp 46The options are: 47.Bl -tag -width Fl 48.It Fl o Ar outfile 49Name the output file 50.Ar outfile . 51The default is to use the input name with the suffix 52.Sq .uzip . 53.It Fl s Ar cluster_size 54Use 55.Ar cluster_size 56as the size of chunks the file being split up into. Default value 57is 16K. The 58.Ar cluster_size 59should be multiple of block size of the 60.Xr geom_uzip 4 61device (usually 512 bytes). 62.It Fl v 63Display verbose messages. 64.El 65.Sh NOTES 66Compression ratio largely depends on the cluster size used. For 67large cluster sizes of (16K and higher) typical compression ratios 68are only 1-2% less than those achieved with the 69.Xr gzip 1 70utlity. However, it should be kept in mind that larger cluster 71sizes lead to higher overhead in the 72.Xr geom_uzip 4 73class, as the class has to decompress the whole cluster even if 74literally only several bytes from that cluster have to be read. 75.Sh SEE ALSO 76.Xr gzip 1 , 77.Xr zlib 3 , 78.Xr geom_uzip 4 , 79.Xr boot 8 , 80.Xr loader 8 81.Sh DIAGNOSTICS 82Exit status is 0 on success and >0 on error. 83.Sh AUTHORS 84.An Maxim Sobolev Aq sobomax@FreeBSD.org . 85