PERFORCE change 147527 for review

Tim Kientzle kientzle at freebsd.org
Sun Aug 17 00:38:13 UTC 2008


> +	/* TODO: reader does not yet respect data descriptors. */
> +	/*assertEqualInt((S_IFREG | 0755), archive_entry_mode(ae));

When writing uncompressed files, you *must* fill
in the compressed and uncompressed sizes in the
local file header (you can put them in the data
descriptor also, but they must go into the local
file header).

Otherwise, the reader cannot tell where the data
ends.   (Unless it reads the central directory
first, which it can't always do.  For example, when
reading archives from stdin, the reader cannot read
the central directory first.)

The CRC32, of course, cannot go in the local file
header, so must go into the data descriptor.

Tim


More information about the p4-projects mailing list