A Archive File Format that support Lossless Compression.

  • MIME application/zip

Format

Records

Entries that describe file data compressed with DEFLATE

  • frSignature (PK Magic Numbers)
  • frVersion
  • Comments
  • Compressed file size
  • CRC
  • Uncompressed file size
  • Extra fields
    • Exploited to support a ZIP64 format, WinZip compatibility, AES encryption, file attributes, NTFS, Unixtime

Data Descriptor

An optional section added when a zip file is encrypted. Contains information for decryption.

  • Magic Number
  • CRC
  • Compressed size

Central Directory (DIR Entry)

Comprised of directory entries (can be thought of as the expanded form of the local header in records)

End of Central Directory Record

  • Located at the end.
  • Can be moved to add new files to the zip archive
  • Can be modified to hide a file from being unzipped Contains:
  • Number of dir entries in central directory
  • Offset of the first directory entry
  • Size and offset of itself
  • Comments