mgtic(1)

NAME
mgtic - textual image compression.

SYNOPSIS
mgtic -e [ -L ] [ -Q ] [ -X ] libraryfile infile
[ >compressed-outfile ]
or
mgtic -d [ -L ] [ -X libraryfile ] compressed-infile
[ >outfile ]

DESCRIPTION
This is the main routine in the mgtic system. mgtic is used to processes a series of files, and by using the libraryfile produced by mgticbuild(1), compresses input files with respect to the marks contained in the library. On the CCITT test faxes, lossless mode achieved around 20:1 compression, and lossy, around 40:1 compression. On more textual images, the amount of compression is determined by the resolution of the original file, and the amount of noise in the image. By default, mgtic will reconstruct a lossy version of the image. This can be changed to lossless by using the -L option.

OPTIONS
Options may appear in any order, but must come before the input filenames.

-h  This displays a usage line on stderr.

-e  Encode infile with respect to the library.

-d  Decodes compressed-infile with respect to the library.

-l  This specifies lossy mode, and is the default mode for (de)compression. Do not generate the residue. If used in encoding mode, does not store the residue in the output. If used in decoding mode, the residue (if it exists) is ignored.

-L  Use lossless mode for (de)compression, which generates the residue. If used in encoding mode, this stores the residue in the compressed output. If used in decoding mode (assuming the residue is present), this allows the original file to be recovered exactly.

-R filename
    Stores the residue as an external file filename which could possibly be stored on another medium. During decompression, if the residue file specified does not relate to the compressed file, the resulting decompressed image will be a mess. Note that only the width and height of the residue image is checked.

-Q  Uses a quicker form of compression. This option decreases the time spent looking for a good match during encoding. On average this option decreases compression ratios, but increases compression speed.

-X [libraryfile]
    Use an external library file, instead of (de)compressing the library within the normal stream. When decoding, the -X option must be followed by the libraryfile.

SEE ALSO
mg(1), mg_compression_dict(1), mg_fast_comp_dict(1), mg_get(1), mg_invf_dict(1), mg_invf_dump(1), mg_invf_rebuild(1), mg_passes(1), mg_perf_hash_build(1), mg_text_estimate(1), mg_weights_build(1), mgbilevel(1), mgbuild(1), mgdictlist(1), mgfelics(1), mgquery(1), mgstat(1), mgticbuild(1), mgticdump(1), mgticprune(1), mgticstat(1).