![]() ![]() The amount of compression obtained depends on the size of the input, the number of bits per code, and the distribution of common substrings. ![]() However, if the compression ratio decreases, compress discards the table of substrings and rebuilds it from scratch, which allows the algorithm to adapt to the next "block" of the file. If it is increasing, compress continues to use the existing code dictionary. When code 512 is reached, the algorithm switches to 10-bit codes and continues to use more bits until the limit specified by the -b option or its default is reached.Īfter the limit is reached, compress periodically checks the compression ratio. Common substrings in the file are first replaced by 9-bit codes 257 and up. The compress utility uses a modified Lempel-Ziv algorithm. If either the input and output files are not regular files, the checks for reduction in size and file overwriting are not performed, the input file is not removed, and the attributes of the input file are not retained in the output file. If no files are specified or a file argument is a single dash (' -'), the standard input is compressed to the standard output. If compression would not reduce the size of a file, the file is ignored.Īs many of the modification time, access time, file flags, file mode, user ID, and group ID as allowed by permissions are retained in the new file. Z extension is ignored except it causes an error exit after other arguments are processed. Each file is renamed to the same name plus the extension. The compress utility reduces the size of files using adaptive Lempel- Ziv coding. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |