-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy patharcfs5.txt
198 lines (113 loc) · 5.12 KB
/
arcfs5.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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
ARCFS(5) FILE FORMATS ARCFS(5)
NAME
ArcFS - Archive file format for the RISC OS ArcFS filesystem
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.
This document describes format version 0, for ArcFS minimum
versions 0.40 and 1.00, and version 0a, for ArcFS minimum
versions 0.58 and 2.17.
FORMAT
The file consists of a file header, a sequence of archive
headers, then a sequence of compressed files.
FILE HEADER
_F_i_l_e _s_t_r_i_n_g _s_i_g_n_a_t_u_r_e
The string "Archive" followed by a zero byte.
_H_e_a_d_e_r _l_e_n_g_t_h
Length of header info in bytes, one word, multiple of 36.
_D_a_t_a _o_f_f_s_e_t
Offset, in bytes, into archive at which data starts, one
word.
_R_e_a_d-_o_n_l_y _v_e_r_s_i_o_n
Minimum read-only version required, multiplied by 100, one
word.
_R_e_a_d-_w_r_i_t_e _v_e_r_s_i_o_n
Minimum read--write version required, multiplied by 100, one
word.
_R_e_s_e_r_v_e_d
Reserved for future use, 68 bytes.
ARCHIVE HEADER
The last header starts at 60+length of headers and ends at
96+length of headers. The format of each header is as fol-
lows.
_I_n_f_o _b_y_t_e
Object information byte, show compression method used:
0x00 end of directory marker
Sun Release 4.1 Last change: 1
ARCFS(5) FILE FORMATS ARCFS(5)
0x01 object has been deleted
0x82 stored
0x83 packed
0x88 crunched
0xFF compressed
_F_i_l_e _n_a_m_e
File name, 11 bytes.
_F_u_l_l _l_e_n_g_t_h
Original file length, or 0xFFFFFFFF for a directory), one
word.
_L_o_a_d _a_d_d_r_e_s_s
Load address of the file, or 0xFFFFFFdd for a directory),
one word.
_E_x_e_c _a_d_d_r_e_s_s
Exec address of the file, or 0xdddddddd for a directory),
one word.
File load and execution address may contain a filetype and
datestamp as normal.
Directories can be date-stamped, the number of centiseconds
since the 1st January 1900 when the directory was created
are given by &dddddddddd contained in the directory's load
and execution addresses as shown above.
Archives converted from spark(5) format using ArcConv will
have the same full length, compressed length, load address
and execute address as they had in the Spark archive.
_A_t_t_r_i_b_u_t_e_s
Attributes of the file, one word. Contains the number of
bits compression for crunch and compress format files and
the least significant bytes contains the standard RISC OS
information on file access.
_C_o_m_p_r_e_s_s_e_d _l_e_n_g_t_h
Length of compressed data, or 0xFFFFFFFF for a directory,
one word.
_I_n_f_o_r_m_a_t_i_o_n _w_o_r_d
The top bit (definitively) indicates whether the object is a
file or a directory, 0 for a file, 1 for a directory.
In the case of a file, the least significant 31 bits show
the offset from the start of data at which the file data can
be found.
In the case of a directory, the least significant 31 bits
Sun Release 4.1 Last change: 2
ARCFS(5) FILE FORMATS ARCFS(5)
show the offset from the start of headers (96) at which the
next object in this directory can be found, the following
object being the first in the sub-directory.
FORMAT VERSION 0a
This archive format is backwards compatible with versions
0.40 and 1.00, the only difference being that there is a
block of catalogue information immediately prior to the
start of each file's data as described below.
Note that this information is there to aid the recovery of
most files in the event of archive corruption and is not
used by ArcFS.
Note, also that Compact and Autocompact in release versions
1.09, 2.02 and 2.11 will compact out the catalogue informa-
tion blocks, so try to avoid writing to new archives with
old versions of ArcFS.
_M_a_r_k_e_r
A marker to indicate the start of a file, the string "FileData", not terminated.
_I_n_f_o _b_y_t_e
One byte, as above.
_L_e_a_f _n_a_m_e
The file name, 11 bytes.
_F_u_l_l _l_e_n_g_t_h
One word, as above.
_L_o_a_d _a_d_d_r_e_s_s
One word, as above.
_E_x_e_c _a_d_d_r_e_s_s
One word, as above.
_A_t_t_r_i_b_u_t_e_s
One word, as above.
SEE ALSO
spark(5), nspark(1)
Sun Release 4.1 Last change: 3