home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / GNUNARJ.ZIP / TECHNOTE.DOC < prev    next >
Text File  |  1992-06-02  |  7KB  |  176 lines

  1.  
  2.      ARJ TECHNICAL INFORMATION                             January 1992
  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.      12/03/91  Added BACKUP flag to header arj flags.
  19.      11/21/91  Described the two types of headers separately.
  20.      11/11/91  Added information about the change in text mode processing.
  21.      06/28/91  Added several new HOST OS numbers.
  22.      05/19/91  Improved the description of extended header processing.
  23.      05/11/91  Simplified this document.  Added volume label type.
  24.      03/11/91  Added directory file type.
  25.      02/23/91  Added more comments.
  26.      01/10/91  Corrected timestamp description and header order of file mode.
  27.      10/30/90  Corrected values of flags in ARJ flags.
  28.  
  29.  
  30.      ARJ archives contains two types of header blocks:
  31.  
  32.     Archive main header - This is located at the head of the archive
  33.     Local file header   - This is located before each archived file
  34.  
  35.      Structure of main header (low order byte first):
  36.  
  37.      Bytes Description
  38.      ----- -------------------------------------------------------------------
  39.        2   header id (main and local file) = 0xEA60 or 60000U
  40.        2   basic header size (from 'first_hdr_size' thru 'comment' below)
  41.          = first_hdr_size + strlen(filename) + 1 + strlen(comment) + 1
  42.          = 0 if end of archive
  43.  
  44.        1   first_hdr_size (size up to and including 'extra data')
  45.        1   archiver version number
  46.        1   minimum archiver version to extract
  47.        1   host OS   (0 = MSDOS, 1 = PRIMOS, 2 = UNIX, 3 = AMIGA, 4 = MAC-OS)
  48.              (5 = OS/2, 6 = APPLE GS, 7 = ATARI ST, 8 = NEXT)
  49.              (9 = VAX VMS)
  50.        1   arj flags
  51.                      (0x01 = NOT USED)
  52.                      (0x02 = RESERVED)
  53.                      (0x04 = VOLUME_FLAG)  indicates presence of succeeding
  54.                        volume
  55.                      (0x08 = NOT USED)
  56.                      (0x10 = PATHSYM_FLAG) indicates archive name translated
  57.                        ("\" changed to "/")
  58.                      (0x20 = BACKUP_FLAG) indicates backup type archive
  59.        1   reserved
  60.        1   file type (2 = comment header)
  61.        1   reserved
  62.        4   date time when original archive was created
  63.        4   reserved
  64.        4   reserved
  65.        4   reserved
  66.        2   filespec position in filename
  67.        2   (currently not used)
  68.        2   (currently not used)
  69.        ?   (currently none)
  70.  
  71.        ?   filename of archive when created (null-terminated string)
  72.        ?   archive comment  (null-terminated string)
  73.  
  74.        4   basic header CRC
  75.  
  76.        2   1st extended header size (0 if none)
  77.        ?   1st extended header (currently not used)
  78.        4   1st extended header's CRC (not present when 0 extended header size)
  79.  
  80.  
  81.      Structure of local file header (low order byte first):
  82.  
  83.      Bytes Description
  84.      ----- -------------------------------------------------------------------
  85.        2   header id (main and local file) = 0xEA60 or 60000U
  86.        2   basic header size (from 'first_hdr_size' thru 'comment' below)
  87.          = first_hdr_size + strlen(filename) + 1 + strlen(comment) + 1
  88.          = 0 if end of archive
  89.  
  90.        1   first_hdr_size (size up to and including 'extra data')
  91.        1   archiver version number
  92.        1   minimum archiver version to extract
  93.        1   host OS   (0 = MSDOS, 1 = PRIMOS, 2 = UNIX, 3 = AMIGA, 4 = MAC-OS)
  94.              (5 = OS/2, 6 = APPLE GS, 7 = ATARI ST, 8 = NEXT)
  95.              (9 = VAX VMS)
  96.        1   arj flags (0x01 = GARBLED_FLAG) indicates passworded file
  97.              (0x02 = RESERVED)
  98.              (0x04 = VOLUME_FLAG)  indicates continued file to next
  99.                                            volume (file is split)
  100.              (0x08 = EXTFILE_FLAG) indicates file starting position
  101.                                            field (for split files)
  102.                      (0x10 = PATHSYM_FLAG) indicates filename translated
  103.                        ("\" changed to "/")
  104.                      (0x20 = BACKUP_FLAG)  indicates file marked as backup
  105.        1   method    (0 = stored, 1 = compressed most ... 4 compressed fastest)
  106.        1   file type (0 = binary, 1 = 7-bit text)
  107.              (3 = directory, 4 = volume label)
  108.        1   reserved
  109.        4   date time modified
  110.        4   compressed size
  111.        4   original size (this will be different for text mode compression)
  112.        4   original file's CRC
  113.        2   filespec position in filename
  114.        2   file access mode
  115.        2   host data (currently not used)
  116.        ?   extra data
  117.        4 bytes for extended file starting position when used
  118.        (this is present when EXTFILE_FLAG is set)
  119.  
  120.        ?   filename (null-terminated string)
  121.        ?   comment  (null-terminated string)
  122.  
  123.        4   basic header CRC
  124.  
  125.        2   1st extended header size (0 if none)
  126.        ?   1st extended header (currently not used)
  127.        4   1st extended header's CRC (not present when 0 extended header size)
  128.  
  129.        ...
  130.  
  131.        ?   compressed file
  132.  
  133.  
  134.      Time stamp format:
  135.  
  136.     31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
  137.        |<---- year-1980 --->|<- month ->|<--- day ---->|
  138.  
  139.     15 14 13 12 11 10  9  8  7  6  5  4  3    2  1  0
  140.        |<--- hour --->|<---- minute --->|<- second/2 ->|
  141.  
  142.  
  143.  
  144.      Compression methods:
  145.  
  146.  
  147.      ARJ methods 1 to 3 use Lempel-Ziv 77 sliding window with static Huffman
  148.      encoding.
  149.  
  150.      ARJ method 4 uses Lempel-Ziv 77 sliding window with pointer/length
  151.      unary encoding.
  152.  
  153.      There is one decoder for methods 1 to 3 and one decoder for method 4.
  154.  
  155.  
  156.  
  157.      Encryption technology:
  158.  
  159.  
  160.      ARJ does NOT use DES encryption algorithms.  It uses a combination of
  161.      simple exclusive-or operations.
  162.  
  163.  
  164.  
  165.      Text mode processing:
  166.  
  167.      As of ARJ 2.30 and UNARJ 2.30, files archived with the -t1 option
  168.      will not have the 8th bit stripped unless the file is extracted to
  169.      a different platform than the original one.  Therefore, it is now
  170.      possible to use ARJ to compress 8-bit text files in text mode and
  171.      extract them back in 8-bit mode.
  172.  
  173.  
  174.      end of document
  175.  
  176.