Well, that's not going to work so well afterall. The central directory file header which starts with
0x02014b50 uses the same signature for each file in the directory. So if I have 3 files in the zip archive, moving backwards from the end I'll hit only the last entry in the directory. Meaning I'd basically have to read the entire file backwards all the way to the beginning and keep track of the last position I found that signature. This is such a retarded format!
It's not that it would be hard to do, I already wrote the loop. But it's taking a few seconds to scan a 150kb archive, and that's a relatively small file. There's got to be a better way.
I'm thinking that since no file in the archive can come after directory starts, that every time I find a directory signature I can read the file offset value for that particular entry. Keeping track of the highest value will allow me to reduce how far back I'd have to read.
"You're not going crazy. You're going sane in a crazy world!" ~Tick