The only files that would end up being substantially smaller would be the CAB files - when compressing single files with 7z(LZMA) and single files with CAB(LZO) is minimal.
Compressing multiple files is where the compression ratios increase.
A bunch of tests I just did:
shell32.dll, 7z: 2,234kB
oembios.bin, 7z: 12,975kB
webfldrs.msi, 7z: 1,681kB
shell32.dll, cab: 3,134kB
oembios.bin, cab: 12,806kB
webfldrs.msi, cab: 1,681kB
shell32.dll, slim: 1,928kB
oembios.bin, slim: 12,872kB
webfldrs.msi, slim: 1,660kB
So you can see, some files are compressed nicely with 7z, some are bigger, and some just don't change. (Slim ones are there for comparison only)
The only problem I can see with redoing cabinet.dll is that functions WILL need to pass through to the original cabinet.dll if they find something that it needs to extract normally. A lot of programs rely on the cab format, and you'll find that certain things will not function unless it can cope with normal LZO cab format. (I think MSI acts that way...)
And in case you were wondering, here was the batch files that I used to test with:
copy c:\windows\system32\shell32.dll .
copy c:\windows\system32\oembios.bin .
copy c:\windows\system32\webfldrs.msi .
makecab c:\WINDOWS\system32\shell32.dll
makecab c:\WINDOWS\system32\oembios.bin
makecab c:\WINDOWS\system32\webfldrs.msi
"C:\Program Files\7-zip\7z.exe" a -t7z -m0=BCJ2 -m1=LZMA:d=23:fb=64:a=2:lc=7:mf=bt3 -m2=LZMA:d=18:fb=66:a=2:lc=8:lp=2:mf=bt2 -m3=LZMA:d=18:fb=81:a=2:lc=0:lp=2:mf=bt2 -mb0:1 -mb0s1:2 -mb0s2:3 shell32.dll.7z shell32.dll
"C:\Program Files\7-zip\7z.exe" a -t7z -m0=BCJ2 -m1=LZMA:d=23:fb=64:a=2:lc=7:mf=bt3 -m2=LZMA:d=18:fb=66:a=2:lc=8:lp=2:mf=bt2 -m3=LZMA:d=18:fb=81:a=2:lc=0:lp=2:mf=bt2 -mb0:1 -mb0s1:2 -mb0s2:3 oembios.bin.7z oembios.bin
"C:\Program Files\7-zip\7z.exe" a -t7z -m0=BCJ2 -m1=LZMA:d=23:fb=64:a=2:lc=7:mf=bt3 -m2=LZMA:d=18:fb=66:a=2:lc=8:lp=2:mf=bt2 -m3=LZMA:d=18:fb=81:a=2:lc=0:lp=2:mf=bt2 -mb0:1 -mb0s1:2 -mb0s2:3 webfldrs.msi.7z webfldrs.msi
slim23d.exe a -v -o218 -m912 -- shell32.dll.slim shell32.dll
slim23d.exe a -v -o218 -m912 -- oembios.bin.slim oembios.bin
slim23d.exe a -v -o218 -m912 -- webfldrs.msi.slim webfldrs.msi
You may be able to tweak the ratios a bit - the 7z flags I was using were geared for executable compression.
slim can be found at:
http://www.bars-trade.com/slim/ - unfortunately it takes AGES to compress with it, so it's listed for comparison purposes only.
This post has been edited by Wraith: 26 June 2006 - 05:09 AM