r1ch.net forums
* Home Help Search Login Register
r1ch.net  |  r1ch.net stuff  |  R1Q2  |  Topic: pakoptimz - .pak optimization tool
Pages: 1 [2] 3  All
Print
Author Topic: pakoptimz - .pak optimization tool  (Read 131477 times)
n99
Guest
« Reply #15 on: January 11, 2005, 12:22:23 pm »

I wanted a similar program for a long time, even tried coercing NRGizer (.fin) into coding it for me, and he does, just doesn't work flawlessly yet. What I would like, is a program that takes all the pak files in your base q2 / mod dir, decompresses them all, then recompresses all the needed files into a single file again.

I have about 115 mb of paks in my aq2, this could save heaps of space, and would make it easier to take my pak on 'business trips' Wink. But.... to find out manually which file is used from which pak seems an enormously daunting job. Does this make sense? Shall I post a link to the pakker beta thingy? Someone might be willing to have a look to see what's wrong.
Logged
LARRY
Member

Posts: 6


« Reply #16 on: January 21, 2005, 07:41:23 am »

I wanted a similar program for a long time, even tried coercing NRGizer (.fin) into coding it for me, and he does, just doesn't work flawlessly yet. What I would like, is a program that takes all the pak files in your base q2 / mod dir, decompresses them all, then recompresses all the needed files into a single file again.

I have about 115 mb of paks in my aq2, this could save heaps of space, and would make it easier to take my pak on 'business trips' Wink. But.... to find out manually which file is used from which pak seems an enormously daunting job. Does this make sense? Shall I post a link to the pakker beta thingy? Someone might be willing to have a look to see what's wrong.

I just tried this manually and I got an error from pakexplorer that I'd reached the maximum number of files allowed in my pak.
Logged
R1CH
Administrator
Member

Posts: 2625



« Reply #17 on: January 21, 2005, 10:11:59 am »

Yeah the main issue is going to be running into the 4096 file limit. Then you have to try and get some way of getting duplicated content into one pak and the unduplicated into another for the best possible savings... kind of complex!
Logged
LARRY
Member

Posts: 6


« Reply #18 on: January 21, 2005, 10:34:58 am »

And probably slow too.
Logged
slacker
Member

Posts: 39


« Reply #19 on: February 08, 2005, 08:58:58 am »

just ran pakoptimz on the giant retail quake2 pak0.pak file.. results:

Quote
Wrote file content (183101058 bytes).
Writing directory structure (211648 bytes).
Writing pak header (12 bytes).
Completed. 183997730 bytes -> 183312718 bytes (99.63%)

doesnt seem to save much space at all? is this the output im supposed to see?
Logged
R1CH
Administrator
Member

Posts: 2625



« Reply #20 on: February 08, 2005, 09:12:35 am »

Yes, the original Q2 pak doesn't contain much duplicated content at all.
Logged
slacker
Member

Posts: 39


« Reply #21 on: February 09, 2005, 08:51:10 am »

hmm i didnt realise that there is a limit on the amount of files you can store inside a pak. i search on google hasnt revealed anything to me, does anyone have any idea what figure this limit is?
Logged
Weasel
Member

Posts: 85



« Reply #22 on: February 09, 2005, 11:15:58 am »

Well considering that R1CH knows the client inside and out since he has basically rewritten it, I would say the file limit is 4096 files as stated above.
Logged
slacker
Member

Posts: 39


« Reply #23 on: February 09, 2005, 11:47:10 pm »

thanks weasel.. i admit im guilty of not reading the *entire* thread Smiley
Logged
slacker
Member

Posts: 39


« Reply #24 on: February 10, 2005, 09:02:30 pm »

just did some experimentation with aq2 map textures.. had good success. with the first 4000 files in my action/textures folder, i reduced to size to around 75% - saving 15mb! packaging another 3 or 4 paks should contain all of the aq2 textures in that dir. although it is kind of dissapointing, about tha 4096 file limit. if there was no limit, the saved space would be enormous.

have you heard much about mSpark's linkfile code in ltktbm? basically there's a linkfile.txt, listing all of the textures, and which of those textures are duplicates of another texture. this basically achieves the same thing as pakoptiz, by eliminating dupe textures without a pak file. this method would get passed the file limit problem, but generating the linkfile.txt would be extremely difficult.

i was wondering if you could modify pakoptimz, to instead read a dir, find all of the dupe textures, then output them into a list with the same format as linkfile.txt. then it would just be a matter of porting mspark's linkfile code into other engines, for everyone to benefit.

i know this means more work for you, but what do you think? i think it would result in massive space savings.
Logged
R1CH
Administrator
Member

Posts: 2625



« Reply #25 on: February 11, 2005, 06:35:20 am »

The only problem with that is that scanning the linkfile list for each file access could become very slow with 4000+ entries. I don't really see why 4096 was chosen since the memory is dynamically allocated anyway. In fact R1Q2 doesn't even use such a limit, I removed the error when using > 4096 files now and made it only output a warning that the packfile may be incompatible. It should be possible to modify other popular clients to support more too with minimal effort and possibly even apply a binary patch to the 3.20 .exe too.
Logged
slacker
Member

Posts: 39


« Reply #26 on: February 11, 2005, 10:29:57 pm »

ah you bring up a good point..

just need to find a way to get rid of the 4096 limit when creating the paks to be optimised by pakoptimz then.
Logged
R1CH
Administrator
Member

Posts: 2625



« Reply #27 on: January 09, 2006, 06:05:55 pm »

Bump for optimized pak goodness!
Logged
optimizer
Member

Posts: 35


« Reply #28 on: January 10, 2006, 10:30:55 am »

Im the PAK optimizer O_o
Logged
Xtife
Member

Posts: 63


« Reply #29 on: July 11, 2006, 11:18:27 am »

i have found this to be very handy Smiley

i also found that when using pakscape and saving it after it has been run through pakoptimz
it will simply undo the optimizations instead of corrupting it like pakexplorer(which is a crap tool anyways)

BTW: can this be stickied?  grin
« Last Edit: July 11, 2006, 11:21:27 am by Xtife » Logged
Pages: 1 [2] 3  All
Print
r1ch.net  |  r1ch.net stuff  |  R1Q2  |  Topic: pakoptimz - .pak optimization tool
Jump to:  

Powered by SMF 1.1.19 | SMF © 2013, Simple Machines