[physfs] Adding Support for Custom Archives

Ryan C. Gordon icculus at icculus.org
Tue Aug 17 22:11:41 EDT 2010


> Yes, it is. But if you look at the code how it works
> (zip_find_end_of_central_dir) then you won't believe it works. Btw. Zip

Yeah, it's nasty. They had the right idea, and then put a variable length 
comment field in the structure at the end, so you have to sort of search 
through the bytes, and then verify that what you find is sane.

I'm sort of amazed newer archivers (7zip, rar, etc) didn't see fit to put 
64 bits at the end of the file to say where the header should be, at all.

--ryan.




More information about the physfs mailing list