home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / xbin23.zip / BINHEX4.INF next >
Text File  |  1989-09-09  |  2KB  |  56 lines

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