home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / utils / arj.zip / TECHNOTE.DOC < prev    next >
Text File  |  1990-12-28  |  4KB  |  126 lines

  1.  
  2.     ARJ TECHNICAL INFORMATION                       December 1990
  3.  
  4.  
  5.     Modification history:
  6.     Date      Description of modification:
  7.     10/30/90  Corrected values of flags in ARJ flags.
  8.  
  9.  
  10.     ARJ archives contains two types of header blocks:
  11.  
  12.        Archive main header - This is located at the head of the archive
  13.        Local file header   - This is located before each archived file
  14.  
  15.     Structure of archive block (low order byte first):
  16.  
  17.     Bytes Descrition
  18.     ----- -------------------------------------------------------------------
  19.       2   header id (main and local file) = 0xEA60 or 60000U
  20.       2   basic header size (from 'first_hdr_size' thru 'comment' below)
  21.                 = first_hdr_size + strlen(filename) + 1 + strlen(comment) + 1
  22.                 = 0 if end of archive
  23.  
  24.       1   first_hdr_size (size up to and including 'extra data')
  25.       1   archiver version number
  26.       1   minimum archiver version to extract
  27.       1   host OS   (0 = MSDOS, 1 = PRIMOS, 2 = UNIX, 3 = AMIGA, 4 = MACDOS)
  28.       1   ARJ flags (0x01 = GARBLED_FLAG, 0x02 RESERVED)
  29.                     (0x04 = VOLUME_FLAG,  0x08 = EXTFILE_FLAG)
  30.                     (0x10 = PATHSYM_FLAG)
  31.       1   method    (0 = stored, 1 = compressed most ... 4 compressed fastest)
  32.       1   file type (0 = binary, 1 = text, 2 = main header)
  33.       1   reserved
  34.       4   date time stamp modified
  35.       4   compressed size
  36.       4   original size
  37.       4   original file's CRC
  38.       2   file access mode
  39.       2   entryname position in filename
  40.       2   host data
  41.       ?   extra data
  42.           4 bytes for extended file position when used
  43.  
  44.       ?   filename (null-terminated)
  45.       ?   comment  (null-terminated)
  46.  
  47.       4   basic header CRC
  48.  
  49.       2   1st extended header size (0 if none)
  50.       ?   1st extended header
  51.       4   1st extended header's CRC
  52.       ...
  53.       ?   compressed file
  54.  
  55.  
  56.     Time stamp format:
  57.  
  58.        31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
  59.       |<----- year-1980 ----->|<- month ->|<-- day -->|
  60.  
  61.        15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
  62.       |<--- hour --->|<---- minute --->|<- second/2 ->|
  63.  
  64.  
  65.  
  66.     Compression methods:
  67.  
  68.  
  69.     ARJ methods 1 to 3 use Lempel-Ziv 77 sliding window with static Huffman
  70.     encoding.
  71.  
  72.     ARJ method 4 uses Lempel-Ziv 77 sliding window with pointer/length
  73.     unary encoding.  Node insertion is done for each literal and at the
  74.     beginning of encoded phrases.
  75.  
  76.     There is one decoder for methods 1 to 3 and one decoder for method 4.
  77.  
  78.  
  79.  
  80.     Encryption technology:
  81.  
  82.  
  83.     ARJ does NOT use DES encryption algorithms.  It uses a combination of
  84.     simple exclusive-or operations.
  85.  
  86.  
  87.  
  88.     Source code description:
  89.  
  90.  
  91.     ARJ is written in ANSI C using only ANSI C library calls.  All machine
  92.     dependent routines are located in an environment module. Simplified
  93.     versions allow porting to other operating systems with some loss of
  94.     functionality.  The current version has been compiled with TURBO C++
  95.     1.0.
  96.  
  97.     Data is stored in low-byte order first and read back the same way to
  98.     avoid the "endia" issue.
  99.  
  100.  
  101.     The environment routines are:
  102.  
  103.     case_path()       Uppercase pathname if case is not significant for OS
  104.     file_exists()     Check for file existence
  105.     fix_path()        Clean up file pathname (remove drive and root)
  106.     get_archive()     Get state of archive bit
  107.     get_disk_avail()  Get disk space availability
  108.     get_fsize()       Get file size (return -1 if getting size is too
  109.                       expensive)
  110.     get_ftime()       Get file date-time modified
  111.     get_fmode()       Get file access mode
  112.     get_mode_str()    Convert access mode to displayable text (A--W)
  113.     match_wild()      Provide filename component matching
  114.     reset_archive()   Reset archive bit
  115.     set_fmode()       Set file access mode
  116.     set_ftime()       Set file date-time modified
  117.     set_stream()      Set stream file translation mode.
  118.     test_ftype()      Test the output file type for valid flat file
  119.     test_dir()        Test if file path exist.  If not, create it with
  120.                       permission.
  121.     wild_list()       Expand wildnames and recurse subdirectories if necessary
  122.  
  123.  
  124.     end of document
  125.  
  126.