home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / disk / archive / nspark_1 / nspark-1.7.5 / man / spark.5 < prev    next >
Text File  |  1994-12-12  |  3KB  |  102 lines

  1. .TH SPARK(5)
  2. .SH NAME
  3. spark \- Archive file format for RISC OS version of the PC archiver Arc
  4. .SH CONVENTIONS
  5. Strings are given in ASCII with C-style escapes. No terminating \0 is
  6. present if not explicitily included.
  7.  
  8. Words are 32 bit little-endian numbers.
  9.  
  10. Half words are 16 bit little-endian numbers.
  11.  
  12. .SH FORMAT
  13. An archive file consists of a sequence of archive marker, archive header and file data, ie. marker1, header1, data1, marker2, header2, data2, etc.
  14. The archive marker is a single byte of value 0x1a (26).
  15. The archive finishes with an archive marker followed by a zero byte.
  16.  
  17. .I Header version number
  18. .br
  19. This tells you how the file data is stored 
  20. and how many bytes there are in the header. The header version 
  21. numbers for the PC, are detailed below. An Archimedes header 
  22. version number is identical to the corresponding PC number except 
  23. it has bit 7 set.
  24. .nf
  25.     1    Old style, no compression
  26.     2    New style, no compression
  27.     3    Compression of repeated characters only (RLE)
  28.     4    As 3 plus Huffman Squeezing
  29.     5    Lempel-Ziv packing of repeated strings (old style)
  30.     6    Lempel-Ziv packing of repeated strings (new style)
  31.     7    Lempel-Ziv Welch packing with improved hash function
  32.     8    Dynamic Lempel-Ziv packing with adaptive reset
  33.     9    PKARC style squashing
  34.     127    Un*x compression
  35. .fi
  36.  
  37. .I Filename
  38. .br
  39. 14 bytes of name, zero terminated.
  40.  
  41. .I Compressed length
  42. .br
  43. Compressed data length, one word.
  44.  
  45. .I Date
  46. .br
  47. One half-word, date.
  48. .nf
  49.     year = (date >> 9) & 0x7f;
  50.     month = (date >> 5) & 0x0f;
  51.     day = date & 0x1f;
  52. .fi
  53.  
  54. .I Time
  55. .br
  56. One half-word, time.
  57. .nf
  58.     hour = (time >> 11) & 0x1f;
  59.     minute = (time >> 5)  & 0x3f;
  60.     second = (time & 0x1f) * 2;
  61. .fi
  62.  
  63. The time and date fields are always filled in. If the file has a load and exec 
  64. address, these are the time and date when the file was added to the archive 
  65. otherwise, they are derived from the Archimedes datestamp. In all extract 
  66. operations on Archimedes format archives, the contents of the load and exec 
  67. fields take precedence.
  68.  
  69. .I CRC
  70. .br
  71. One half-word, Cyclic Redundancy Check.
  72.  
  73. .I Original file length
  74. .br
  75. Original file length, one word, only present if header type greater than 1.
  76.  
  77. .I Load address
  78. .br
  79. Load address of the file, one word, only present if bit-7 of the header
  80. version number is set.
  81.  
  82. .I Exec address
  83. .br
  84. Exec address of the file, one word, only present if bit-7 of the header
  85. version number is set.
  86.  
  87. .I Attributes
  88. .br
  89. Attributes of the file, one word, only present if bit-7 of the header
  90. version number is set.
  91.  
  92. .I Compressed data...
  93. .br
  94. Directories are stored as non-compressed archives within archives,
  95. ie. their load address & 0xffffff00=0xfffddc.
  96.  
  97. .SH COMPATIBILITY
  98. PC and Archimedes formats may be mixed in one archive for use on the Archimedes.
  99.  
  100. .SH SEE ALSO
  101. arcfs(5), nspark(1)
  102.