View Single Post
Old 02 October 2007, 00:33   #1
AAG
Registered User
 
Join Date: Jun 2007
Location: West Yorkshire, UK
Posts: 30
Want to trim your Gamebase Amiga install by 124 MB?

After just after 2 days of constant ZipMaxing, here are the gains :-

extras/SPS
Was 2216.4M, now 2192.7M, saved 23.7M

extras/WHDLoad
(only whdl's as used by gamebase amiga)
Was 1.61 GB, now 1.57 GB, saved 36m

games
Was 1921.3M, now 1874.6M, saved 46.7M

Music
Was 99.5 MB, now 94.4 MB, saved 5.1M

Screenshots
Whilst searching for zip packers, I stumbled accros pngout and PNGGauntlet (a GUI front end). It recompresses png files
whilst mainting image quality.)
Was 74.9 MB, now 62.0M, saved 12.9M

Total saving 124.4M

Background/why?

After a recent HD loss, and general lack of diskspace, I've decided to backup working Gambase installations to DVD rather
than keeping all the inital game download, plus various updates etc.

Whilst doing this, I started wondering of the zip's were actually compressed as effciently as they could be. I'd used
ZipMAx before with my Mame collection, and it did make a bit of a difference.

(ZipMax uncompresses a zip archive, then re-compresses the file(s) with a list of user defined packers. It then creates a new zip file with the most compressed file(s) from the original and resulting zips, in order to produce the smallest possible zip file - whilst maintaning 100% ZIP compatibility.)

After a lot of experimenting with various packers, and different inputs/switches, (details of which are towards the bottom
of this essay,) I obtained the above results. These are the best which I'm able to get by using a reasonable amoung of packers - ie 2!!

NOTE
This may seem a bit strange, but I wouldn't reckomend re-packing your existing zips.

It took me just over 2 days of constant use, on a dual-core machine, with fast-user switching enabled with 2 sessions, each session running Zipmax and the cpu was at 100% all of the time!

Although, the screenshot/PNGGauntlet maybe worth a try - as it didn't take that long.

However - the reason for posting this is because it maybe useful for new releases of Gamebase Amiga and also the KG's WHDL
releases. Eg the "GameBase Amiga - Rare Games (Update v1.4 to v1.4.3).zip" was 13.2MB. After repacking, it was 12.8MB. (Ok,
not that much but it's an average saving of 14K per *already ready* compressed file - which I think is pretty good.)

Here's how to do it
(Make sure you have a backup first in case it goes wrong!!!)

Software for ZipsSoftware for Screenshots
Note
"DeflOpt" is needed for both Zips and Screenshots, and you need a version of 7zip to decompress it!

To re-zip

Optional first step - check your current Zip collection

Run "GbSTFixIt.exe" - either type or drag the folder which holds your Gamebase Amiga (zip) files. In my case G:\Gamebase\GameBase Amiga".

Click the "Zip Test (general)" btton. This will then scan that dir + sub dirs, looking for zips and then tests them with 7-zip. (I know that 7zip integrated with explorer has a test button - but it dosn't do the
recursive checks).

This will then flag an issues with your existing zips

Next step - DeflOpt

Locate 7za.exe - either from "c:\temp\GBStFix_20\7ZIP\7za.exe" or whereever.

Open a command prompt - start->run->cmd (or start->run->command for 9x)

cd c:\temp (or wherever DeflOpt207.7z is located).

"G:\Gamebase\GBStFix_20\GBStFix_20\7ZIP\7za.exe" X DeflOpt207.7z

(this will extract deflopt.exe and txt to c:\temp in this case)

Next step - ZipMax
Extract ZipMax051.zip. Ie c:\temp\ZipMax\.
Copy 7za.exe into the same dir as zipmax.
Copy kzip.exe into the same dir as zipmax.

I've attched by zipmax.ini file - although you'll need to rename it back to ini as .ini isn't a valid upload file type for this forum.

NOTES chaages from default
skip-internzip = 1
logfile = 1
thread-priority = above_normal
setcurrenttime = 1
packer-exe-1 = kzip.exe
packer-cmd-1 = /r /y /s0 /b128 %1 %2
packer-exe-2 = kzip.exe
packer-cmd-2 = /r /y /s0 /b256 %1 %2
finalstep-exe = deflopt.exe
finalstep-cmd = %1

Start ZipMAx.exe
Drop on some zip files/directories and wait......

NOTES on WHDL's
I only re-compressed the files as used in Gamebase Amiga. Also, some whdl's contain non-windows pc friendly filenames. These 2 were excluded as they weren't in KG latest dat file.

BackToTheFuturePart2_v1.2_0005.zip
KillingGameShow_v1.1.zip

The ziplog log showed errors on these files, I'm not sure what the problem was with these (haven't invedtigated yet) - But
I know the zips should be ok as they tested ok with GbStFix/7zip :-

D:\gb\WHDLoad-repack\Aquanaut_v1.1_F1Licenceware.zip ->
D:\gb\WHDLoad-repack\BluesBrothers_v1.1.zip -> EXTERNAL ZIPPING FAILED
D:\gb\WHDLoad-repack\HoleInOne_v1.0.zip -> EXTERNAL ZIPPING FAILED
D:\gb\WHDLoad-repack\Supremacy_v1.1_1384.zip -> EXTERNAL ZIPPING FAILED

ScreenShots
Install PNGGauntlet and run it. (Via start->Run.)

Click the "preserve gamma information" and "brute force compress". Also tick the "overwrite original files).

PNGGauntlet "doesn't do" recursive dirs - so goto your Screenshots dir, search for *.png - then "select all" and drag the
contents into PNGGauntlet.

Click optimize and wait.

Optional next step
Start a command prompt. Cd into a directory where deflopt.exe resides. Enter
DeflOpt /r "G:\Gamebase\GameBase Amiga\Screenshots\*.png"
this will knock a few extra bytes of the pngs.


Methodology (if your interested)

Re-used a tool which parsed the zipmax.log file and produced counts of which packer(s) produced the smallest file, which I
wrote when doing this for mame.
Wrote another tool which generated the cmd lines for 7za and kzip, with various switches. (Around 170 in total). Compressed
a test set of files and checked output. 2 packers were used most of the time, followed by 1 few more.
Took the top 3 and used on a started on the sps. Checked the ouput once about half way through, and decided that no.3
wasn't been used often enough and removed it.
Compressed rest of the zips using 2 packers.
Took a few re-compressed files and then tried re-compressing with the original master list, and a few other options. I've
found another kzip combination with saves a few bytes in around 50% of cases.

I'll post my logfiles if anyone is interested....
Attached Files
File Type: txt zipmax.txt (2.7 KB, 223 views)
AAG is offline  
 
Page generated in 0.04295 seconds with 12 queries