
Source code for a program that translates DMD bitmaps (as produced by dmdps) or
files written in the Ninth Edition bitfile(9.5) format into PostScript. Much of
the code came from abm, which was written by Guy Riddle.

By default 6 byte patterns are used, but any number can be selected with the -b
option. 6 byte patterns are a tradeoff that achieves a good (but not necessarily
optimal) performance across the wide variety of currently available PostScript
printers. Decreasing the pattern size often helps some on printers with fast
processors (eg. PS-810s) while increasing the pattern size speeds things up on
older printers (eg. PS-800s). In the limited number of tests I ran -b10 worked
best on PS800s and -b4 gave the best performance on PS-810s. If you want a
different default pattern size change the initialization of bytespp (near line
117 in postdmd.c) before you compile the program.

Bitmaps are unpacked, a scanline at a time, and re-encoded in a format that looks
like,

	bytes patterns count

where bytes and count are decimal integers and patterns is a series of hex digits.
Bytes is the number of bytes represented by the hex pattern, while count is the
number of additional times the pattern should be repeated. For example,

	2 FFFF 4
	5 FFFFFFFFFF 1
       10 FFFFFFFFFFFFFFFFFFFF 0

all represent 10 consecutive bytes of ones. Scanlines are terminated by a 0 on
a line by itself. The new encoding wastes some space, but is relatively easy to
unpack when the bitmap finally gets to the printer.

