ZipFile Layout

Downloads

Description

A tool that print out the layout of the zip file and list all the header and the header information. I tool I created when added ZIP64 support for minizip library. and is useful for when adding more features and to check why a zip archive is broken.

Usage

The tool is a Window console application that takes the zip archive as the first parameter

E:\Temp\> ZipFileLayout.exe "e:\MyZip.zip"

Example of output

Zip Layout Information v1.0 (c) 2009 - Mathias Svensson - result42.com
Free to use.

'Zip64 End Of Central Directory Locator' found at 4663351563
'EndCentralDirectory' found at                    4663351583

[      4663351583] ==[ End of central directory ] ==
	Signature            : 0x6054b50
	NumDisk              : 0 (0x0)
	NumDiskWithCD        : 0 (0x0)
	EntiresOnThisDisk    : 2 (0x2)
	EntiresInCD          : 2 (0x2)
	centralDirectorySize : 129 (0x81)
	offset               : 4294967295 (0xffffffff) **Invalid use offset from ZIP64 record**
	commentLen           : 0 (0x0)

[      4663351563] ==[ ZIP64 End of central directory locator] ==
	Signature            : 0x7064b50
	NumDisk              : 0 (0x0)
	RelativeOffset       : 4663351507 (0x115f518d3) (Offset to Zip64 EOCD)
	Total disks          : 1 (0x1)

[      4663351507] ==[ ZIP64 End of central directory ] ==
	Signature            : 0x6064b50
	Size of ZIP64 EOCD   : 44 (0x2c) (Zip64 End Central Directory Record size)
	Version Made by      : 45 (0x2d)
	       (HI) Platform : 0 (External Attribute Compatibility)
	       (LO) Version  : 45 
	Version needed       : 45 (0x2d)
	NumDisk              : 0 (0x0)
	NumDiskWithThisCD    : 0 (0x0)
	Entires in this disk : 2 (0x2)
	Total Entires        : 2 (0x2)
	CentralDirectory Size: 129 (0x81)
	Offset to Cent.Dir   : 4663351378 (0x115f51852)
	Zip64 Extensible data sector : 0 (0x0)

[      4663351378] ==[ Central Directory ]==
	Signature            : 0x2014b50
	version Made by      : 45 (0x2d)
	      (HI) Platform  : 0 (External Attribute Compatibility)
	      (LO) Version   : 45 
	version              : 45 (0x2d)
	flags                : 6 (0x6)
	method               : 8 (0x8)
	filetime             : 4294935018 (0xffff81ea)
	filedate             : 15137 (0x3b21)
	crc                  : 284103285 (0x10ef1275)
	compressed_size      : 4262933471 (0xfe1733df)
	uncompressed_size    : 4294967295 (0xffffffff)
	filename_len         : 14 (0xe)
	extra_field_len      : 12 (0xc)
	filecomment len      : 0 (0x0)
	Disk num start       : 0 (0x0)
	Internal attrib      : 0 (0x0)
	External attrib      : 32 (0x20)
	RelativeOffset       : 0 (0x0)
	Filename            : Windows 7.vmdk [      4663351424]
	Extra field         : 12 bytes [      4663351438]
	Extra field    [Header   ID : 1 (0x0001)]
	Extra field    [datasize ID : 8 (0x0008)]
	Extra field [Zip64 Extended information]
		[ZIP64]	Uncompressed Size : 9495838720 (0x235ff0000)
	Extra field [Zip64 Extended information - End]
[      4663351450] ==[ Central Directory Record - Ended ]==

[      4663351450] ==[ Central Directory ]==
	Signature            : 0x2014b50
	version Made by      : 0 (0x0)
	      (HI) Platform  : 0 (External Attribute Compatibility)
	      (LO) Version   : 0 
	version              : 20 (0x14)
	flags                : 0 (0x0)
	method               : 8 (0x8)
	filetime             : 27749 (0x6c65)
	filedate             : 14543 (0x38cf)
	crc                  : 3998229284 (0xee502324)
	compressed_size      : 400417802 (0x17dde40a)
	uncompressed_size    : 1054932992 (0x3ee10000)
	filename_len         : 11 (0xb)
	extra_field_len      : 0 (0x0)
	filecomment len      : 0 (0x0)
	Disk num start       : 0 (0x0)
	Internal attrib      : 0 (0x0)
	External attrib      : 32 (0x20)
	RelativeOffset       : 4262933535 (0xfe17341f)
	Filename            : Ubuntu.vmdk [      4663351496]
[      4663351507] ==[ Central Directory Record - Ended ]==

No more Centreral Directory entres found..

	==[ List Local File Headers ]==
	    -----------------------
[               0] ==[ Local File Header ]==
	Signature        : 0x4034b50
	version;         : 45 (0x2d)
	flags;           : 6 (0x6)
	method;          : 8 (0x8)
	filetime;        : 4294935018 (0xffff81ea)
	filedate;        : 15137 (0x3b21)
	crc;             : 284103285 (0x10ef1275)
	compressed_size  : 4294967295 (0xffffffff)
	uncompressed_size: 4294967295 (0xffffffff)
	filename_len     : 14 (0xe)
	extra_field_len  : 20 (0x14)
	Filename         : Windows 7.vmdk [              30]
	Extra field      : 20 bytes [              44]
	Extra field   [Header   ID : 1 (0x0001)]
	Extra field   [datasize ID : 16 (0x0010)]
	Extra field [Zip64 Extended information]
		[ZIP64]	Uncompressed Size : 9495838720 (0x235ff0000)
		[ZIP64]	Compressed Size   : 4262933471 (0xfe1733df)
	Extra field [Zip64 Extended information - End]
	File DATA (compressed size) (size : 4262933471) [              64]

[      4262933535] ==[ Local File Header ]==
	Signature        : 0x4034b50
	version;         : 20 (0x14)
	flags;           : 0 (0x0)
	method;          : 8 (0x8)
	filetime;        : 27749 (0x6c65)
	filedate;        : 14543 (0x38cf)
	crc;             : 3998229284 (0xee502324)
	compressed_size  : 400417802 (0x17dde40a)
	uncompressed_size: 1054932992 (0x3ee10000)
	filename_len     : 11 (0xb)
	extra_field_len  : 0 (0x0)
	Filename         : Ubuntu.vmdk [      4262933565]
	File DATA (compressed size) (size : 400417802) [      4262933576]

History

  • v1.0 - 2009-09-15 - First version, Supports ZIP64 headers.
  • v1.1 - 2009-10-25 - If no items are found or central directory is missing. It will now try to find local file header directly by checking the beginning of the file.
Tagged:  

( Try Multi Commander, A file manager for professionals )

Copyright (c) 2015 - Mathias Svensson