home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 September / Chip_2000-09_cd1.bin / sharewar / Slunec / app / 16 / ARCHIVES.SWG / 0005_HA.pas < prev    next >
Pascal/Delphi Source File  |  1996-09-03  |  2KB  |  56 lines

  1. --------A-HA--------------------------------
  2.  
  3. HA  files (not to be confused with  HamarSoft's HAP files [3]) contain a
  4. small  archive  header with a word count  of  the number of files in the
  5. archive.  The  constituent  files  stored  sequentially  with  a  header
  6. followed by the compressed data, as is with most archives.
  7.  
  8. The main file header is formatted as follows:
  9. OFFSET              Count TYPE   Description
  10. 0000h                   2 char   ID='HA'
  11. 0002h                   1 word   Number of files in archive
  12.  
  13. Every compressed file has a header before it, like this :
  14.  
  15. OFFSET              Count TYPE   Description
  16. 0000h                   1 byte   Version & compression type
  17. 0001h                   1 dword  Compressed file size
  18. 0005h                   1 dword  Original file size
  19. 0009h                   1 dword  CCITT CRC-32 (same as ZModem/PkZIP)
  20. 000Dh                   1 dword  File time-stamp (Unix format)
  21.    ?                    ? char   ASCIIZ pathname
  22.    ?                    ? char   ASCIIZ filename
  23. ????h                   1 byte   Length of machine specific information
  24.                         ? byte   Machine specific information
  25.  
  26. Note that the path separator for pathnames is the 0FFh (255) character.
  27.  
  28. The  high  nybble of the version  &  compression type field contains the
  29. version  information (0=HA 0.98), the low nybble is the compression type:
  30.  
  31. (Table 0012)
  32. HA compression types
  33.     0           "CPY"           File is stored (no compression)
  34.     1           "ASC"           Default compression method, using a sliding
  35.                                 window dictionary with an arithmetic coder.
  36.     2           "HSC"           Compression using a "finite context [sic]
  37.                                 model and arithmetic coder"
  38.    14           "DIR"           Directory entry
  39.    15           "SPECIAL"       Used with HA 0.99B (?)
  40.  
  41.  
  42. Machine specific information known:
  43.  
  44.     1 byte      Machine type (Host-OS)
  45.  
  46.                         1 = MS DOS
  47.                         2 = Linux (Unix)
  48.  
  49.     ? bytes     Information (currently only file-attribute info)
  50.  
  51. EXTENSION:HA
  52. OCCURENCES:PC, Linux
  53. PROGRAMS:HA
  54. REFERENCE:
  55.  
  56.