This is for Niko or anyone else who has an idea...
I'm working on a small project to read files stored (uncompressed) in a .zip file and I need to rewrite all of the stdio functions to work on the files in the .zip file. I've been studying zlib but it's not working out. I can easily open the zip file and locate any file I need to by name and then read that file into memory (a void*), but I cannot figure out how to make my functions (fread, ftell, fseek, ...) operate on the memory. I have tried looking at how Niko does it in Irrlicht but I'm just not seeing it. I cannot just use the stdio functions b/c they require the file to be opened by filename (FILE* fp = fopen(const char* filename, const char* mode)) and I cannot "see" the filenames inside the zipfile.
Does anyone have any experience with this or have any ideas
Zip File reading
-
- Posts: 271
- Joined: Sat Aug 23, 2003 5:52 pm
- Location: Hurricane Central, Florida
-
- Posts: 271
- Joined: Sat Aug 23, 2003 5:52 pm
- Location: Hurricane Central, Florida
thx 4 the reply Niko, I got the .zip file specifications from http://www.pkware.com/products/enterpri ... ote.html#2 and I'm just writing my own zip file reader now. It's working out good so I'm not even gonna bother with zlib anymore (I don't need compression anyway).