How does one find the start of the "Central Directory" in zip files? -
wikipedia has excellent description of zip file format, "central directory" structure confusing me. this:
this ordering allows zip file created in 1 pass, decompressed first reading central directory @ end.
the problem trailing header central directory variable length. how then, can start of central directory parse?
(oh, , did spend time looking @ appnote.txt in vain before coming here , asking :p)
my condolences, reading wikipedia description gives me strong impression need fair amount of guess + check work:
hunt backwards end 0x06054b50 end-of-directory tag, forward 16 bytes find offset start-of-directory tag 0x02014b50, , hope it. sanity checks looking comment length , comment string tags after end-of-directory tag, sure feels zip decoders work because people don't put funny characters zip comments, filenames, , forth. based entirely on wikipedia page, anyhow.
Comments
Post a Comment