ncompress  5.0
About: (N)compress is an improved version of compress 4.1. Compress is a fast, simple LZW file compressor (but has a relatively low compression rate).
  Fossies Dox: ncompress-5.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

ncompress Documentation

Some Fossies usage hints in advance:

  1. To see the Doxygen generated documentation please click on one of the items in the steelblue colored "quick index" bar above or use the side panel at the left which displays a hierarchical tree-like index structure and is adjustable in width.
  2. If you want to search for something by keyword rather than browse for it you can use the client side search facility (using Javascript and DHTML) that provides live searching, i.e. the search results are presented and adapted as you type in the Search input field at the top right.
  3. Doxygen doesn't incorporate all member files but just a definable subset (basically the main project source code files that are written in a supported language). So to search and browse all member files you may visit the Fossies ncompress-5.0.tar.gz contents page and use the Fossies standard member browsing features (also with source code highlighting and additionally with optional code folding).
README.md

About

This is (N)compress. It is an improved version of compress 4.1.

Compress is a fast, simple LZW file compressor. Compress does not have the highest compression rate, but it is one of the fastest programs to compress data. Compress is the defacto standard in the UNIX community for compressing files.

(N)compress 4.2 introduced a special, fast compression hash algorithm. This algorithm uses more memory than the old hash table. If you don't want the faster hash table algorithm set 'Memory free for compress' below 800000.

Starting with compress 3.0, the output format changed in a backwards incompatible way. This is not a big deal as compress 3.0 was first released in Jan 1985, while the first release of compress was available less than a year prior. There shouldn't be any need to produce files that only older versions of compress would accept.

Newer versions of compress are still able to handle the output of older versions though -- i.e. compress 3.0+ is able to decompress files produced by compress 2.0 and older.

Building

For recent systems with GNU make, you can simply run make as the default 'GNUMakefile' will get picked up.

'build' is a menu driven shell script for compiling, testing and installing (N)compress. So to build and install (N)compress all you have to do is run build. Build will first test your system for default settings. The current compile settings are stored in a special file called compress.def.

For user with problems with build there is a default makefile included called 'Makefile.def'. Also build is capable of generating a Makefile with all options (option genmake).

Support

Build Status

Send comments, complaints and especially patches relating to https://github.com/vapier/ncompress/issues

Licensing

The ncompress code is released into the public domain. See the UNLICENSE file for more details.

Patents

All existing patents on the LZW algorithm have expired world-wide. So LZW is now patent free.

Remarks

  • Build is a bourne shell script. On some system it is necessary to type 'sh build'.

  • The build script usages tput for nice screen handling of the script. If your system has no tput no problems.

  • For configuration testing build uses a lot of small C programs. During those test stderr is redirected to /dev/null. During the compilation of compress output is NOT redirected.

  • The /bin/sh under Ultrix can't handle ${var:-str} so use ksh for the build script.

  • The output of (N)compress 4.2+ is not exactly the same as compress 4.0 because of different table reset point. The output of (N)compress 4.2+ is 100% compatible with compress 4.0.

  • Some systems has performance problems with reads bigger than BUFSIZ (The read a head function is not working as expected). For those system use the default BSIZE input buffer size.

  • compress can be slower on small files (<10Kb) because of a great table reset overhead. Use cpio or tar to make 1 bigger file if possible, it is faster and also gives a better compression ratio most of the time.

  • files compressed on a large machine with more bits than allowed by a version of compress on a smaller machine cannot be decompressed! Use the "-b12" flag to generate a file on a large machine that can be uncompressed on a 16-bit machine.