ZMNG is a simple compression utility for .MNG files.

It's able to read the MNG file generated by AdvanceMAME and to compress
them using the Delta and Move MNG features.

Please note that the ZMNG utility is not able to read a generic MNG file.

The delta optimization is always active and it can compress video clips
with only small changes between frames.
The scroll optimization is used only on request (option "-s NxN") and it can
compress video clips with a scrolling background.

The syntax of the utility is :

	zmng [-N] [-s NxN] [-r] SOURCE.mng DEST.mng

The "-s NxN" option specifies the size of the pattern (width x height) used to
check for a scrolling background. The size is expressed in pixel and it must
be bigger or equal than the scrolling speed of the background.

For example take the game 1942 that scroll vertically by 1 pixel every frame.
If you recorded with an interleave factor of 2 the vertical scrolling speed
is 1*2 = 2. In this case the minimun pattern is "-s 0x2".

Generally you can use "-s 4x4" and use bigger value only for games scrolling
faster. If the game scroll only horizontally or vertically you can speed up a
lot the compression with the monodirectional patterns "-s 8x0" or "-s 0x8".

The -r option enable the color reduction from 24 bit to 8 bit. The compression
will fail if exists a frame with more than 256 colors.

The -N option specifies the compression level. -0 no compression, -1 low,
-6 default, -9 high.

