4 ms·
It's been a few years, but I seem to remember there simply was no way to detect end of non-compressed content lacking a length header without first reading the
by shockinglytrue 6y ago
It's been a few years, but I seem to remember there simply was no way to detect end of non-compressed content lacking a length header without first reading the TOC except substring search. This would quickly get very messy when the non-compressed content might contain another embedded ZIP, etc.
- zmodem 6y agoThat's during extraction though. There's no way to reliably decompress a ZIP without reading the Central Directory first. While scanning for the Local File Headers works for most files, it's not guaranteed to be correct since it may not match what's in the Central Directory. Also as you point out it doesn't work when the file length is not in the LFH. Streaming zip creation is well supported by the format though.