-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathspark5.txt
132 lines (76 loc) · 3.54 KB
/
spark5.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
SPARK(5)() MISC. REFERENCE MANUAL PAGES SPARK(5)()
NAME
spark - Archive file format for RISC OS version of the PC
archiver Arc
CONVENTIONS
Strings are given in ASCII with C-style escapes. No ter-
minating is present if not explicitly included.
Words are 32 bit little-endian numbers.
Half words are 16 bit little-endian numbers.
FORMAT
An archive file consists of a sequence of archive marker,
archive header and file data, ie. marker1, header1, data1,
marker2, header2, data2, etc. The archive marker is a sin-
gle byte of value 0x1a (26). The archive finishes with an
archive marker followed by a zero byte.
_H_e_a_d_e_r _v_e_r_s_i_o_n _n_u_m_b_e_r
This tells you how the file data is stored and how many
bytes there are in the header. The header version numbers
for the PC, are detailed below. An Archimedes header version
number is identical to the corresponding PC number except it
has bit 7 set.
1 Old style, no compression
2 New style, no compression
3 Compression of repeated characters only (RLE)
4 As 3 plus Huffman Squeezing
5 Lempel-Ziv packing of repeated strings (old style)
6 Lempel-Ziv packing of repeated strings (new style)
7 Lempel-Ziv Welch packing with improved hash function
8 Dynamic Lempel-Ziv packing with adaptive reset
9 PKARC style squashing
127 Un*x compression
_F_i_l_e_n_a_m_e
14 bytes of name, zero terminated.
_C_o_m_p_r_e_s_s_e_d _l_e_n_g_t_h
Compressed data length, one word.
_D_a_t_e
One half-word, date.
year = (date >> 9) & 0x7f;
month = (date >> 5) & 0x0f;
day = date & 0x1f;
_T_i_m_e
One half-word, time.
hour = (time >> 11) & 0x1f;
Sun Release 4.1 Last change: 1
SPARK(5)() MISC. REFERENCE MANUAL PAGES SPARK(5)()
minute = (time >> 5) & 0x3f;
second = (time & 0x1f) * 2;
The time and date fields are always filled in. If the file
has a load and exec address, these are the time and date
when the file was added to the archive otherwise, they are
derived from the Archimedes datestamp. In all extract opera-
tions on Archimedes format archives, the contents of the
load and exec fields take precedence.
_C_R_C
One half-word, Cyclic Redundancy Check.
_O_r_i_g_i_n_a_l _f_i_l_e _l_e_n_g_t_h
Original file length, one word, only present if header type
greater than 1.
_L_o_a_d _a_d_d_r_e_s_s
Load address of the file, one word, only present if bit-7 of
the header version number is set.
_E_x_e_c _a_d_d_r_e_s_s
Exec address of the file, one word, only present if bit-7 of
the header version number is set.
_A_t_t_r_i_b_u_t_e_s
Attributes of the file, one word, only present if bit-7 of
the header version number is set.
_C_o_m_p_r_e_s_s_e_d _d_a_t_a...
Directories are stored as non-compressed archives within
archives, ie. their load address & 0xffffff00=0xfffddc.
COMPATIBILITY
PC and Archimedes formats may be mixed in one archive for
use on the Archimedes.
SEE ALSO
arcfs(5), nspark(1)
Sun Release 4.1 Last change: 2