I've found Dean Edward's lib for .NET on his website. This is almost what I want, but that was made for .NET 1.1 and there isn't an option to shrink variables.
How can I achieve it?
Based on Ilya Volodin answer I found Microsoft Ajax Minifier
Using the DLL I can just call
And it will return the minified script, more details about this here. That is exactly what I was looking for. It also has a StyleMinifier that is a big plus!
jsmin <file1[,file2,fileN]> <outfile>
jsmin jquery-1.4.4.js jquery.min.js