Table of Contents NAME mgfelics - fast and efficient lossless image (de)compression ...
Table of Contents


mgfelics - fast and efficient lossless image (de)compression


mgfelics -e [ -k n ] infile [ >compressed-outfile ] or
mgfelics -d compressed-infile [ >outfile ]


mgfelics is a lossless compression process which can (de)compress portable bitmap files in pgm format. mgfelics writes to stdout.


-k n An integer parameter (< 32) which controls the compression speed and ratio. The value of n is included in the output stream, and therefore is not needed in the decompression stage. The default value of n is equal to the number of bits required to represent each grey level.

Encodes the file infile, sending the output to stdout.

Decodes the file from compressed-infile, sending the output to stdout.


mgfelics uses a combination of adjusted binary and Rice codes, the choice of which for any given pixel depends on the environment as determined by the intensity values of neighbouring pixels. The result is a very fast and lossless algorithm for compressing grayscale images. The optional parameter -k n corresponds to the maximum exponent of the same name in Rice encoding. Smaller values of -k n can result in significant improvement in compression times with a corresponding loss in compression ratio. However the reduction in compression ratio with a small -k n parameter may be insignificant for many images.


Algorithm by Paul G. Howard and Jeffrey Scott Vitter of Brown University, RI, and Duke University, NC, respectively.


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), mgquery(1), mgstat(1), mgtic(1), mgticbuild(1), mgticdump(1), mgticprune(1), mgticstat(1).

Table of Contents