Doomulation
April 7th, 2002, 03:51
I was wondering about zip-files...
Having examined them closely, I came up with the following:
Zip-files have an ending-header, a central header and a local header.
The problem I got, is that I don't know where the actual file data is. I'd need this, but I don't have an offset. Anyone has an idea how to do or where the offset is?
Jsr
April 7th, 2002, 04:22
Shouldn't it be easier to look at some dokuments or something?
Glurak
April 7th, 2002, 04:27
http://www.wotsit.org/
Doomulation
April 7th, 2002, 04:34
Thanks! This'll help big time!
Mayco
April 7th, 2002, 19:45
that's what i call a usefull site :D
Doomulation
April 8th, 2002, 17:19
I think I understand how the zip-files works now. But still, I can't get the info I want. It complains that everytime I feed the decompress-function of the zlib that the dat is incorrect (return error -3).
I've tried to increase and decrease the position where to begin read from, but it still doesn't work.
The number of bytes I read is equal to which the local header says the compressed size is.
Any idea what's wrong here?
The Khan Artist
April 9th, 2002, 01:30
What are you trying to do? Extract one file from a zip with multiple files?
Doomulation
April 9th, 2002, 19:09
Originally posted by The Khan Artist
What are you trying to do? Extract one file from a zip with multiple files?
Nah, I just want the rom-header of zipped roms.
Doomulation
April 10th, 2002, 13:28
Hmmm, so I guess no one knows what's wrong... :(
Hacktarux
April 10th, 2002, 18:07
Maybe if you use the unzip.c and unzip.h files used for example in pj64 and 1964 you can get the infos you need (i don't know exactly what these files do).
Doomulation
April 11th, 2002, 23:01
Originally posted by Hacktarux
Maybe if you use the unzip.c and unzip.h files used for example in pj64 and 1964 you can get the infos you need (i don't know exactly what these files do).
I'll try, thx.
Doomulation
April 12th, 2002, 00:46
Problem is, that to me, it makes no sense. I tried to compile a DLL, but I can't call 'em from VB... :(
Another dead end...
Doomulation
April 14th, 2002, 04:59
I've been investigating further. To me it seems, that, apparently somehow, I don't get the whole data. Since I've used other source that compress (in its own format [own header, same compression]), and it decompresses fine. I even have a dummy-file that can be decompressed. But for me it doesn't work....
Really weird, true.
I've run some experiments, but I can't get the compressed size to match winzip's, so I haven't really been able to test it fully. Also note that I have not tried not to compress it at all, which I should try soon.
EDIT: New look at my situation. I tried to leave data uncompressed, and I extracted it without problems.
From what I see, when I compress files with winzip, it won't decompress, if I however, make my own zip-file, it decompress fine, but WinZip can't decompress it. This is really weird...
vBulletin v3.6.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.