forked from icsharpcode/SharpZipLib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathARCHIVES.TXT
More file actions
1346 lines (926 loc) · 43.3 KB
/
ARCHIVES.TXT
File metadata and controls
1346 lines (926 loc) · 43.3 KB
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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
[[[[[[[[[ ARCHIVE FORMATS AND DATA ]]]]]]]]]
(C) 1989 Raymond Clay
Permision to freely distribute and modify
is granted so long as credit is given
and all of the text through the disclaimer
is retained and unchanged
October 31, 1989
If you want to submit corrections, changes or source code (in plain ASCII),
you can reach me via:
CIS : 74730,1344
GEnie : R.CLAY1
AppleLink : Raymond6
StarText : 209287 <D/FW-Texas
DISCLAIMER:
I make no garuntees of any kind about the accuracy or adequacey of this
information for any purpose, nor am I responsible for the consequences of
using this information in any manner.
Oh, for a less litiginous world!
**************************************************
CONTENTS PAGE
--------------------------------------------------
ARC/PAK Format ................................ 2
Binary ][ Format .............................. 3
DWC Format .................................... 5
GIF Format .................................... 6
LZH Format .................................... 8
NuFX Format ................................... 9
PackIt Format ................................. 13
StuffIt ....................................... 13
ZIP Format .................................... 15
ZOO Format .................................... 19
Time Value Formats ............................ 20
Extended Files ................................ 20
Filenames ..................................... 20
ARC/PAK Page 2
=======
System of Origin : IBM
Original author : Thom Henderson
FILE FORMAT
-----------
file header 1
file 1
file header 2
file 2
.
.
file header n
file n
EOF
FILE HEADER
-----------
OFFSET LABEL TYP VALUE DESCRIPTION
------ ----------- ---- ----------- ----------------------------------
00 ARCID DB $1A
01 ARCMTD DB 00 ;Method
02 ARCFNT DS 12 ;filename
0E DB 00
0F ARCNSZ HEX 00000000 ;Compressed size
13 ARCDAT DW 0000 ;File date (MSDOS)
15 ARCTIM DW 0000 ;File time (MSDOS)
17 ARCCRC DW 0000
19 ARCOSZ HEX 00000000 ;Uncompressed size
1D ARCFIL DS ARCNSZ
COMPRESSION METHOD
------------------
NAME METHOD DESCRIPTION
----------- ------ --------------------------------------------
Stored 0 No compression used
Packed 1 Repeated running length encoding (RLE)
Squeezed 2 Huffman encoding
Crunched 3 LZW with 4K buffer, 12 bits codes
Crunched 4 First packing, then LZW 4K buffer with 12 bits
Crunched 5 Packing, LZW, 4K buffer, vari len (9-12 bits)
Squashed 6 LZW, 8K buffer, variable length (9-13 bits)
Crushed 7 Packing, then LZW 8K buffer, 2-13 bits (PAK 1.0)
Distill 8 Dynamic Huffman with 8K buffer (PAK 2.0)
POSITIONING IN FILE
-------------------
Begining of File Data = Begining of File Header + $1D
Next File Header = Begining of File Header + $1D + ARCNSZ
or
= Begining of File Data + ARCNSZ
**************************************************
BINARY ][ Page 3
=========
System of Origin : Apple ][
Original Author : Gary Little
FILE FORMAT
-----------
file header 1
file 1
file header 2
file 2
.
.
file header n
file n
EOF
FILE HEADER
-----------
OFFSET LABEL TYP VALUE DESCRIPTION
------ ----------- ---- ----------- ----------------------------------
00 B2ID1 DB $A ;ID bytes
01 B2ID2 ASC 'GL' ;authors initials - Gary Little
03 B2ACS DB 00 ;access code
04 B2FTYP DB 00 ;file type
05 B2AUX DB 0000 ;auxiliary type
07 B2STYP DB 00 ;storage type
08 B2FSIZ DW 0000 ;size of file in 512-byte blocks
0A B2MODDAT DW 0000 ;date of modification
0C B2MODTIM DW 0000 ;time of modification
0E B2CRDAT DW 0000 ;date of creation
10 B2CRTIM DW 0000 ;time of creation
12 B2ID3 DB 2 ;ID byte
13 DS 1 ;reserved
14 B2EOF HEX 000000 ;end-of-file (EOF) position
17 B2FLN DB 00 ;length of filename or partial pathname
18 B2FNAM DS 15 ;ASCII filename or partial pathname
;If the filename is a partial pathname
;it will overwrite the following
;2 segments for native filename
27 B2NFLN DB 00 ;length of native filename]
28 B2NFNAM DS 48 ;ASCII native filename
58 DS 23 ;reserved, must be zero
6F B2GSACS DB 00 ;GS/OS access code (high byte)
70 B2GSFTYP DB 00 ;GS/OS file type code (high byte)
71 B2GSSTYP DB 00 ;GS/OS storage type code (high byte)
72 B2GSSIZ DW 0000 ;GS/OS size of file in blocks (high word)
74 B2GSEOF DB 00 ;GS/OS EOF position (high byte)
75 B2DSKSPC HEX 00000000 ;disk space needed (512 byte Blocks)
79 B2OS DB 00 ;operating system type
Page 4
OPERATING SYSTEM TYPE
VALUE DESCRIPTION VALUE DESCRIPTION
----- -------------------------- ----- ------------------------
00 ProDOS or SOS 07 Macintosh XL
01 DOS 3 08 Apple CP/M
02 reserved 09 reserved
03 DOS 3.2 or DOS 3.1 0A MS-DOS
04 Apple II Pascal 0B High Sierra(CD-ROM)
05 Macintosh MFS 0C ISO 9660 (CD-ROM)
06 Macintosh HFS
7A B2NFTYP DW 0000 ;native file type code
7C B2PHANTOM DB 00 ;phantom file flag
PHANTOM FILE S/W DESIGNATIONS
VALUE DESCRIPTION VALUE DESCRIPTION
----- -------------------------- ----- ------------------------
00 [generic] 04 Modem MGR
01 Point-to-Point 05 CommWorks
02 Tele-Master Comm Sys 06 MouseTalk
03 ProTERM
7D B2FLAGS DB 00 ;data flags
LABEL BIT DESCRIPTION
----------- --------- -----------------------------------------
B2FLAGS 7 data is compressed (SQUeezed)
6 data is encrypted
0 file is sparse/packed
NAME METHOD DESCRIPTION
----------- ------ --------------------------------------------
SQUEEZED Huffman Squeeze. The filename will have '.QQ'
appended. The first 16 bytes of the file are
the original filename length and filename, the
next 14 bytes are identical in form and content
to the Apple GetInfo results and the bytes $3 -
$10 of the Binary ][ header. The rest of the
file is squeezed with packing.
7E B2VERSION DB 00 ;Binary II version number
7F B2NUMFOL DB 00 ;number of files to follow
NOTE : Many GS/OS file attributes are stored in 2 places (this is a result
of the differences between ProDOS 8/16 and GS/OS).
POSITIONING IN FILE
-------------------
Begining of File Data = Begining of File Header + $80
Next File Header = Begining of File Header + $80 + B2FSIZ
or
= Begining of File Data + B2FSIZ
**************************************************
DWC Page 5
===
System of Origin : IBM
FILE FORMAT
-----------
file 1
file 2
.
.
file n
file header 1
file header 2
.
.
file header n
end header
EOF
FILE HEADER
-----------
OFFSET LABEL TYP VALUE DESCRIPTION
------ ----------- ---- ----------- ----------------------------------
00 DWCFNT DS 12 ;filename
0C DB 00
0D DWCOSZ HEX 00000000 ;Uncompressed size
11 DWCTIM DW 0000 ;File time ala MSDOS
13 DWCDAT DW 0000 ;File date ala MSDOS
15 DWZNSZ HEX 00000000 ;Compressed size
19 DWCFTP HEX 00000000 ;File offset from SOF
1D DWCMTD DB 00 ;Method
1E DW 0000 ;???
20 DWCCRC DW 0000 ;CRC
END HEADER
----------
ORG DWCEND-27
OFFSET LABEL TYP VALUE DESCRIPTION
------ ----------- ---- ----------- ----------------------------------
00 DS 20 ;?
14 DW 0000 ;Number of files
16 DW 0000
18 ASC 'DWC' ;ID
1B DWCEND
COMPRESSION METHOD
------------------
NAME METHOD DESCRIPTION
----------- ------ --------------------------------------------
Stored No compression used
Crunched Packing, LZW, 4K buffer, var len (9-12 bits)
**************************************************
GIF Page 6
---
Created by Compuserve, Inc.
FILE FORMAT
-----------
GIF Header
Global Color Map
Image Descriptor 1
Local Color Map
Raster Data
Image Descriptor 2
Local Color Map
Raster Data
.
.
.
Image Descriptor n
Local Color Map
Raster Data
GIF Terminator
EOF
HEADER FORMAT
-------------
OFFSET LABEL TYP VALUE DESCRIPTION
------ ----------- ---- ----------- ----------------------------------
00 GIFSIG ASC 'GIF87a' ;Gif signature and version (87a)
06 GIFWDTH DW 0000 ;Screen Width - Raster width in pixels
08 GIFHGHT DW 0000 ;Screen Height - Raster height in pixels
0A GIFCOLR DB 00 ;Colorbyte
LABEL BIT DESCRIPTION
----------- --------- -----------------------------------------
GCMFLG 7 if set - Global color map follows Descriptor
GCMRES 6-4 # bits of color resolution + 1
3 reserved
GCMPSIZ 2-0 # bits/pixel in image +1, range of values 1
to 8 bits. This gives a range of 2 (B & W) to
256 colors
0B GIFBKGRND DB 00 ;Color index of screen background,
;color is defined from the Global
;color map or default map.
GIFEXTN ;Currently undefined GIF extension
;block
OFFSET LABEL TYP VALUE DESCRIPTION
------ ----------- ---- ---------- ----------------------------
00 GIFEXTSIG DB $21 ;Extension Block signature
01 EXTCODE DB 00 ;Extension Function Code
02 EXTCNT0 DB 00 ;Count of function bytes
03 EXTFUNC0 DS up to 255
.
. repeat EXTCNT0 and EXTFUNC0 as many times as required
.
EXTTERM DB 00 ;Termination of Extension Block
0C GIFHEND DB 00 ;end of GIF header
Page 7
GLOBAL COLOR MAP FORMAT
-----------------------
GCMNUM = 2 ^ (GCMPSIZ)
GCMLEN = GCMNUM * 3
OFFSET LABEL TYP VALUE DESCRIPTION
------ ----------- ---- ----------- ----------------------------------
00 GCMCOLR0 HEX 000000 ;definition for color 0
OFFSET LABEL TYP VALUE DESCRIPTION
------ ----------- ---- ---------- ----------------------------
00 REDINTNS DB 00 ;Red intensity value for this
;color
01 GRNINTNS DB 00 ;Green intensity value for
;this color
02 BLUINTNS DB 00 ;Blue intensity value for this
;color
03 GCMCOLR1 HEX 000000 ;definition for color 1
.
.
.
xx GCMCOLRn HEX 000000 ;definition for color n
IMAGE DESCRIPTOR
----------------
OFFSET LABEL TYP VALUE DESCRIPTION
------ ----------- ---- ----------- ----------------------------------
00 IMGSEP DB $2C ;Image separator character
01 IMGLFT DW 0000 ;Start of image in pixels from the
;left side of the screen
03 IMGTOP DW 0000 ;Start of image in pixels from the
;top of the screen
05 IMGWID DW 0000 ;Width of the image in pixels
07 IMGHGT DW 0000 ;Height of the image in pixels
09 IMGFLGS DB 00 ;GIF flags for this image
LABEL BIT DESCRIPTION
----------- --------- -----------------------------------------
MAPFLG 7 If set, use pixel and Local color map
following, use pixel; otherwise use Global
Color Map
RASTFLG 6 If clear, Image formatted in Sequential order,
if set then Image in Interlaced order
5-3 unused
IMGPSIZ 2-0 bits per pixel for this image
0A LOCOLMAP DS [IMGPSIZ^2]*3 ;Same format and size computation
;as Global Color Map
RASTDAT ;Raster Data - compressed image
GIFTERM DB $3B ;Termination of GIF data
COMPRESSION METHOD
------------------
LZW, 4k BuffER, variable length (3-12 bits)
**************************************************
LZH Page 8
===
System of Origin : IBM
FILE FORMAT
-----------
file header 1
file 1
file header 2
file 2
.
.
file header n
file n
EOF
FILE HEADER
-----------
OFFSET LABEL TYP VALUE DESCRIPTION
------ ----------- ---- ----------- ----------------------------------
00 LZHHSZ DB 0 ;Header size
01 LZHCKS DB 0 ;Cksum of remaining bytes
02 LZHMTD ASC '-lh0-' ;Method
07 LZHNSZ HEX 00000000 ;Compressed size
0B LZHOSZ HEX 00000000 ;Uncompressed size
0F LZHTIM DW 0000 ;File time (MSDOS)
11 LZHDAT DW 0000 ;File date (MSDOS)
13 LZHATR DW 0000 ;File attribute
15 LZHFNL DB 00 ;filename/path length
16 LZHFNT DS LZHFNL ;filename/path
2B LZHCRC DW 0000 ;CRC-16
COMPRESSION METHOD
------------------
NAME METHOD DESCRIPTION
----------- ------ --------------------------------------------
STORED -lh0- No compression used
LZHUF -lh1- LZW, 4K buffer, Huffman for upper 6 bits of pos
LZARI -lz4- LZW, Arithmetic Encoding
LZARI -lz5- LZW, Arithmetic Encoding
POSITIONING IN FILE
-------------------
Begining of File Data = Begining of Header + LZHHSZ
Begining of Next File Header = Begining of File Data + LZHNSZ
**************************************************
NuFX - SHRINKIT Page 9
===============
System of Origin: Apple ][
Original author: Andrew Nicholas
FILE FORMAT
-----------
Master Header
File 1 Header
Attribute Section
Filename Section
Thread Section
Thread 1
. File data is contained in a thread
.
Thread n
File 2 Header
Attribute Section
Filename Section
Thread Section
Thread 1
.
.
Thread n
File 3 Header
.
.
.
EOF
MASTER HEADER
-------------
OFFSET LABEL TYP VALUE DESCRIPTION
------ ----------- ---- ----------- ----------------------------------
00 NUID1 HEX 4EF546E96CE5 ;Master signature spells "NuFile"
;in alternating high and low ASCII
06 NUCRC DW 0000 ;CRC of bytes $08 - $2F in this block
08 NURECS HEX 00000000 ;Total number of files in this archive
0C NUCRTIM HEX 000000 ;archive creation time and date
0F NUCRDAT HEX 0000000000
14 NUMDTIM HEX 000000 ;time and date archive last modified
17 NUMDDAT HEX 0000000000
1C DS 19 ;reserved
2F ;end master header
Page 10
TIME FORMAT
-----------
OFFSET LABEL TYP VALUE DESCRIPTION
------ ----------- ---- ---------- ----------------------------
00 GSSEC DB 00 ;second - 0 through 59
01 GSMIN DB 00 ;minute - 0 through 59
02 GSHR DB 00 ;hour - 0 through 23
03 GSYR DB 00 ;current Year minus 1900
04 GSDAY DB 00 ;day - 0 through 30
05 GSMNTH DB 00 ;month - 0 through 11, with
;0=January
06 DB 00 ;filler byte - reserved = 00
07 GSWDAY DB 00 ;weekday - 1 through 7, with
;1=Sunday
The format of this field is identical to that described in the
_ReadTimeHex ($0D03) call described on page 14-14 of the
Apple_IIgs_Toolbox_Reference:_Volume_1.
FILE HEADER
-----------
OFFSET LABEL TYP VALUE DESCRIPTION
------ ----------- ---- ----------- ----------------------------------
00 NXID1 HEX 4EF546D8 ;Header signature spells "NuFX" in
;alternating high and low ASCII
04 NXCRC DW 0000 ;CRC of bytes $06 - NXATRBCNT+1
ATTRIBUTE SECTION
-----------------
06 NXATRBCNT DW 0000 ;length of the attribute section of
;each header. The distance from NXID1
;to and including NXFNL
08 NXVERS DW 0000 ;Minimum version needed for extraction
0A NXNUMTHR HEX 00000000 ;The number of threads following NXFNAM
0E NXSYSID DW 0000 ;Native file system identifier
SYSTEM IDENTIFIERS
VALUE DESCRIPTION VALUE DESCRIPTION
----- -------------------------- ----- ------------------------
0000 File is an Archived Disk 0008 Apple CP/M
0001 ProDOS/SOS 0009 reserved, do not use
0002 DOS 3.3 000A MS-DOS
0003 DOS 3.2 000B High-Sierra/ISO 9660
0004 Apple II Pascal 000C
0005 Macintosh(tm) (HFS) . reserved
0006 Macintosh (MFS) FFFF
0007 LISA(tm) file system
10 NXSYSSEP ASC '/' ;Native file system seperator
;ProDOS = '/' ($2F)
;HFS = ':' ($3A)
;MS-DOS = '\' ($5C)
11 NXSPARSE DB 00 ;sparse file indicated if = $01
12 NXACCESS HEX 00000000 ;
Page 11
LABEL BIT DESCRIPTION if set
----------- --------- -----------------------------------------
NXACCESS 31-8 reserved, must be zero
7 destroy enabled
6 rename enabled
5 backup needed
4-3 reserved, must be zero
2 file is invisible
1 write enabled
0 read enabled
16 NXFTYP HEX 00000000 ;file type, Disk = 0
1A NXEXTYP HEX 00000000 ;extra type, ProDOS aux_type or HFS
;creator_type, Disk: total number
;of blocks on the device
1E NXSTRTYP DW 0000 ;storage type, if a disk this should
;contain the block size of the O/S
STORAGE TYPE
TYPE IF FILE SIZE IS: O/S BLOCK SIZE
---- ------------------------- --------- ---------------
$1 < 512 bytes ProDOS 512
$2 > 511 bytes, < 128k DOS 3.3 256
$3 > 129k HFS 524
$5 extended file
$D subdirectory
20 NXCRTIM HEX 000000 ;file creation time and date
23 NXCRDAT HEX 0000000000
28 NXMDTIM HEX 000000 ;time and date file last modified
2B NXMDDAT HEX 0000000000
30 NXARCTIM HEX 000000 ;time and date file archived
33 NXARCDAT HEX 0000000000
.
.
Any other attributes are added here. NXATRBCNT points to the NXFNL, which
is always the last attribute.
.
.
NXATRBCNT-2
NXFNL DW 0000 ;filename length
FILENAME SECTION
----------------
NXFNL+2
NXFILE DS NXFNL ;Filename, partial pathname or disk
;volume name. Names ported across
;systems may have illegal characters
;or characteristics.
Page 12
THREAD SECTION
--------------
Thread records are 16 byte records which immediately follow the filename and
describe the types of data structures which are included with a given record.
The number of threads is in the attribute section under NXNUMTHR.
A thread record can be represented as follows:
OFFSET LABEL TYP VALUE DESCRIPTION
------ ----------- ---- ----------- ----------------------------------
00 THRCLASS DW 0000 ;describes the class of the thread
0000 CLS_MSG
0001 CLS__CNTRL
0002 CLS_DATA
0003 CLS_SPRSE
02 THRFRMT DW 0000 ;format of the data within the thread
0000 ;Uncompressed
0001 ;SQueezed (SQ/USQ)
0002 ;Dynamic LZW [ShrinkIt]
0003
. ;RESERVED, contact the author
FFFF
04 THRKIND DW 0000 ;describes data in thread
if THRCLS = and THRKIND = THEN THE THREAD CONTAINS:
---------------- -------------- ---------------------------
CLS_MSG 0000 ASCII text
all others undefined
CLS_CNTRL 0000 create directory
all others undefined
CLS_DATA 0000 data_fork of file
0001 disk image
0002 resource_fork of file
all others undefined
06 DS 2
08 THREOF HEX 00000000 ;length of the uncompressed thread
0C THRCMPEOF HEX 00000000 ;length of the compressed thread
POSITIONING IN FILE
-------------------
Start of the thread list = (beginning of header) + NXATRBCNT + NXFNL
End of the thread list = (beginning of header) + NXATRBCNT + NXFNL +
(16 * NXNUMTHR)
Start of a data_thread = (beginning of header) + NXATRBCNT + NXFNL +
(16 * NXNUMTHR) + (THRCMPEOF of all threads
in the thread list which are not data prior
to finding a CLS_DATA = 0000)
Page 13
Start of a resource_thread = (beginning of header) + NXATRBCNT + NXFNL +
(16 * NXNUMTHR) + (THRCMPEOF of all the
threads in the thread list which are not
resources prior to finding a
CLS_DATA = 0002)
Next record = (beginning of header) + NXATRBCNT + NXFNL +
(16 * NXNUMTHR) + (THRCMPEOF of each thread)
**************************************************
PACKIT
======
System of Origin : Macintosh
FILE HEADER
-----------
OFFSET LABEL TYP VALUE DESCRIPTION
------ ----------- ---- ----------- ----------------------------------
00 PITFLN HEX 00 ;filename length
01 PITFNAM DS 63 ;filename
40 PITTYP HEX 00000000 ;file type
44 PITCRT HEX 00000000 ;Creator
48 PITFFLG DW 0000 ;Finder flags
4C PITLOK DW 0000 ;locked?
4E PITDSIZ HEX 00000000 ;data fork uncompressed size
52 PITRSIZ HEX 00000000 ;resource fork uncompressed size
56 PITCDSIZ HEX 00000000 ;data fork compressed size
5A PITCRSIZ HEX 00000000 ;resource fork compressed size
5E PITCRC DW 0000 ;CRC
**************************************************
STUFFIT
=======
System of Origin : Macintosh
Original author : Raymond Lau
FILE FORMAT
-----------
Master Header
file header 1
file 1 resource fork
file 1 data fork
file header 2
file 2 resource fork
file 2 data fork
.
.
file header n
file n resource fork
file n data fork
EOF
Page 14
MASTER HEADER
-------------
OFFSET LABEL TYP VALUE DESCRIPTION
------ ----------- ---- ----------- ----------------------------------
00 SITHSIG ASC 'SIT!' ;STUFFIT archive signature
04 SITHNUM DW 0000 ;number of files in archive
06 SITHLEN HEX 00000000 ;length of entire archive incl hdr
0A SITHID2 ASC 'rLau' ;authors name - R. Lau
0E SITHVER DB 00 ;version number
0F DS 7 ;reserved
FILE HEADER
-----------
OFFSET LABEL TYP VALUE DESCRIPTION
------ ----------- ---- ----------- ----------------------------------
00 SITFRCMP DB 00 ;rsrc fork compression method
01 SITFDCMP DB 00 ;data fork compression method
02 SITFNL DB 00 ;file name length
03 SITFNAM DS $3F ;filename
41 SITFTYP DB 00000000 ;filetype
45 SITFCR DB 00000000 ;file creator
49 SITFFFL DW 0000 ;Finder flags
4B SITFCRD HEX 00000000 ;creation date
4F SITFMDD HEX 00000000 ;modification date
53 SITFRLN HEX 00000000 ;uncompressed resource fork length
57 SITFDLN HEX 00000000 ;uncompressed data fork length
5B SITFCRLN HEX 00000000 ;compressed resource fork length
5F SITFCDLN HEX 00000000 ;compressed data fork length
61 SITFRCRC DW 0000 ;resource fork CRC
63 SITFDCRC DW 0000 ;data fork CRC
65 SITFRPAD DB 00 ;pad bytes for encrypted files,
66 SITFDPAD DB 00 ;resource and data forks
6A DS 4 ;reserved
6E SITFHCRC DW 0000 ;CRC of file header
STUFFIT METHODS
NAME METHOD DESCRIPTION
----------- ------ --------------------------------------------
noComp 0 uncompressed
rleComp 1 RLE compression
lzwComp 2 LZW compression, 18k buffer, 14 bit code size
hufComp 3 Huffman compression
encrypted 16 bit set if encrypted. ex: encrypted+lzwComp
startFolder 32 marks start of a new folder
endFolder 33 marks end of the last folder started
Page 15
POSITIONING IN FILE
-------------------
First File Header = SITHSIG + $15
Begining of Resource Fork = SITFRCMP + $6F
Begining of Data Fork = Begining of Resource Fork + SITFCRLN
Next File Header = Begining of previous Data Fork + SITFCDLN
or
= Previous File Header + $6F + SITFCRLN + SITCDLN
**************************************************
ZIP
===
System of Origin : IBM
Original author : Phil Katz
FILE FORMAT
-----------
Files stored in arbitrary order. Large zipfiles can span multiple
diskette media.
Local File Header 1
file 1 extra field
file 1 comment
file data 1
Local File Header 2
file 2 extra field
file 2 comment
file data 2
.
.
.
Local File Header n
file n extra field
file n comment
file data n
Central Directory
central extra field
central comment
End of Central Directory
end comment
EOF
Page 16
LOCAL FILE HEADER
-----------------
OFFSET LABEL TYP VALUE DESCRIPTION
------ ----------- ---- ----------- ----------------------------------