1Description 2 3Clzip is a C language version of lzip, fully compatible with lzip-1.4 or 4newer. As clzip is written in C, it may be easier to integrate in 5applications like package managers, embedded devices, or systems lacking 6a C++ compiler. 7 8Lzip is a lossless data compressor with a user interface similar to the 9one of gzip or bzip2. Lzip can compress about as fast as gzip (lzip -0), 10or compress most files more than bzip2 (lzip -9). Decompression speed is 11intermediate between gzip and bzip2. Lzip is better than gzip and bzip2 12from a data recovery perspective. 13 14The lzip file format is designed for data sharing and long-term 15archiving, taking into account both data integrity and decoder 16availability: 17 18 * The lzip format provides very safe integrity checking and some data 19 recovery means. The lziprecover program can repair bit-flip errors 20 (one of the most common forms of data corruption) in lzip files, 21 and provides data recovery capabilities, including error-checked 22 merging of damaged copies of a file. 23 24 * The lzip format is as simple as possible (but not simpler). The 25 lzip manual provides the source code of a simple decompressor along 26 with a detailed explanation of how it works, so that with the only 27 help of the lzip manual it would be possible for a digital 28 archaeologist to extract the data from a lzip file long after 29 quantum computers eventually render LZMA obsolete. 30 31 * Additionally the lzip reference implementation is copylefted, which 32 guarantees that it will remain free forever. 33 34A nice feature of the lzip format is that a corrupt byte is easier to 35repair the nearer it is from the beginning of the file. Therefore, with 36the help of lziprecover, losing an entire archive just because of a 37corrupt byte near the beginning is a thing of the past. 38 39Clzip uses the same well-defined exit status values used by lzip and 40bzip2, which makes it safer than compressors returning ambiguous warning 41values (like gzip) when it is used as a back end for other programs like 42tar or zutils. 43 44Clzip will automatically use the smallest possible dictionary size for 45each file without exceeding the given limit. Keep in mind that the 46decompression memory requirement is affected at compression time by the 47choice of dictionary size limit. 48 49The amount of memory required for compression is about 1 or 2 times the 50dictionary size limit (1 if input file size is less than dictionary size 51limit, else 2) plus 9 times the dictionary size really used. The option 52'-0' is special and only requires about 1.5 MiB at most. The amount of 53memory required for decompression is about 46 kB larger than the 54dictionary size really used. 55 56When compressing, clzip replaces every file given in the command line 57with a compressed version of itself, with the name "original_name.lz". 58When decompressing, clzip attempts to guess the name for the decompressed 59file from that of the compressed file as follows: 60 61filename.lz becomes filename 62filename.tlz becomes filename.tar 63anyothername becomes anyothername.out 64 65(De)compressing a file is much like copying or moving it; therefore clzip 66preserves the access and modification dates, permissions, and, when 67possible, ownership of the file just as "cp -p" does. (If the user ID or 68the group ID can't be duplicated, the file permission bits S_ISUID and 69S_ISGID are cleared). 70 71Clzip is able to read from some types of non regular files if the 72"--stdout" option is specified. 73 74If no file names are specified, clzip compresses (or decompresses) from 75standard input to standard output. In this case, clzip will decline to 76write compressed output to a terminal, as this would be entirely 77incomprehensible and therefore pointless. 78 79Clzip will correctly decompress a file which is the concatenation of two 80or more compressed files. The result is the concatenation of the 81corresponding uncompressed files. Integrity testing of concatenated 82compressed files is also supported. 83 84Clzip can produce multimember files, and lziprecover can safely recover 85the undamaged members in case of file damage. Clzip can also split the 86compressed output in volumes of a given size, even when reading from 87standard input. This allows the direct creation of multivolume 88compressed tar archives. 89 90Clzip is able to compress and decompress streams of unlimited size by 91automatically creating multimember output. The members so created are 92large, about 2 PiB each. 93 94In spite of its name (Lempel-Ziv-Markov chain-Algorithm), LZMA is not a 95concrete algorithm; it is more like "any algorithm using the LZMA coding 96scheme". For example, the option '-0' of lzip uses the scheme in almost 97the simplest way possible; issuing the longest match it can find, or a 98literal byte if it can't find a match. Inversely, a much more elaborated 99way of finding coding sequences of minimum size than the one currently 100used by lzip could be developed, and the resulting sequence could also 101be coded using the LZMA coding scheme. 102 103Clzip currently implements two variants of the LZMA algorithm; fast 104(used by option '-0') and normal (used by all other compression levels). 105 106The high compression of LZMA comes from combining two basic, well-proven 107compression ideas: sliding dictionaries (LZ77/78) and markov models (the 108thing used by every compression algorithm that uses a range encoder or 109similar order-0 entropy coder as its last stage) with segregation of 110contexts according to what the bits are used for. 111 112The ideas embodied in clzip are due to (at least) the following people: 113Abraham Lempel and Jacob Ziv (for the LZ algorithm), Andrey Markov (for 114the definition of Markov chains), G.N.N. Martin (for the definition of 115range encoding), Igor Pavlov (for putting all the above together in 116LZMA), and Julian Seward (for bzip2's CLI). 117 118 119Copyright (C) 2010-2017 Antonio Diaz Diaz. 120 121This file is free documentation: you have unlimited permission to copy, 122distribute and modify it. 123 124The file Makefile.in is a data file used by configure to produce the 125Makefile. It has the same copyright owner and permissions that configure 126itself. 127