home *** CD-ROM | disk | FTP | other *** search
/ Best Objectech Shareware Selections / UNTITLED.iso / boss / util / comp / 011 / technote.doc < prev    next >
Encoding:
Text File  |  1991-05-30  |  3.8 KB  |  113 lines

  1.  
  2.      ARJ TECHNICAL INFORMATION                     May 1991
  3.  
  4.  
  5.      ** IMPORTANT NEWS ****************************************************
  6.  
  7.      There is an extended header bug in older versions of ARJ, AV.C and
  8.      UNARJ.C.  The extended header processing in read_header() should
  9.      skip 4 bytes for the extended header CRC and not 2.  This is NOT a
  10.      current problem as no versions of ARJ use the extended header.
  11.  
  12.      **********************************************************************
  13.  
  14.  
  15.      Modification history:
  16.      Date      Description of modification:
  17.      --------  ------------------------------------------------------
  18.      05/19/91  Improved the description of extended header processing.
  19.      05/11/91  Simplified this document.  Added volume label type.
  20.      03/11/91  Added directory file type.
  21.      02/23/91  Added more comments.
  22.      01/10/91  Corrected timestamp description and header order of file mode.
  23.      10/30/90  Corrected values of flags in ARJ flags.
  24.  
  25.  
  26.      ARJ archives contains two types of header blocks:
  27.  
  28.     Archive main header - This is located at the head of the archive
  29.     Local file header   - This is located before each archived file
  30.  
  31.      Structure of archive block (low order byte first):
  32.  
  33.      Bytes Description
  34.      ----- -------------------------------------------------------------------
  35.        2   header id (main and local file) = 0xEA60 or 60000U
  36.        2   basic header size (from 'first_hdr_size' thru 'comment' below)
  37.          = first_hdr_size + strlen(filename) + 1 + strlen(comment) + 1
  38.          = 0 if end of archive
  39.  
  40.        1   first_hdr_size (size up to and including 'extra data')
  41.        1   archiver version number
  42.        1   minimum archiver version to extract
  43.        1   host OS   (0 = MSDOS, 1 = PRIMOS, 2 = UNIX, 3 = AMIGA, 4 = MACDOS)
  44.        1   arj flags (0x01 = GARBLED_FLAG) indicates passworded file
  45.              (0x02 = RESERVED)
  46.              (0x04 = VOLUME_FLAG)  indicates continued file to next
  47.                        volume
  48.              (0x08 = EXTFILE_FLAG) indicates file starting position
  49.                        field
  50.              (0x10 = PATHSYM_FLAG) indicates path translated
  51.                        ("\" changed to "/")
  52.        1   method    (0 = stored, 1 = compressed most ... 4 compressed fastest)
  53.        1   file type (0 = binary, 1 = 7-bit text, 2 = comment header)
  54.              (3 = directory, 4 = volume label)
  55.        1   reserved
  56.        4   date time modified
  57.        4   compressed size
  58.        4   original size (this will be different for text mode compression)
  59.        4   original file's CRC
  60.        2   filespec position in filename
  61.        2   file access mode
  62.        2   host data (currently not used)
  63.        ?   extra data
  64.        4 bytes for extended file starting position when used
  65.        (this is present when EXTFILE_FLAG is set)
  66.  
  67.        ?   filename (null-terminated string)
  68.        ?   comment  (null-terminated string)
  69.  
  70.        4   basic header CRC
  71.  
  72.        2   1st extended header size (0 if none)
  73.        ?   1st extended header (currently not used)
  74.        4   1st extended header's CRC (not present when 0 extended header size)
  75.  
  76.        ...
  77.  
  78.        ?   compressed file
  79.  
  80.  
  81.      Time stamp format:
  82.  
  83.     31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
  84.        |<---- year-1980 --->|<- month ->|<--- day ---->|
  85.  
  86.     15 14 13 12 11 10  9  8  7  6  5  4  3    2  1  0
  87.        |<--- hour --->|<---- minute --->|<- second/2 ->|
  88.  
  89.  
  90.  
  91.      Compression methods:
  92.  
  93.  
  94.      ARJ methods 1 to 3 use Lempel-Ziv 77 sliding window with static Huffman
  95.      encoding.
  96.  
  97.      ARJ method 4 uses Lempel-Ziv 77 sliding window with pointer/length
  98.      unary encoding.
  99.  
  100.      There is one decoder for methods 1 to 3 and one decoder for method 4.
  101.  
  102.  
  103.  
  104.      Encryption technology:
  105.  
  106.  
  107.      ARJ does NOT use DES encryption algorithms.  It uses a combination of
  108.      simple exclusive-or operations.
  109.  
  110.  
  111.      end of document
  112.  
  113.