Thursday, May 31, 2012
Microsoft AutoRoute 2001 Portable Launcher
I couple of months ago I dug up Mazda EPC2 Portable Launcher from my archives and shared it with you. Yesterday I dug up my old copy of AutoRoute 2001 and decided to try and make it portable. Since it worked I'll show you what you need to get it working for you, too :) Actually there are 2 tings you'll need - installation CD and my portable launcher (available in the Download section bellow). This time I followed the specifications posted by PortableApps.com platform :) Ok, let's get to the details:
1. Install your Microsoft AutoRoute 2001 on your computer.
2. Extract my portable launcher (download bellow).
3. Copy all the contents of AutoRoute to the App\AutoRoute folder from the extracted archive. You should have AutoRout.exe file in App\AutoRoute folder.
4. Uninstall Microsoft AutoRoute 2001.
5. Run the launcher and see if it's working :) Should be working. I tested this only on Windows 8 DP and CP, both 32-bit and 64-bit, but it should work on everything from XP and above.
6. Enjoy never installing AutoRoute 2001 again (if you still use it) :)
Downloads:
AutoRoute 2001 Portable
AutoRoute 2001 Portable Source
Monday, May 28, 2012
Automated JS/CSS combining/minifying system - JSS Build Environment
Recently I wrote a post about JS compressors and how they compare to each other. Now I've build a system for combining and/or minifying JS and CSS files. This system uses Google's Closure Compiler for JS minification and Google's Closure Stylesheets for CSS minification. Both of them require Java, so if you want to use 'Compress' option, then you'll need to install it and point JSS Build Environment to java.exe. I recommend extracting jPortable to a folder next to this EXE file.
Features:
- JavaScript combine and minify
- CSS combine and minify
- Automatic combine/minify when one of the input files is changed.
- Control over the sequence of combining
- Minimizing to system tray
- Single EXE without installer
Setup:
close-compiler is the folder containing compiler.jar file of Closure Compiler.
closure-stylesheets is the folder containing closure-stylesheets.jar of Closure Stylesheets.
Java folder contains extracted files from jPortable.
JSS Build Environment can run without all of these folders, but you'll only have combine option.
Usage:
To use this app, you need to add files to CSS or JS panels (or both), choose Output file and click Build. It's as simple as that. Of course this only activates combining. No compression is applied. If you want compression, then you have to setup files as described in Setup above and then check Compress checkbox before building.
Now let's talk about Auto Build feature. This is really useful feature when you need to build every time you change something. Auto Build monitors the files and when some file is changed it starts build procedure. Build procedure includes compression if it's checked, but I recommend not checking it, as compression takes time and you'll need to wait a lot just to see let's say your text in red. Combining Auto Build with minimizing to system tray and some balloons makes things look and work really good.
Download:
JSS Build Environment
Source Code (in Delphi XE)
Happy codding ;)
Friday, May 18, 2012
Minimizing Dropbox usage thus maximizing free space
I bet you already know about Dropbox and currently you are searching of a way to increase the available free space. I'm already at the maximum available space - 25.8GB. I've done Getting Started, Sharing staff, DropQuest 1 and 2 and beta photo upload (dough last 500MB never got to me). Referrals are also to the maximum. So right now I'm stuck with ~26GB till Dropbox releases another option for gaining free space :( Then I thought what if I shrink the size of my files instead of increasing my free space? It's a good idea, but I needed a way to make it without archives, as I wanted to be able to open the files with a double click. To answer this I first needed to analyze what type of files do I have and how often I use them. Here is my report:
Music files - MP3 mostly. Everyday use.
Video files - VOB, MOV, AVI, MKV and MP4. Using them from time to time.
Pictures - JPG mostly. Using them from time to time.
Text files - PDF, MHT (HTML site in one file), TXT. Most of the files are used once per year at best.
Programs - lots of EXE and DLL executable files. Using them on daily basis.
After the analysis I found out there is a way to compress 99% of my files and still be able to open them by just double clicking! Of course to do that I needed to change some formats, loose some (unnoticeable) quality and loose a lot of time (most of the time was for research, so you won't lose it as I'm giving you all info in one place), but it was totally worth it! I was able to shrink all my files and add a lot more and still have almost half of my Dropbox free! In numbers, I was able to compress ~35GB to ~15GB!!! That's 20GB saved! And I still have 10GB of free space with all my music and pictures being in a save place :) So, how I did it? Let's get down to the details:
Music files - MP3 mostly. Everyday use.
Video files - VOB, MOV, AVI, MKV and MP4. Using them from time to time.
Pictures - JPG mostly. Using them from time to time.
Text files - PDF, MHT (HTML site in one file), TXT. Most of the files are used once per year at best.
Programs - lots of EXE and DLL executable files. Using them on daily basis.
After the analysis I found out there is a way to compress 99% of my files and still be able to open them by just double clicking! Of course to do that I needed to change some formats, loose some (unnoticeable) quality and loose a lot of time (most of the time was for research, so you won't lose it as I'm giving you all info in one place), but it was totally worth it! I was able to shrink all my files and add a lot more and still have almost half of my Dropbox free! In numbers, I was able to compress ~35GB to ~15GB!!! That's 20GB saved! And I still have 10GB of free space with all my music and pictures being in a save place :) So, how I did it? Let's get down to the details:
Music files
MP3 is an old format and as such it's not the best. There are other formats which can provide better quality on the same bitrate. Also it's proven that 128 kbps MP3 is enough for most people. Only trained ear can make difference between 128 kbps and 320 kbps MP3. So compressing your MP3 files to 128 kbps will save you a lot disk space (saved me 7GB), but you'll loose some quality (not that you'll notice it). To minimize quality loss, use another file format, newer that MP3! There are OGG, WMA, AC3 and others. I personally used OGG, but WMA is better integrated (almost all MP3 players read it) - you decide. To encode my files into the new format I used MediaCoder with the following settings:Video files
VOB files are VERY large files! They are one of the main reasons I got 20GB saved :D Other files are small, but not as small as I wanted to! So I searched Internet about the best new (newer almost always is better) codec that have support in players too. I ended up with Google's WebM. It was able to compress 250MB VOB into 32MB WEBM file! Of course there is slight (unnoticeable) quality loss, but when you watch this video say 10-15 years from now, the quality then will be much better and this VOB's quality will look awful with or without this small quality loss. The memories this video brings you are important, not the video quality itself ;) Other files are already compressed, so WEBP was able to slice the size in two without any quality loss! So how do I encode to WebM? Well, the best way I found is using an Add-on for Mozilla Firefox (I'm a Chrome fan, but sometimes Firefox beats the crap out of Chrome) called Firefogg.Pictures
It turns out WebM has a sister project called WebP for pictures instead of movies :) So I used it. It was able to smack 5MB JPG into 1MB WEBP without any loss! For already compressed JPEGs with size of 1-1.5MB, WebP was able to deliver files with sizes between 100-150KB! Also WebP supports lossless compression with alpha channel, so you can smack your PNG files too :) GIF files are in the works ;) For more on how to compress your images using WebP see my earlier blog post.Text files
Here I did a bit of cheating - I uploaded as much as I could in Google Docs and compressed text files which I do not use often (for an example my old HTML projects). All the text files were less than 100MB, so not much cheating. But there are some files left, too big to be uploaded to Google Docs. 55MB PDF file! Google Docs allows only 2MB file to be uploaded :( Almost all of my PDF files were larger. Not to mention MHT files. So what I did is I compressed those PDFs with Adobe Acrobat Pro using this tutorial. This sliced 20MB off of this large PDF! And the end result is again PDF! So it just compresses the PDF. The down side is reduced compatibility - older PDF readers won't be able to read it. Who cares - Chrome reads it :D What about MHTs? Well here I had to make a couple of conversions to be able to convert MHT to PDF and then compress it using Acrobat Pro. Chrome cannot open MHT files, but can print everything to PDF file. So I needed this MHT opened in Chrome no matter what! Well, the solution is simple - open it with IE and save it as complete web page. Then open this HTML file with Chrome and print it as PDF. After that crush it with Acrobat Pro and you should have smaller PDF than the MHT. If you are advanced web user like me, you can even open object inspector and remove useless stuff from the web page before printing - this will further reduce the size of the PDF ;) In the end, after the compression, I uploaded again to Google Docs files with sizes smaller than 2MB. End result - 50% less space for text files :)Programs
This actually is quite simple - use PortableApps.com AppCompactor to compress all of your programs. Backup all programs before use. Set to best compression first. Compress them one by one and test them after compression. If the program doesn't run, copy over the backup and try again with other compression algorithm. In my case all compressed perfectly with the best compression :)Conclusion
All file types can be opened with popular software. OGG is supported by all popular players, WebM is also supported by them and browsers like Chrome, Firefox and Opera. WebP can be opened with some picture viewers like Picasa and IrfanView and can be opened with the default Windows Photo Viewer by installing a codec supplied by Google. PDFs can be opened with latest version of your PDF reader or by Chrome. So all in all this is a win-win situation - you get more space and you are still able to use your files as before :)ReactOS on Acer Aspire One (installation without CD)
As I mentioned earlier, I've tried ReactOS on my AOA110, but without any success. Here I'll show you how to install ReactOS without CD. First, there is not an easy way to make ReactOS run on those netbooks. At first I tried 0.3.14 using a flash drive with CDFS partition (some flash drives allow you to have a partition which the BIOS and OS sees as CD), but that failed. Then I tried chaining GRUB with Freeloader, but that failed too. In the end I was able to install ReactOS (56595) by first installing it in a virtual machine and then copying all files to the netbook's SSD and again using GRUB. After loading ReactOS it asked me for a lot of drivers, but I had them prepared and copied to the SSD The bad new is only WiFi driver installed, but I didn't found any way to scan for WiFi networks. When tried to install video driver (GMA 950) using it's setup program, everything went fine, till next boot - blank screen after ReactOS boot screen. Also installing LAN (Realtek) driver through ReactOS' wizard ended in BSOD.
Drivers tested:
Video - only setup install possible, which crashes the system after reboot
Audio - wizard can't find the driver (XP version)
LAN - wizard finds the driver, but ends in BSOD (both 2000 and XP versions)
WiFi - wizard finds and installs successfully the driver
Web Cam - wizard can't find the driver (XP version)
There ware also some other drivers (ACPI, System device, USB something), but I don't know that they are and where to get drivers for them. ReactOS doesn't have them.
So, if you are still up to it, here is the full procedure to install ReactOS on your PC without using a CD:
1. Get all the drivers and extract them (ROS doesn't support ZIP files). You'll need XP drivers, but 2000/2003 might work as well.
2. You'll need to prepare USB flash drive with WinPE using WinBuilder or use Windows Vista/7/8 USB install drive. You may also use Linux, but if you know how to use it, you won't be reading this :D.
3. After creating the flash drive and ensuring it works, it's time to install ReactOS under virtual machine. I used VirtualBox for the purpose, as it's free.
4. Install VBox, create a virtual machine and a virtual hard drive (make sure it's VHD format), and install ROS. Shutdown the machine after you get to the desktop.
5. It's time to mount the VHD file. At this point it'll be good if you are running Windows 7 or better. If not, you'll need to mount it using VHDMount. Othewise use this procedure - type in CMD the following commands:
diskpart
select vdisk file=path_to_reactos_vhd
attach vdisk
assign
6. Now you should have a new drive in Windows Explorer. Go to your flash drive and create new folder with the name ROS. Copy in it all the contents of the VHD file (the new letter in Windows Explorer).
7. In ROS folder create a new folder called Drivers and copy all the extracted drivers.
8. Download GRUBinst, extract it and copy it to ROS folder.
9. From GRUB folder copy grldr file to ROS folder.
10. In ROS folder create a new file with name menu.lst and open in with Notepad. In in paste the following code and save it:
title ReactOS
root (hd0,0)
kernel /freeldr.sys
11. Get back to the diskpart to detach VHD by typing the following commands:
detach vdisk
exit
exit
12. You are about to install ReactOS on your PC. Just to be sure, you should have a flash drive containing bootable Windows based OS, ROS folder on it containing all the files from ReactOS + GRUB and Drivers folders containing GRUBinst and extracted drivers respectively. If you have all that, you are ready. Plug the drive in your PC and boot from it.
13. Open CMD (if you are using Windows Setup flash drive, wait till you get to HDD format window and press Shift + F10 - this will bring you CMD) and type diskpart.
14. In diskpart you'll need to find the drive number on which you'll install ReactOS. Typically that's 0, so from now on I'll use hd0 as drive, but if yours is another number, replace 0 with the number you need. Also, you'll need to change it in menu.lst file you created earlier. To see the number type list disk.
15. Type the following commands and your ReactOS should be installed. Note in my case C: is the drive I'll be installing ReactOS to and D: is my flash drive letter. Switch the letters as you need (if you need). Also note this procedure will destroy all your data on your HDD/SSD, not just C drive! All partitions will be lost! If you mistake the hard drive number you risk cleaning another drive! USE AT YOU OWN RISK!
select disk 0
clean
create partition primary
select partition 1
format fs=fat32 quick
active
assign
exit
xcopy d:\ROS\*.* c: /e /x /b
d:
cd ROS
cd GRUB
grubinst.exe (hd0)
16. Your ReactOS should be now ready to boot, so reboot the machine.
17. First you should see GRUB manager with only one option - ReactOS. If you don't, then something is wrong with GRUB installation. If you do, press enter and you should see Freeloader's options (ReactOS, debug etc.). If you don't, then there is a problem with chaining GRUB to Freeloader - check your menu.lst to see if the correct HDD number is written.
18. If everything is ok, you should be getting a wizard asking for a specified driver. If you have this driver, try installing it. If not, let the OS try to install some (probably it'll fail). Also note you may get BSOD while installing a driver. ReactOS will ask you for many drivers, so have patience.
19. Browse arround ReactOS and be happy :)
Wednesday, May 16, 2012
Aspire One AOA110/AOA150 BIOS mod - a disaster and a solution
Here I'll tell you how to revert back to the latest official BIOS of Acer Aspire One if you have this kind of trouble with the modded one.
2. Meanwhile download the latest official BIOS and prepare an USB flash drive using this tutorial.
3. When you get your netbook out of the freezer, act as fast as you can - plug the power and the USB drive and flash using the same procedure mentioned in the article for preparing the USB drive.
4. After flashing check if the BIOS is the official or not. If it's not, put the netbook back in the freezer and try again. Sometimes this procedure doesn't work from the first time. If the BIOS is the official, your flashing was successful. Shutdown the netbook and let it warm up naturally.
AOA_3309_mod_G.bin /G Save current BIOS to file (from IHISI).
AOA_3309_mod_1.bin /1 Save current BIOS to file (1Mbits from memory)
AOA_3309_mod_2.bin /2 Save current BIOS to file (2Mbits from memory)
AOA_3309_mod_4.bin /4 Save current BIOS to file (4Mbits from memory)
AOA_3309_mod_8.bin /8 Save current BIOS to file (8Mbits from memory)
The story:
Ok, a couple of days ago I decided to search for a modded BIOS, for my AOA110, with more options available in the menus. I came across this. I was happy, very happy with this discovery and I rushed to flash it! Flashing (under Windows) went fine. The new BIOS had many new options available in it, just what I wanted! I spent maybe 10 minutes poking around the BIOS - checked every option's meaning. Then I changed a a couple of them, that I thought will give a boost, and rebooted. Windows started loading and suddenly upon welcome screen my Aspire One powered off! First thought - some of the options I changed are making the system unstable. So I decided to go to the BIOS and switch option by option back to it's original state, to see which one is the one to blame. Yeah, right! I entered the BIOS, found the first option I changed and when tried to change it back to it's original state, the netbook powered off again! In fact the fan was spinning at it's best! This means the CPU is working too hard and it's overheating, leading to power off, to prevent it from burning. Ok, I though I'll load BIOS defaults, as this could be done really fast. I did it :) But no result :( Then I noticed the last comment, from mad_max, in the thread I downloaded the modded BIOS - he had exactly the same problem as me! If only had read that earlier... not that would have stopped me from trying :D So, while searching the internet for a solution, the netbook apparently cooled off a bit, as when I run it, I had a bit more time to work before power off. Still not enough to flash it. Then I though - I'll cool it in the fridge! So I did that :) After 3 hours of cooling I run it and this time I was able to open My Computer before power off :D Ok, the time needed to do that is about 40-50 seconds (haven't really measured it), which may be enough to flash the BIOS, but I wouldn't try it yet. I wanted a bit more time, so I froze my AOA110! It worked and I was able to flash it back to it's latest official BIOS version :)The procedure:
1. Put your netbook to your freezer and leave it there for 30-40 minutes. As zstand from Reddit suggested, "Place the laptop in a large, sealed ziplock bag before placing it in the freezer/fridge. The humidity might cause some damage".2. Meanwhile download the latest official BIOS and prepare an USB flash drive using this tutorial.
3. When you get your netbook out of the freezer, act as fast as you can - plug the power and the USB drive and flash using the same procedure mentioned in the article for preparing the USB drive.
4. After flashing check if the BIOS is the official or not. If it's not, put the netbook back in the freezer and try again. Sometimes this procedure doesn't work from the first time. If the BIOS is the official, your flashing was successful. Shutdown the netbook and let it warm up naturally.
Update 2014:
Since the links in the forum are dead, I took the liberty to export the modded BIOS from my AOA and share it here. I used Insyde Flash Utility for InsydeH2O Flashit V1.2j IHISI V1.7.2 downloaded from the official website of Acer. I made all the 5 dumps the utility allows, but first (G) is what most people want. Still, I never know, so I attached all of them:AOA_3309_mod_G.bin /G Save current BIOS to file (from IHISI).
AOA_3309_mod_1.bin /1 Save current BIOS to file (1Mbits from memory)
AOA_3309_mod_2.bin /2 Save current BIOS to file (2Mbits from memory)
AOA_3309_mod_4.bin /4 Save current BIOS to file (4Mbits from memory)
AOA_3309_mod_8.bin /8 Save current BIOS to file (8Mbits from memory)
USE THIS AT YOU OWN RISK!!! I'M NOT RESPONSIBLE IF YOU BRICK YOUR DEVICE!!!
Monday, May 7, 2012
Converting multiple files into WebP under Windows (MultiWebP)
You know of Google's image format WebP? If you do and you want to convert your images to .webp, you'll notice it's a bit hard, as you have to do it image by image. I wrote a little batch file, called MultiWebP, which can automate this for you ;) You can download it bellow. There are two files - test.bat and encode.bat. The first is optional and is used to encode only one file, just to test the settings. The second file is used to encode the whole folder :)
Update: New version is out!
Details for MultiWebP 2.0:
- Only one file! test.bat and encode.bat are now combined in MultiWebP.bat.
- One file means only one line of settings, not two as before.
- Subfolders. MultiWebP now supports subfolders. You can run it on a parent folder and all files will be encoded, even those in subfolders.
- Progress. MultiWebP now shows total files to convert and files converted till now.
- Colors. MultiWebP now shows it's window in different colors, depending on the progress made. This is useful for remote observing (if you lay down on your bed and wait it to finish). Color levels: black - 0 to 32%, blue - 33 to 66%, aqua 67 to 100% and green when all is done.
- Beep. Additionally Windows' beep sound is heard upon all task completed.
Installation:
1. Download WebP package from Google and extract it somewhere. Optional you can download WebP codec to be able to open .webp files with your Windows Photo Viewer.
2. Download my scripts and extract them.
3. Place the two files next to cwebp.exe.
4. Create two shortcuts for test.bat and encode.bat and name them as you like.
5. Open Explorer and type in the address bar %APPDATA%\Microsoft\Windows\SendTo
6. Paste the two shortcuts there. Now you should see both of them in the Send To menu.
Settings:
You should read Readme.txt of WebP and learn about what cwebp.exe parameters are available. Then you should open test.bat/encode.bat, find cwebp.exe and change it's parameters. I've included some by default, so you can start using my scripts without changing settings.
Usage:
1. Create a folder where you'll put cwebp.exe supported images that have common source (shot with the same camera), to ensure settings will be the same for all files.
2. Right click one of the files and send it to test.bat.
3. Change settings for test.bat if you don't like the result and repeat step 2, until you are pleased with the result.
4. After you found your settings, copy them to encode.bat.
6. You are about to convert the whole folder, so make sure you don't have any unsupported by cwebp.exe files as they will be deleted in the end!
7. Right click on the folder and send it to encode.bat.
8. Go take a walk :)
Update: New version is out!
Details for MultiWebP 2.0:
- Only one file! test.bat and encode.bat are now combined in MultiWebP.bat.
- One file means only one line of settings, not two as before.
- Subfolders. MultiWebP now supports subfolders. You can run it on a parent folder and all files will be encoded, even those in subfolders.
- Progress. MultiWebP now shows total files to convert and files converted till now.
- Colors. MultiWebP now shows it's window in different colors, depending on the progress made. This is useful for remote observing (if you lay down on your bed and wait it to finish). Color levels: black - 0 to 32%, blue - 33 to 66%, aqua 67 to 100% and green when all is done.
- Beep. Additionally Windows' beep sound is heard upon all task completed.
Installation:
1. Download WebP package from Google and extract it somewhere. Optional you can download WebP codec to be able to open .webp files with your Windows Photo Viewer.
2. Download my scripts and extract them.
3. Place the two files next to cwebp.exe.
4. Create two shortcuts for test.bat and encode.bat and name them as you like.
5. Open Explorer and type in the address bar %APPDATA%\Microsoft\Windows\SendTo
6. Paste the two shortcuts there. Now you should see both of them in the Send To menu.
Settings:
You should read Readme.txt of WebP and learn about what cwebp.exe parameters are available. Then you should open test.bat/encode.bat, find cwebp.exe and change it's parameters. I've included some by default, so you can start using my scripts without changing settings.
Usage:
1. Create a folder where you'll put cwebp.exe supported images that have common source (shot with the same camera), to ensure settings will be the same for all files.
2. Right click one of the files and send it to test.bat.
3. Change settings for test.bat if you don't like the result and repeat step 2, until you are pleased with the result.
4. After you found your settings, copy them to encode.bat.
6. You are about to convert the whole folder, so make sure you don't have any unsupported by cwebp.exe files as they will be deleted in the end!
7. Right click on the folder and send it to encode.bat.
8. Go take a walk :)
Wednesday, May 2, 2012
JavaScript Compressors Comparison
Recently I got back a bit to my old hobby - writing JS in my spare time. There is something in me that makes me optimize things. I love optimizing, no matter if it'll be a drop in the ocean, a lost time. But no matter how much you optimize, you never can beat a JavaScript compressor. So, I decided to test a couple of JS compressors available for free online use and see which is the best. For this purpose I used two files, from some of my JS projects:
JSOS.js - 97.8 KB (100 227 bytes) of mainly procedure oriented code, written for my JavaScript Operating System 5 years back. The code is a crap. Not one standard is kept while writing. Hell, I didn't even knew there are standards back then. And I didn't knew about compressors neither, so I compressed as much as I could by hand.
portfolio.js - 45.9 KB (47 020 bytes) of mainly object oriented code, written for my portfolio. Code is a bit new (one year old or so), but I still don't like it :D
The compressors I choose to benchmark are:
1. Google's Closure Compiler
2. Yahoo's YUI Compressor
3. Microsoft's Ajax Minifier
4. Dojo's shrinksafe
5. Online Javascript Compression Tool
Ok, lets see how they do on default settings.
1. Closure Compiler
JSOS.js - 88.1 KB (90 220 bytes)
portfolio.js - 39.4 KB (40 374 bytes)
2. YUI Compressor
JSOS.js - 89.8 KB (92 035 bytes)
portfolio.js - 34.5 KB (35 406 bytes)
3. Ajax Minifier
JSOS.js - 88.4 KB (90 537 bytes)
portfolio.js - 33.9 KB (34 734 bytes)
4. shrinksafe
JSOS.js - 93.6 KB (95 885 bytes)
portfolio.js - 36.8 KB (37 767 bytes)
5. Online Javascript Compression Tool
JSOS.js - 89.2 KB (91 358 bytes)
portfolio.js - 34.5 KB (35 381 bytes)
Let's wrap-up these results in graphics:
Or in percents:
As we can see, the "default" winner for crappy procedure oriented code is Google's Closure Compiler with just 317 bytes ahead of Microsoft's Ajax Minifier. For object oriented crappy code, the "default" winner this time is Microsoft's Ajax Minifier, while previous winner, Google's Closure Compiler is at last place.
Now let's see what those compressors can do at their best:
1. Closure Compiler
JSOS.js - 35.5 KB (36 376 bytes)
portfolio.js - 31.5 KB (32 352 bytes)
2. YUI Compressor
JSOS.js - 89.8 KB (92 035 bytes)
portfolio.js - 34.5 KB (35 406 bytes)
3. Ajax Minifier
JSOS.js - 84.7 KB (86 767 bytes)
portfolio.js - 33.2 KB (34 056 bytes)
4. shrinksafe
JSOS.js - 92.3 KB (94 562 bytes)
portfolio.js - 36.1 KB (36 991 bytes)
5. Online Javascript Compression Tool
JSOS.js - 89.2 KB (91 358 bytes)
portfolio.js - 34.5 KB (35 381 bytes)
In graphics:
and in percents:
Yes, I noticed Closure Compiler, too! At first I thought it produced a non working code, but when I tried it - it works as a charm! I don't know how they did it, but they did it :) So apparently the "max" winner for crappy procedure oriented code is Google's Closure Compiler. For crappy object oriented code, the "max" winner is again Google's Closure Compiler with a lead of more that 1k of code. Notice Yahoo's YUI Compressor and Online Javascript Compression Tool - they both have the same numbers as for default test?!?!? Well, their default settings are actually their best settings. That's a bit disappointing, as default settings of some compressors are better that the best settings of YUI Compressor, and I know a lot of people are using it. So I recommend to those people to switch to Closure Compiler.
Let's make an average to name a winner by the normal formula:
1st place = 5 points
2nd place = 4 points
3rd place = 3 points
4th place = 2 points
5th place = 1 point
Results:
So the order is:
1. Ajax Minifier
2. Closure Compiler
3. Online Javascript Compression Tool
4. YUI Compressor
5. shrinksafe
You agree with that? Neither do I. This formula is good for other uses. Here we should really find how many bytes are saved, average. Let's see the same table again, but this time with bytes and percents saved.
Now we see who the real winner is:
1. Closure Compiler
2. Ajax Minifier
3. Online Javascript Compression Tool
4. YUI Compressor
5. shrinksafe
So next time you need to shrink JS files, consider Closure Compiler as a good choice :)
JSOS.js - 97.8 KB (100 227 bytes) of mainly procedure oriented code, written for my JavaScript Operating System 5 years back. The code is a crap. Not one standard is kept while writing. Hell, I didn't even knew there are standards back then. And I didn't knew about compressors neither, so I compressed as much as I could by hand.
portfolio.js - 45.9 KB (47 020 bytes) of mainly object oriented code, written for my portfolio. Code is a bit new (one year old or so), but I still don't like it :D
The compressors I choose to benchmark are:
1. Google's Closure Compiler
2. Yahoo's YUI Compressor
3. Microsoft's Ajax Minifier
4. Dojo's shrinksafe
5. Online Javascript Compression Tool
Ok, lets see how they do on default settings.
1. Closure Compiler
JSOS.js - 88.1 KB (90 220 bytes)
portfolio.js - 39.4 KB (40 374 bytes)
2. YUI Compressor
JSOS.js - 89.8 KB (92 035 bytes)
portfolio.js - 34.5 KB (35 406 bytes)
3. Ajax Minifier
JSOS.js - 88.4 KB (90 537 bytes)
portfolio.js - 33.9 KB (34 734 bytes)
4. shrinksafe
JSOS.js - 93.6 KB (95 885 bytes)
portfolio.js - 36.8 KB (37 767 bytes)
5. Online Javascript Compression Tool
JSOS.js - 89.2 KB (91 358 bytes)
portfolio.js - 34.5 KB (35 381 bytes)
Let's wrap-up these results in graphics:
Or in percents:
As we can see, the "default" winner for crappy procedure oriented code is Google's Closure Compiler with just 317 bytes ahead of Microsoft's Ajax Minifier. For object oriented crappy code, the "default" winner this time is Microsoft's Ajax Minifier, while previous winner, Google's Closure Compiler is at last place.
Now let's see what those compressors can do at their best:
1. Closure Compiler
JSOS.js - 35.5 KB (36 376 bytes)
portfolio.js - 31.5 KB (32 352 bytes)
2. YUI Compressor
JSOS.js - 89.8 KB (92 035 bytes)
portfolio.js - 34.5 KB (35 406 bytes)
3. Ajax Minifier
JSOS.js - 84.7 KB (86 767 bytes)
portfolio.js - 33.2 KB (34 056 bytes)
4. shrinksafe
JSOS.js - 92.3 KB (94 562 bytes)
portfolio.js - 36.1 KB (36 991 bytes)
5. Online Javascript Compression Tool
JSOS.js - 89.2 KB (91 358 bytes)
portfolio.js - 34.5 KB (35 381 bytes)
In graphics:
and in percents:
Yes, I noticed Closure Compiler, too! At first I thought it produced a non working code, but when I tried it - it works as a charm! I don't know how they did it, but they did it :) So apparently the "max" winner for crappy procedure oriented code is Google's Closure Compiler. For crappy object oriented code, the "max" winner is again Google's Closure Compiler with a lead of more that 1k of code. Notice Yahoo's YUI Compressor and Online Javascript Compression Tool - they both have the same numbers as for default test?!?!? Well, their default settings are actually their best settings. That's a bit disappointing, as default settings of some compressors are better that the best settings of YUI Compressor, and I know a lot of people are using it. So I recommend to those people to switch to Closure Compiler.
Let's make an average to name a winner by the normal formula:
1st place = 5 points
2nd place = 4 points
3rd place = 3 points
4th place = 2 points
5th place = 1 point
Results:
Closure Compiler | YUI Compressor | Ajax Minifier | shrinksafe | OJSCT | |
---|---|---|---|---|---|
Points | 16 | 10 | 17 | 5 | 13 |
1. Ajax Minifier
2. Closure Compiler
3. Online Javascript Compression Tool
4. YUI Compressor
5. shrinksafe
You agree with that? Neither do I. This formula is good for other uses. Here we should really find how many bytes are saved, average. Let's see the same table again, but this time with bytes and percents saved.
Closure Compiler | YUI Compressor | Ajax Minifier | shrinksafe | OJSCT | |
---|---|---|---|---|---|
Bytes | 95172 | 39612 | 48400 | 29289 | 41016 |
Percents | 32.32 | 13.45 | 16.43 | 9.95 | 13.93 |
1. Closure Compiler
2. Ajax Minifier
3. Online Javascript Compression Tool
4. YUI Compressor
5. shrinksafe
So next time you need to shrink JS files, consider Closure Compiler as a good choice :)
Subscribe to:
Posts
(
Atom
)