Skip to main content

Appendix B. Data Compression

When message-bags are shipped between MPMs the data should be compressed according to the following scheme:

shipping-unit := compression-type message-bag

compression-type := A one octet compression type indicator.

compression-type value description
---------------------- -----------
0 no compression used
1 basic compression

basic compression​

This basic compression procedure is the same as that defined for use with the ARPANET FTP [8]. Three types of compression-units may be formed, sequence-units, replication-units, and filler-units. The data is formed into a series of compression-units independent of the structure or object and element boundaries.

sequence-unit​

A sequence-unit is a one octet flag and count followed by that many data octets.

+-+-------+--------+--------+----
!0! n ! n data octets ...
+-+-------+--------+--------+----

The flag and count octet has its high order bit zero and the remaining bits indicate the count (in the range 0 to 127) of following data octets.

replication-unit​

A replication-unit is a one octet flag and count followed by one data octet, which is to be replicated count times.

+--+------+--------+
!10! n ! data !
+--+------+--------+

The flag and count octet has its high order two bits equal one-zero and the remaining six bits indicate the count (in the range 0 to 63) of number of time to replicate the data octet.

filler-unit​

A filler-unit is a one octet flag and count, indicating that a filler octet is to be inserted count times.

+--+------+
!11! n !
+--+------+

The flag and count octet has its high order two bits equal one-one and the remaining six bits indicate the count (in the range 0 to 63) of number of time to insert the filler octet.

The filler octet is zero, the octet with all bits zero.