This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Question about Gzip (Dan are you there?)


Re: Question about Gzip (Dan are you there?)

Postby Luciano U. Werner » Sep 6, 2001 @ 11:29pm

Please, somebody help the man!<br>I really really would like to play Argentum before Christmas.
Celerius quam asparagi cocuntur
__________________
DocSMRF
Tactical Advisor
User avatar
Luciano U. Werner
pm Insider
 
Posts: 3156
Joined: Aug 1, 2001 @ 9:41pm
Location: Brazil


Question about Gzip (Dan are you there?)

Postby CARPEDIEM » Sep 6, 2001 @ 11:33pm

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>
CARPEDIEM
pm Insider
 
Posts: 514
Joined: Feb 24, 2001 @ 3:58pm


Re: Question about Gzip (Dan are you there?)

Postby Phantom » Sep 7, 2001 @ 11:54am

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
Give me some good data and
I will give you the world
User avatar
Phantom
pm Insider
 
Posts: 913
Joined: Feb 21, 2001 @ 8:14am
Location: Houten, Netherlands


Re: Question about Gzip (Dan are you there?)

Postby Dan East » Sep 7, 2001 @ 2:10pm

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
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Re: Question about Gzip (Dan are you there?)

Postby Paul » Sep 7, 2001 @ 2:16pm

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...
Paul
pm Insider
 
Posts: 9835
Joined: Apr 2, 2001 @ 3:15pm
Location: California


Re: Question about Gzip (Dan are you there?)

Postby Jaybot » Sep 7, 2001 @ 4:01pm

Paul, I think I might know why no one answered it it; you should try asking a Question if you want an Answer.
-------
|\\ //|
-- ^ --
|||
User avatar
Jaybot
pm Insider
 
Posts: 3208
Joined: Mar 22, 2001 @ 10:04pm
Location: Desk.


Re: Question about Gzip (Dan are you there?)

Postby Paul » Sep 7, 2001 @ 4:04pm

i said 'anyone know?' what more do you want? oh yeah... 'musical talent'
Paul
pm Insider
 
Posts: 9835
Joined: Apr 2, 2001 @ 3:15pm
Location: California


Re: Question about Gzip (Dan are you there?)

Postby Jaybot » Sep 7, 2001 @ 4:23pm

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'
-------
|\\ //|
-- ^ --
|||
User avatar
Jaybot
pm Insider
 
Posts: 3208
Joined: Mar 22, 2001 @ 10:04pm
Location: Desk.


Re: Question about Gzip (Dan are you there?)

Postby Moose or Chuck » Sep 7, 2001 @ 5:02pm

He's so uncharismatic... Our Jaybot, alienating all in his path.
Moose or Chuck
 


Re: Question about Gzip (Dan are you there?)

Postby Dan East » Sep 7, 2001 @ 6:10pm

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
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Re: Question about Gzip (Dan are you there?)

Postby Digby » Sep 7, 2001 @ 6:33pm

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>
Digby
pm Insider
 
Posts: 1011
Joined: Apr 29, 2001 @ 1:53pm


Re: Question about Gzip (Dan are you there?)

Postby Jaybot » Sep 7, 2001 @ 6:36pm

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.
-------
|\\ //|
-- ^ --
|||
User avatar
Jaybot
pm Insider
 
Posts: 3208
Joined: Mar 22, 2001 @ 10:04pm
Location: Desk.


Re: Question about Gzip (Dan are you there?)

Postby Moose or Chuck » Sep 7, 2001 @ 6:45pm

It's also in the Simpsons, at one point, I believe.
Moose or Chuck
 


Re: Question about Gzip (Dan are you there?)

Postby Jaybot » Sep 7, 2001 @ 6:52pm

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.
-------
|\\ //|
-- ^ --
|||
User avatar
Jaybot
pm Insider
 
Posts: 3208
Joined: Mar 22, 2001 @ 10:04pm
Location: Desk.


Re: Question about Gzip (Dan are you there?)

Postby Moose or Chuck » Sep 7, 2001 @ 7:49pm

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
Moose or Chuck
 


Next

Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron