Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

alanhaggai (8497)

alanhaggai
  (email not shown publicly)
http://alanhaggai.org/
Yahoo! ID: alan_haggai (Add User, Send Message)
Jabber: alanhaggai@gmail.com

Journal of alanhaggai (8497)

Sunday July 06, 2008
12:57 PM

.zip file format

[ #36860 ]

My study of the .zip file format:

Magic bytes

Magic numbers are common in programs across many operating systems. Magic numbers implement strongly typed data and are a form of in-band signaling to the controlling program that reads the data type(s) at program run-time. Many files have such constants that identify the contained data. Detecting such constants in files is a simple and effective way of distinguishing between many file formats and can yield further run-time information.

That is Wikipedia's definition of magic bytes / numbers. .zip magic bytes are:
0x50 0x45 at offset 0x00.
0x50 = P,
and 0x45 = K in ASCII.

PK stands for Phil Katz, the creator of the .zip file format.

Meta Data

  • Optional archive comment
  • Optional comment per entry
  • All kinds of system-specific data ( like file attributes ) can be added per file using so called extra fields

Limitations

  • Internal offset values are 32-bits large, so only files upto 4 GB can be stored
  • No support for extended character sets in file names
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.