- We don't use the extra info because we can extrapolate the only thing of use (attributes) by using logic. Thus, we can skip large amounts of the file without missing any information.

git-svn-id: file:///svn/phpbb/trunk@5511 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
David M 2006-01-30 01:14:21 +00:00
parent db672ef596
commit 1e25c5bece

View file

@ -238,13 +238,10 @@ class compress_zip extends compress
fclose($fp); fclose($fp);
break; break;
// 'Central Directory Header' // We hit the 'Central Directory Header', we can stop because nothing else in here requires our attention
// or we hit the end of the central directory record, we can safely end the loop as we are totally finished with looking for files and folders
case "\x50\x4b\x01\x02": case "\x50\x4b\x01\x02":
fseek($this->fp, 24, SEEK_CUR); // This case should simply never happen.. but it does exist..
fseek($this->fp, 12 + current(unpack("v", fread($this->fp, 2))) + current(unpack("v", fread($this->fp, 2))) + current(unpack("v", fread($this->fp, 2))), SEEK_CUR);
break;
// Hit the end of the central directory record, we can safely end the loop as we are totally finished with looking for files and folders
case "\x50\x4b\x05\x06": case "\x50\x4b\x05\x06":
break 2; break 2;