Alternative Data Compression Scheme for ~DG and ~DB Commands
Alternative Data Compression Scheme for ~DG and ~DB Commands

Alternative Data Compression Scheme for ~DG and ~DB Commands

There is an alternative data compression scheme recognized by the Zebra printer. This scheme further reduces the actual number of data bytes and the amount of time required to download graphic images and bitmapped fonts with the
~DG
and
~DB
commands.
The following represent the repeat counts 1, 2, 3, 4, 5, ...., 19 on a subsequent Hexadecimal value. Values start with G since 0 through 9 and A through F are already used for HEX values.)
These numbers represent the repeat counts 20, 40, 60, 80,....400 on a subsequent hexadecimal value.
Sending
M6
to the printer is identical to sending the following hexadecimal data:
6666666
The M has the value of 7. Therefore
M6
sends seven (7) hexadecimal 6’s.
Sending
hB
to the printer is identical to sending the following hexadecimal data:
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
The h has a value of 40. Therefore,
hB
sends 40 Hexadecimal B’s.
Repeat Values
Several repeat values can be used together to achieve any desired value.
Several repeat values can be used together to achieve any value desired. vMB or MvB will send 327 hexadecimal B’s to the printer.
  • a comma (,) fills the line, to the right, with zeros (0) until the specified line byte is filled.
  • an exclamation mark (!) fills the line, to the right, with ones (1) until the specified line byte is filled.
  • a colon (:) denotes repetition of the previous line.