home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / misc / document / hqxforma.txt < prev    next >
Text File  |  1992-11-05  |  2KB  |  44 lines

  1.  Mainstay                                         4/11/85      Yves Lempereur
  2.  Macintosh 7 & 8 bit File Transfer Format - Protocol Independent
  3.  Here is a description of the Hqx7 (7 bit format as implemented in BinHex
  4.  4.0) and Hqx8 (8 bit format) formats for Macintosh Application and File
  5.  transfers. The main features of the formats are:
  6.  1) Error checking even using ASCII download (Hqx7 & Hqx8)
  7.  2) Compression of repetitive characters     (Hqx7 & Hqx8)
  8.  3) 7 bit encoding for ASCII download        (Hqx7)
  9.  HQX Format Description (This is not intended to be a programmer's reference).
  10.  The format is processed at three different levels:
  11.  1) 8 bit encoding of the file:
  12.       Byte:      Length of FileName (1->63)
  13.       Bytes:     FileName ("Length" bytes)
  14.       Byte:      Version
  15.       Long:      Type
  16.       Long:      Creator
  17.       Word:      Flags (And $F800)
  18.       Long:      Length of Data Fork
  19.       Long:      Length of Resource Fork
  20.       Word:      CRC
  21.       Bytes:     Data Fork ("Data Length" bytes)
  22.       Word:      CRC
  23.       Bytes:     Resource Fork ("Rsrc Length" bytes)
  24.       Word:      CRC
  25.  2) Compression of repetitive characters.
  26.       ($90 is the marker, encoding is made for 3->255 characters)
  27.  
  28.       00 11 22 33 44 55 66 77      ->      00 11 22 33 44 55 66 77
  29.       11 22 22 22 22 22 22 33      ->      11 22 90 06 33
  30.       11 22 90 33 44               ->      11 22 90 00 33 44
  31.  3) 7 bit encoding (Hqx7 only).
  32.     The whole file is considered as a stream of bits. This stream will
  33.     be divided in blocks of 6 bits and then converted to one of 64
  34.     characters contained in a table. The characters in this table have
  35.     been chosen for maximum noise protection.
  36.     The format will start with a ":" (first character on a line) and
  37.     end with a ":". There will be a maximum of 64 characters on a line.
  38.     It can be preceeded by comments for novice users.
  39.     Table:
  40.     !"#$%&'()*+,-012345689@ABCDEFGHIJKLMNPQRSTUVXYZ[`abcdefhijklmpqr
  41.     Comment:
  42.     (This file must be converted with BinHex 4.0)
  43.                                         Yves Lempereur [74016,1741]
  44.