Jump to content
CCleaner Community Forums
mr don

Can CCleaner be made even smaller with UPX

Recommended Posts

CCleaner is awesome, & winrar can compress it to 1/2 or less of its normal size, in a single SFX file. UPX can compress it still smaller, then put into a rar file.

 

Any chance CCleaner might be UPX packed in the future?

 

Or will this set off too many Anti-Virus apps?

 

Smaller is better, isn't it?

 

Thanks!

Share this post


Link to post
Share on other sites

+1 :D Let's take a simple test with CCleaner v2.18.878 (2009.03.26)

 

UPX 3.03d Markus Oberhumer, Laszlo Molnar & John Reiser Apr 27th 2008

 

File size / Ratio / Method / command line

1488112 -> 526576 35.39% (all methods: upx --all-methods CCleaner.exe)

1488112 -> 573680 38.55% (best method: upx --best CCleaner.exe)

That was fun! Reduced to ~1/3 of it's initial size

Share this post


Link to post
Share on other sites

I think it would be alright to do on your own for instance when using CCleaner Portable, just make sure you're keeping all the icons with something like this:

 

upx --best --compress-icons#0 "CCleaner.exe"

 

 

However for the program to be distributed with UPX compression I'd be against it as that alone will from time to time create false positive virus alerts when some antivirus app detects UPX which happens. That coupled with the already once in awhile false positives wouldn't exactly be a good thing.

Share this post


Link to post
Share on other sites
CCleaner is awesome, & winrar can compress it to 1/2 or less of its normal size, in a single SFX file. UPX can compress it still smaller, then put into a rar file.

 

Any chance CCleaner might be UPX packed in the future?

 

Or will this set off too many Anti-Virus apps?

 

Smaller is better, isn't it?

 

Thanks!

 

Using this will waste space because every time you extract the file it will expand to a temp folder

Share this post


Link to post
Share on other sites
Using this will waste space because every time you extract the file it will expand to a temp folder

 

I agree, don't need any more false AV positives. Well, about the "This will waste space because every time you extract the file, it will expand to a temp folder".

 

True to an extent, that it does expand to the temp dir, but here is where it can also come in handy.

Open CCleaner & save the settings like you want, get all the directories you want to add to your custom delete folder (I hate those sample pics dir, don't you?).

Download winrar + batch icon extractor (the best icon extractor around, along with being simple & free) & install winrar.

 

Drop CCleaner onto batch icon extractor to get the icon, then navigate to the CCleaner + .ini options file in winrar & add it to a rar file using best compression + solid.

Open the rar file you just made in winrar, then click the SFX button. Set it to open ccleaner.exe, then to extract to a temp dir, & lastly to use the icon you ripped earlier.

 

Now, why would you do this, you might ask? Simple!

 

A - Using a single file is much easier than using multiple files, especially on a flash drive where you can then drop the exe files all together instead of multiple folders to contain all the files. It makes for a much cleaner & easier to use flash drive experience.

B - Using a self extractor, this extracts it to the user's local drive to run, instead of the flash drive, which not only saves wear on your flash drive, but runs it faster as well.

C - Prevent the file from accidentally being changed. If you accidentally changed a few options, or clicked where you shouldn't, all you did was change the .ini in the temp dir. Since your file is locked into 1 exe, it will re-load next time you click it, exactly as it was before.

D - Rarring the file makes it much easier to transfer to your email, to download to use on another pc you have. Smaller files work better on the web, & Rar compression in the 3.8 series seems to be at least as deep as 7z under most circumstances, if not tighter at times. Sometimes you 1/2 or 1/3 the size of a file or more, but already compressed files like jpg or mp3 may not work so well to try to trim them further.

E - There may be other formats like Paq that are insanely tight, but they require insane amounts of time & memory to unpack and to pack them compared to 7z or rar. In addition, a third party program may be used to unpack it so you can click it to run it, whereas if you upx the file, or use winrar sfx, you have no problem.

F - The thought behind doing this to a lot of programs, with the exception of files around 30 mb or larger that may take a while to extract, is that you also reduce file fragmentation on a computer, there bye making it a cleaner, leaner running machine with the advantage also of being simpler to search your files if you use an application like locate32 to index & browse lightning fast (find as you type, like in firefox). By having a large part of your files done this way, it also increases how much free space you have left on your flash drive for other things like driver backups with double driver (before you format someone's pc to reinstall windows etc). There is more free space on the local drive as well if you do this to other apps.

 

Have found I was able to rar abiword from a default install of 20 something mb, to taking out uninst.exe, language strings I didn't need etc, rar into an SFX that I could reduce it to 3.87 mb. Having taken foobar & set the settings to use the same dir as foobar is in, then rarring it to an SFX file, I am confident even if I made changes to the toolbar, or accidently "messed up" the color scheme, whatever, that next time I use it, it will be right back to where I had it set last time.

 

I do hope that you can see the many advantages of using compressed self extractors now. Did I mention that if you accidentally lose files, that using data recovery is much easier to undelete a single file than trying to piece together 8, 30, or yes, some apps have over 15,000 files & or folders in their app directory! How would you like to try to undelete 15,000 or more individual files & folders, trying to be sure to get them all back in the right order, place, & name, hoping to recover them all?

 

No thanks! 1 EXE will do it for me, haha!

 

P.S. I have found that SFX archives created with winrar will also typically clean up after themselves as well. As soon as you close out of the executable you are working with, it auto cleans the temp folder it used.

Share this post


Link to post
Share on other sites

mr don you could also try the PortableApps.com AppCompactor, which would incidentally use UPX compression on the files however it would greatly reduce the size which seems to be the goal, and if you yourself make the compression you'll instantly know any false positive virus alerts are just that false positives.

Share this post


Link to post
Share on other sites
mr don you could also try the PortableApps.com AppCompactor, which would incidentally use UPX compression on the files however it would greatly reduce the size which seems to be the goal, and if you yourself make the compression you'll instantly know any false positive virus alerts are just that false positives.

 

IMHO, that is a nice utility, if I say so myself. I used earlier, a few programs including one called free upx or something like that, just drag files onto it and select compression. I also tried many other things such as uharc, & it was able under uharc to go even deeper than upx, but with the disadvantage of having to use another program to decompress it back, whereas upx needed no other utility to get it to work.

 

I tried 7zip, winrar, paq, but paq uses a form that requires too much mem to pack & also to unpack. Winrar 3.8 seems to be pretty fast, & rar + solid seems in most cases to be as deep or deeper than 7z.

 

I have tried NSIS ZIP2EXE at times, & it works aight, but I like how you can modify a rar container so much easier.

 

Preciate the new compressor, will be trying it. Really looks so simple.

 

Tried the compressor on CCleaner using all settings.

UPX Max took several min the first time, but acheived from 1.4 mb to 510 kb

LZMA flew through it & got 510 kb

Rar max got 533 kb

 

Strangely, the best compressions seems to have been after I upx'd ccleaner to 510 kb, then I rarred it to max rar compression & it dropped to 492 kb. However, I wasn't using the 66 kb icon I extracted with Batch Icon Extractor, so that would have brought it up to maybe 500ish something kb to turn it into a compressed self extracting executable. Attempting to rar the file first & SFX it, then UPX it seemed not to affect the file size as much as doing the UPX first.

 

What is amazing about UPX is the size diff is permanent.

Rar does almost as good of a job, in much less time, & when it is extracted, it returns to the original size.

 

UPX is lossy, rar isn't. Yet it gets very close to the same compression as UPX in far less time without losing quality. Strange, isn't it?

Share this post


Link to post
Share on other sites

Little bit strange i thought about this because that wouldn't work. When you load a upx archive it extracts everything to the temp folder. Since ccleaner cleans up he temp folder it would destroy itself and possibly crash

Share this post


Link to post
Share on other sites
Little bit strange i thought about this because that wouldn't work. When you load a upx archive it extracts everything to the temp folder. Since ccleaner cleans up he temp folder it would destroy itself and possibly crash

 

CCleaner does not get cleaned from the temp folder due to the .ini file that gets extracted to the same folder as CCleaner, telling it NOT to delete files unless they are 24 hours old or older.

 

This is why CCleaner works like this!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...