RFC 2159 (rfc2159) - Page 3 of 7


A MIME Body Part for FAX



Alternative Format: Original Text Document



RFC 2159                 MIME Body Part for FAX             January 1998


   It is possible (but misleading) to view the representation of these
   values as single-bit flags. They correspond to the following bits of
   the T.30 control string and X.400 G3FacsimileParameters:

       Parameter               T.30 bit        X.400 bit

       page-length=A4             no bit set
       page-length=B4          19              21
       page-length=Unlimited   20              20

       page-width=A4              no bit set
       page-width=A3           18              22
       page-width=B4           17              23

       encoding=1-dimensional     no bit set
       encoding=2-dimensional  16              8
       encoding=Uncompressed   26              30

       resolution=Coarse          no bit set
       resolution=Fine         15              9

   The reason for the different bit numbers is that X.400 counts bits in
   an octet from the MSB down to the LSB, while T.30 uses the opposite
   numbering scheme.

   If any bit but these are set in the Device Control String, the DCS
   parameter should be supplied.

2.2.  Content Encoding

   X.400 defines the g3-facsimile data stream as a SEQUENCE of BIT
   STRINGs. Each BIT STRING is a page of facsimile image data, encoded
   as defined by Recommendation T.4.  The following content encoding is
   reversible between MIME and X.400 and ensures that page breaks are
   honored in the MIME representation.

   An EOL is defined as a bit sequence of

       000000000001 (eleven zeroes and a one).


   Each page of the message is delimited by a sequence of six (6) EOLs
   that MUST start on a byte boundary.  The image bit stream is padded
   with zeroes as needed to achieve this alignment.

   Searching for the boundary is a matter of searching for the byte
   sequence (HEX) 00 10 01 00 10 01 00 10 01, which cannot occur inside
   the image.



Alvestrand                  Standards Track