Author ronaldoussoren
Recipients NewerCookie, alanmcintyre, ronaldoussoren
Date 2009-09-06.20:41:54
SpamBayes Score 7.59109e-08
Marked as misclassified No
Message-id <1252269716.84.0.818918819662.issue6839@psf.upfronthosting.co.za>
In-reply-to
Content
alan: I don't quite understand which filename you want to use when the 
name in the per-file header and the central directory don't match. 

Where in the standard is this prescribed? I couldn't find anything in 
the PKWare zipfile appnote [1]

My preference would be to use the central directory as the canonical 
value because scanning the entire zipfile to read the per-file header 
would give a significant overhead. This might not be very noticable with 
small zipfiles, but I regularly use zipfiles with over 100K files in 
them in those files a scan of the zipfile is prohibitively expensive.

Furthermore, when the two are different the most reasonably explaination 
is that an in-place edit of the zipfile changed the directory without 
rewriting the entire zipfile (just like you can "delete" files from a 
zipfile by dumping them from the directory rather than completely 
rewriting the entire archive)

[1] 
APPNOTE.TXT - .ZIP File Format Specification Version: 6.3.2 
Revised: September 28, 2007 
Copyright (c) 1989 - 2007 PKWARE Inc., All Rights Reserved.
History
Date User Action Args
2009-09-06 20:41:56ronaldoussorensetrecipients: + ronaldoussoren, alanmcintyre, NewerCookie
2009-09-06 20:41:56ronaldoussorensetmessageid: <1252269716.84.0.818918819662.issue6839@psf.upfronthosting.co.za>
2009-09-06 20:41:54ronaldoussorenlinkissue6839 messages
2009-09-06 20:41:54ronaldoussorencreate