File Formats


Archive Formats

Burrows Wheeler Zip - bzip2
File Structure
OffsetBytesDescription (ASCII)Value
0003"BZh" (Signature)42 5A 68
0301Block Size 01 - 09 (Kb)31 - 39
0406SOS3141 5926 5359
10Compressed Data
04CRC32

Microsoft Cabinet - cab
File Structure
OffsetBytesDescription (ASCII)Value
0004"MSCF" (Signature)4S53 4346
0404Reserved10000 0000
0804Size of Archive (bytes)
0C04Reserved20000 0000
1004Offset to Data
1404Reserved30000 0000
1801versionMinor
1901versionMajor1
1A02Number of Folders
1C02Number of Files
1E02Flags
2002Cabinet Set ID
2202Cabinet Number in Set

Copy In and Out - cpio
File Structure
OffsetBytesDescription (ASCII)Value
0002(Signature)C771
0202Device Number
0402Inode Number
0602mode
0802uid
0A02gid
0C02Number of Links
0E02Device major/minor
1004mtime
1402Size of Filename (NSize)
1604File Size
1ANSizeFilename

Debian Package - deb
File Structure (Unix Archiver)
OffsetBytesDescription (ASCII)Value
0008"!<arch>" 10 (Signature)213C 6172 6368 3E0A
0810"debian-binary "   (Filename)6465 6269 616E 2D62
696E 6172 7920 2020
180Cmtime
2406uid
2A06gid
3008mode (Octal)
380A"4 "   (File Size)3420 2020 ...
4202Terminator60 0A

GNU Zip - gzip
File Structure   Little-Endian (Intel)
OffsetBytesDescription (ASCII)Value
0002(Signature)1F8B
0201Compression Method08
0301Flags
0402mtime
0501Extra Flags
0601Operating System *
Optional Extra Headers
Compressed Data
04CRC32
04Uncompressed File Size

* Operating System
Value
1Amiga
3Unix
5Atari TOS
7Macintosh
255unknown

LHarc - lha
File Structure   Little-Endian (Intel)
OffsetBytesDescription (ASCII)Value
0001Header Size2C, 35 or 41
0101Checksum
0205"-lh5-" (Signature)2D 6C 68 35 2D
0704Compressed Size
0B04Uncompressed Size
0F04mtime
1301File or Directory Attribute
1401LHA Level Identifier00, 01 or 02
Level 0 and Level 1
1501Size of Filename (NSize)
16NSizeFilename
16+NSize02Uncompressed File CRC16
Level 2
1502Uncompressed File CRC16
1701Operating System *

* Operating System
Value
4D"M" MS-Dos
55"U" Unix
57"W" Windows NT
6D"m" Macintosh
77"w" Windows 95/98

Lempel Ziv 4 - lz4
File Structure   Little-Endian (Intel)
OffsetBytesDescription (ASCII)Value
0004(Signature)0422 4D18
0403-0FFrame Descriptor
Compressed Data
04End of Frame0000 0000
00-04Checksum

LZMA Zip - lzip
File Structure
OffsetBytesDescription (ASCII)Value
0004"LZIP" (Signature)4C5A 4950
0401Version01
0501Coded Dictionary Size
06Compressed Data
04CRC32
08Uncompressed Size
08Member Size

Lempel Ziv Markov Algorithm - lzma
File Structure   Little-Endian (Intel)
OffsetBytesDescription (ASCII)Value
0001Flag5D
0104Dictionary Size
0508Uncompressed Size or UINT64_MAXFFFF FFFF FFFF FFFF
0DCompressed Data

Lempel Ziv Oberhumer - lzo
File Structure   Big-Endian (Motorola/MIPS)
OffsetBytesDescription (ASCII)Value
0004137 "LZO" (Signature)894C 5A4F
04050 13 10 26 10 (Magic)00 0D 0A 1A 0A
0902Version
0B02Version
0D02Version
0F01Compression Method
1001Compression Level
1104Flags
[15]04Filter (if Flags & 0x0800)
15 [19]04Mode
19 [1D]04Mtime
1A [1E]01File Name Length
1B [1F]00-FFFile Name
04Checksum
04Uncompressed Size
04Compressed Size

Squash File System - sqfs
File Structure
OffsetBytesDescription (ASCII)Value
0004"hsqs" (Signature)6873 7173
0404inodes
0804mkfs_time
0C04block_size
1004fragments
1202Compression Method
1402block_log
1602Flags
1802ids
1A02versionMajor
1C02versionMinor
1E08root_inode
2608bytes_used

XZ - xz
File Structure   Little-Endian (Intel)
OffsetBytesDescription (ASCII)Value
0006253 "7zXZ" 0 (Signature)FD37 7A58 5A00
0601Reserved00
0701Flags
0804CRC32
0CCompressed Data
04CRC32
04Compressed Size * 4
02Flags
02"YZ" (Magic)59 5A

Zircon Archive Container - zac
File Structure   Big-Endian (Motorola/MIPS)
OffsetBytesDescription (ASCII)Value
0004"ZC" 1 0 (Signature 1.0)5A43 0100
04Files
DOff03"zd" 1 (Start of Directory)7A 64 01
DOff + 301Directory Compression Method *0 - 9
DOff + 4Directory
File Size - 404(Offset to Directory)DOff

Directory Entry
OffsetBytesAttribute
0004Offset from start of ZAC file
0404Compressed Size (bytes)
0804Uncompressed Size (bytes)
0C04mode: file type and permission bits
1002Owner: User ID
1202Group: Group ID
1404atime: last access time
1804mtime: last modification time (contents)
1C02Reserved2
1E01Compression Method *
1F01Size of Filename (NSize)
20NSizeFilename

* Compression Method
Value
0None: Store
1gzip
2bzip2
3lzip
4lz4
5lzma
6xz