1.\" $NetBSD: lzf.1,v 1.5 2014/03/18 18:20:36 riastradh Exp $ 2.\" 3.\" Copyright (c) 2012 The NetBSD Foundation, inc. 4.\" All rights reserved. 5.\" 6.\" This code is derived from software contributed to the NetBSD Foundation 7.\" by Thor Lancelot Simon. 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 3. All advertising materials mentioning features or use of this software 18.\" must display the following acknowledgement: 19.\" This product includes software developed by the NetBSD 20.\" Foundation, Inc. and its contributors. 21.\" 4. Neither the name of The NetBSD Foundation nor the names of its 22.\" contributors may be used to endorse or promote products derived 23.\" from this software without specific prior written permission. 24.\" 25.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 26.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 27.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 28.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 29.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35.\" POSSIBILITY OF SUCH DAMAGE. 36.\" 37.Dd September 16, 2012 38.Dt LZF 1 39.Os 40.Sh NAME 41.Nm lzf 42.Nd compress and uncompress files using LZF algorithm 43.Sh SYNOPSIS 44.Nm 45.Op Fl bcdfhv 46.Ar file 47.Oo 48.Ar file Oo ... 49.Oc 50.Oc 51.Nm unlzf 52.Ar file 53.Oo 54.Ar file Oo ... 55.Oc 56.Oc 57.Nm lzfcat 58.Ar file 59.Oo 60.Ar file Oo ... 61.Oc 62.Oc 63.Sh DESCRIPTION 64.Nm 65is a simple program to compress or uncompress files using LZF 66(sometimes known as "Lempel-Ziv Fast") coding. 67LZF is extremely fast, about 75% of the performance of 68.Xr memcpy 3 69for many inputs, while offering a moderate compression ratio, 70usually between 1.5:1 and 2:1. 71.Pp 72When compressing, it removes each input file and replaces it with an 73output file with the suffix 74.Dq Pa .lzf 75appended. 76When uncompressing, it removes each input file and replaces it with 77an output file with the suffix 78.Dq Pa .lzf 79removed. 80If no files are specified as arguments, standard input and standard 81output are used as input and output respectively. 82.Pp 83If invoked as 84.Nm lzf , 85the default mode of operation is to compress. 86If invoked as 87.Nm unlzf , 88the default mode of operation is to uncompress. 89If invoked as 90.Nm lzfcat , 91the default mode of operation is to uncompress to standard output. 92.Sh OPTIONS 93The following options are available: 94.Bl -tag -width width 95.It Fl b 96This option selects a compression blocksize. 97Small compression block sizes give poor compression and slow 98operation; the default of 64KiB is strongly recommended. 99Block sizes larger than 64KiB are silently reduced to 64KiB in 100order to not produce output incompatible with other versions of 101.Nm . 102.It Fl c 103This option selects compression. 104.It Fl d 105This option selects decompression. 106.It Fl f 107This option forces overwrite of preexisting output files, if any. 108.It Fl h 109This option prints command usage. 110.It Fl v 111This option prints compression statistics for each file processed. 112.El 113.Sh SEE ALSO 114.Xr bzip2 1 , 115.Xr compress 1 , 116.Xr gzip 1 , 117.Xr xz 1 118.Sh HISTORY 119The 120.Nm 121program was first included with version 0.1 of Marc Lehmann's LZF library. 122It was rewritten for version 2.0 of the library to offer the current 123syntax, which is mostly compatible with other compression utilities such 124as 125.Xr gzip 1 . 126The 127.Nm 128program first appeared in 129.Nx 7.0 . 130.Sh AUTHORS 131The 132.Nm 133program was written by 134.An Stefan Traby Aq Mt stefan@hello-penguin.com . 135.Sh BUGS 136Some versions of 137.Nm 138install a program named 139.Dq Pa lzcat 140instead of 141.Nm lzfcat . 142Because the 143.Pq lzcat 144name is also used by 145.Xr xz 1 , 146in 147.Nx 148the name 149.Nm lzfcat 150is used instead. 151