A. Header Formats (integers are little-endian; i.e. low-order bytes come first) ----------------------------------------------------------------------------- level-0 level-1 level-2 ----------------------------------------------------------------------------- 1 header size 1 header size 2 total header size 1 header sum 1 header sum 5 method ID 5 method ID 5 method ID B 4 packed size 4 skip size 4 packed size 4 original size 4 original size 4 original size A 2 time (MS-DOS) 2 time (MS-DOS) 4 time (UNIX style) 2 date (MS-DOS) 2 date (MS-DOS) S 1 MS-DOS attribute 1 fixed (0x20) 1 reserved (now 0x20) 1 level (0x00) 1 level (0x01) 1 level (0x02) I 1 name length 1 name length ? pathname ? filename C 2 file crc 2 file crc 2 file crc . ........ 1 OS ID ('M') 1 OS ID ('M') . ........ 2 next header size 2 next header size ************************************************************************* 24 + ? 27 + ? 26 ----------------------------------------------------------------------------- EX- 1 ext-type 1 ext-type TEN- . ........ . ........ SION 2 next-header size 2 next-header size ----------------------------------------------------------------------------- @Level-0 header: Same as LHarc and LArc. Directory delimiter character is '\'. @Level-1 header: Default. @Level-2 header: Future versions will use this header. b. Method IDs -lh0- no compression -lh1- 4k sliding dictionary(max 60 bytes) + dynamic Huffman + fixed encoding of position -lh2- 8k sliding dictionary(max 256 bytes) + dynamic Huffman -lh3- 8k sliding dictionary(max 256 bytes) + static Huffman -lh4- 4k sliding dictionary(max 256 bytes) + static Huffman + improved encoding of position and trees -lh5- 8k sliding dictionary(max 256 bytes) + static Huffman + improved encoding of position and trees -lzs- 2k sliding dictionary(max 17 bytes) -lz4- no compression -lz5- 4k sliding dictionary(max 17 bytes) c. OS ID MS-DOS 'M' OS/2 '2' OS9 '9' OS/68K 'K' OS/386 '3' HUMAN 'H' UNIX 'U' CP/M 'C' FLEX 'F' Mac 'm' Runser 'R' B. Extension a. OS independent (0x00 - 0x3f) common header 1 0x00 2 header crc ( 1 information ) 2 next-header size filename header 1 0x01 ? filename 2 next-header size dirname header 1 0x02 ? dirname (separated and terminated by 0xff) 2 next-header size comment header (not yet supperted) 1 0x3f ? comments 2 next-header size b. MS-DOS dependent (0x40 - 0x7f) attribute header 1 0x40 2 file attribute 2 next-header size Note: Archived files are no longer sorted alphabetically.