Page 1 of 2
Re: Question about Gzip (Dan are you there?)

Posted:
Sep 6, 2001 @ 11:29pm
by Luciano U. Werner
Please, somebody help the man!<br>I really really would like to play Argentum before Christmas.
Question about Gzip (Dan are you there?)

Posted:
Sep 6, 2001 @ 11:33pm
by CARPEDIEM
Hey guys, as you all know Freddy has been swallowed by the earth. He was the one that implemented Gzip into our game... but i fear we have a big big problem. I really don't know what he is doing but when i add more stuff to the main gzip the program memory usage increases... My question is:<br><br>To open up a Gzip archive do you have to open it entirely or can you just read specific archives <br>without decompressing the whole package?<br><br>This is a big big problem for me, help from anyone will be very apreciated.<br><br>ONE more thing, is there a way to move the memory slider to allocate more program memory via software??, because we are allocating memory with the 'new' operator, but it doesn't work very well, because sometimes it won't allocate memory even if there is enough memory<br><br>plz guys, i need help asap<br>
Re: Question about Gzip (Dan are you there?)

Posted:
Sep 7, 2001 @ 11:54am
by Phantom
Carp,<br><br>You don't have to read the archive all at once. You can open it (nothing happens), and then you can read any amount of data that you want. I have no experience with archives that contain multiple files though. I thought that was not possible. PQ uses a gzip file with 1 file (the wad file), and the wad file contains it's own file structure. For The Nutcracker, I use lots of gzip files (I call them dat files, but that's just the extension), and all of them contain a single mod or tga.<br><br>Are you sure Freddy used multiple files per gzip file?<br><br>- Jacco
Re: Question about Gzip (Dan are you there?)

Posted:
Sep 7, 2001 @ 2:10pm
by Dan East
I started typing this hours ago. Jacco's answered some of this in the mean time:<br><br>Hmm. It depends on how Fredrick implemented it. gZip is just a stream of raw data. If you want the ability to store / access multiple files within a gzip, then you have to implement a directory or some other mechanism so you know where individual files begin. You'll have to find out how Fredrick implemented that. That is what the Zip format is for. It is a directory of invidual gZip files that have been combined into one big file. Because each file in the archive is actually its own gZip, it can be efficiently extracted individually. I took an easier, less effective route with PQ. Since id Software already used pak files as a way of lumping many files into one package, I just gzipped the whole thing up. The problem is that you can't efficiently access individual files randomly, because when gZip seeks, it decompresses (and if you seek backwards from the current file pointer, it has to reset to the beginning of the file, and decompress all the way up to the desired point). Quake selectively loads files as they are needed, which of course is very efficient memory-wise, but does not lend itself to compression the way I implemented it. Fredrick may have used a similar simple technique, and to optimize performance he reads / decompresses the entire archive into memory in one pass. The expense is that you cannot pick and choose which individual files in the archive you to load into memory.<br><br>It all depends on how Fredrick coded it...<br><br>Dan East
Re: Question about Gzip (Dan are you there?)

Posted:
Sep 7, 2001 @ 2:16pm
by Paul
about the memory settings... i asked on another site ages ago. i couldnt get a straight answer but i'd assume its possible. anyone know? it might be useful in the next quakeon or something...
Re: Question about Gzip (Dan are you there?)

Posted:
Sep 7, 2001 @ 4:01pm
by Jaybot
Paul, I think I might know why no one answered it it; you should try asking a Question if you want an Answer.
Re: Question about Gzip (Dan are you there?)

Posted:
Sep 7, 2001 @ 4:04pm
by Paul
i said 'anyone know?' what more do you want? oh yeah... 'musical talent'
Re: Question about Gzip (Dan are you there?)

Posted:
Sep 7, 2001 @ 4:23pm
by Jaybot
Anyone know what? Questions (and sentences in general) sound pretty bare without direct/indirect objects. You need to be a bit more clear than 'anyone know?' oh yeah, 'british grammar'
Re: Question about Gzip (Dan are you there?)

Posted:
Sep 7, 2001 @ 5:02pm
by Moose or Chuck
He's so uncharismatic... Our Jaybot, alienating all in his path.
Re: Question about Gzip (Dan are you there?)

Posted:
Sep 7, 2001 @ 6:10pm
by Dan East
I forgot about the second half of your question.

If new fails, try sleeping a fraction of a second, then try again. Keep trying for several seconds before you abort and give up. That may give the OS time to recognize the RAM is being used up and allocate some more.<br><br>Dan East
Re: Question about Gzip (Dan are you there?)

Posted:
Sep 7, 2001 @ 6:33pm
by Digby
Found this in the archives from Fredrik:<br><br>Successfully implemented gzip compression into the library now. Each file is gzipped, instead of the whole lib (gzip is one-file-only compression for those who didn't know). This makes it all fast since it only decompresses the stuff that is relevant. And we save a lot of space. Hurray! <br><br>// Fredrik <br><br><br>
Re: Question about Gzip (Dan are you there?)

Posted:
Sep 7, 2001 @ 6:36pm
by Jaybot
It's okay, I was just using a repartee to Paul's completely unnecessary insult. I just wanted him to clarify the question, he was referring to freeing up more program memory via software (from Carpes post); I understand the question now. And seeing how its okay for Paul to be racist against Spaniards (or anyone in general), I think he'd find it okay if I called him a stupid Brit. <br><br>--oh, and the quote from every single monkey game is 'look behind you, a three headed monkey!' and it only worked once (in Monkey 2, when the chef says 'really i better go find the cook!') with my favorite response was when there actually was one and the cannibals wouldnt believe him.
Re: Question about Gzip (Dan are you there?)

Posted:
Sep 7, 2001 @ 6:45pm
by Moose or Chuck
It's also in the Simpsons, at one point, I believe.
Re: Question about Gzip (Dan are you there?)

Posted:
Sep 7, 2001 @ 6:52pm
by Jaybot
btw moose, i have no ill will towards you, or paul for that matter. It just seems that whenever I dish out the same kind of sarasm or insult that you guys do to everyone else on this board, you respond the same way that they do, you freak out. you need to think and chill out before feaking out like everyone else, or else people will think you can dish it but cant take it; and if that is the case, then you should treat others (including newbies and guests) on the board with a little more respect.
Re: Question about Gzip (Dan are you there?)

Posted:
Sep 7, 2001 @ 7:49pm
by Moose or Chuck
What if it's because I like to argue? <br>*hill billy voice* My momma always said I'd be a good lawyer one day