Thursday 30 October 2014

WHAK PAK - A New Javascript Packer & Compressor

 www.ScriptCompress.com  will make a Javascript optimized, minified, compressed, obfuscated (helps protect your coding from prying eyes), cleaned and then packed into a self executing script that will automatically extract/compile it's self.  ScriptCompress.com  works by making a wordlist from your script. It then rids of the duplicates. It now assigns an unused character to repeated words. Now you might get say word Document replaced numerous times, each time with one character, eventually the byte savings add up to make up for the 250 byte unpacker. It does not rely at all on Base62 for compression, but it's included as an obfuscation selection. This JavaScript packer is really 12 packers mixed into one tool. Some obfuscate, some compress (LZMA & BZip), some just aren't necessary. 

Javascript compressor, obfuscator, packer, minifier, debugger and more! Create self extracting executable Javascripts/scripts. What Is This? You might be asking yourself where you can find a simple online file compressor for JavaScript files. Well today is your lucky day, you have found one of the best file compression tools on the web for all your JS files. Shrink file size with ease, just copy-paste, generate your code, paste the results to your production web server and off you go.

Create self extracting executable Javascripts/scripts. What Is This? You might be asking yourself where you can find a simple online file compressor for JavaScript files. Well today is your lucky day, you have found one of the best file compression tools on the web for all your JS files. Shrink file size with ease, just copy-paste, generate your code, paste the results to your production web server and off you go. This is an online JavaScript compressor/minifier that allows you to compress and minify your javascript files.

Bloated JQuery and addon/plugin scripts frustrating you? MAKE THEM SMALLER!


Compressed Java Script files are ideal for live production environments since it will typically reduce the file size by 25-90%. Most of the filesize reduction is achieved by removing comments, extra whitespace characters, new line characters, and sometimes block delimiters that are not needed by web browsers or visitors, without changing its functionality. These things are put into code to add readability, but are not required for it to actually execute. In fact, a lot of javascript gets packed up these days with Dean Edwards amazing Packer functionality. This is great for delivery and optimization, but hard for people to poke in and learn some new techniques. I couldn’t be so easily defeated by Virb’s code. Ryan at YAIB created a little bookmarklet widget to enable the decode functionality at dean’s packer site. Drag the reEnable link to your bookmark bar, then head over to the packer site and click the button. The “copy” textarea should now be writeable and the decode button activated. Now copy in your packed and obfuscated code and hit decode. If successful, you should now see some var’s and null’s and everything be looking a little more like readable javascript. Head over to Beautify Javascript, paste your decoded code in, and hit the big button. You’ll now have some nice looking javascript to inspect. Cheers. Packer accepts a JavaScript input file and outputs its contents minified and/or obfuscated. Free online javascript compressor that allows you to compress and minify your javascript files. Compressed javascript files are ideal for production environments since they typically reduce the size of the file by 30-90%. Most of the filesize reduction is achieved by removing comments and extra whitespace characters that are not needed by web browsers or visitors. Why Would I Want To Compress Javascript? There are a number of reasons why compressing your javascript files is a good idea: Quicker download times for your users. Reduced bandwidth consumption of your website. Reduced number of HTTP requests on your server when combining many javascript files into one compressed file, thus reducing the server load and allowing more visitors to access your website. Comments and whitespace are not needed for javascript execution; Removing them will reduce file size and speed up script execution times. The online JavaScript Obfuscator obfuscates JavaScript source code to make it difficult to understand. Obfuscation provides significant protection for your source code. Obfuscation also provides effective compression of JavaScript files to reduce script download time. Hide JS, it is easy. As rich web applications are being built with larger JavaScript code bases, the need for JavaScript compression to keep bandwidth and page load times as small as possible is becoming more important for faster load times and more enjoyable user experiences. Which JavaScript Compressor is the best? That can be a tough question to answer and in many cases it depends on your application.
www.ScriptCompress.com
This tool can compress Javascript with several of the most popular JavaScript compressors, simultaneously and show you a detailed visual analysis of the results. There are many tools available that can help you compress your JavaScript code but it can be time consuming and difficult to analyze which tool works the best for a given situation. This web application shows aggregated statistics on the general level of compression in all these tools, and allows developers to easily play with and compare the different tools on their own JavaScript code without having to set up all the tools on their own. The following tools are compared, both with and without the affects of additional gzip compression that are supported natively by modern web browsers. Compress Javascript? Why The Heck Would I Want To Do That? There are a number of reasons why compressing your javascript files is a good idea: Quicker download times for your users. Reduced bandwidth consumption of your website. Reduced number of HTTP requests on your server when combining many javascript files into one compressed file, thus reducing the server load and allowing more visitors to access your website. Comments and whitespace are not needed for javascript execution; Removing them will speed up script execution times. You will quickly see the difference once you have minified your JavaScript. It is a general recommendation to compress your JS if the file is larger than 4096 bytes, if your JS is less than this total you will not get any real improvements so please be aware of this fact. If there is more than 25 bytes that the file can be compressed by, you should see a benefit Minified source code is extremely useful for interpreted languages that are deployed and transmitted over the Internet (ex. JavaScript), because it reduces the amount of data that needs to be transmitted. Source code that has been minified may also be used as a kind of obfuscation. Minification can be distinguished from the more general concept of data compression in that the minified source can be interpreted immediately without the need for an uncompression step, the same interpreter can work with both the original as well as with the source that has been minified. What Javascript Compression Method is Used? This free online Java Script compression tool for all javascript minification and compression.
www.ScriptCompress.com

The protection process starts with a bytecode obfuscation, including the renaming of all member types (packages, interfaces, classes, methods, fields and local names) to shorter, random and unique names and it continues by removing unused class file information at execution time such as debugging information, unnecessary attributes, unused members and unused instructions, resulting in a reduction of class size. After that, a string encryption is optionally performed and, depending on the application type, a AES class encryption preventing decompilers from showing the obfuscated code and a AES resource encryption are applied. Extract crypted, sfx and part archives in 7z, ACE, BZIP2, CAB, JAR, LHA, LZH, PAK (PB, JC), PAQ8P, RAR, UHA, ZIP and special Amiga Kick 1.3 - 3.1 formats in LZX, PowerPacker (PP11, PP20, PX20, PPLS, PPbk), FImp (IMP!, ATN!), XPK (BZP2, IMPL, NONE, PWPK, SQSH), StoneCracker (S404), MMCMP. Packs full directories or files in 8 formats: 7z, UHA, LZH, ZIP, PAK, RAR, PAQ8P, CAB. Also pack as protected ones or export as a self extracting (SFX) executable archives in 7z, UHA, RAR.

www.ScriptCompress.com
We implements a general-purpose JavaScript parser, compressor, beautifier toolkit. It is not developed on NodeJS. The tokenizer/parser generates an abstract syntax tree from the JS code. You can then have various manipulations done to the code. You DO NOT actually install anything else to have this free online JS minification/compression tool work, never are any changes done to your computer either. How Much Will It Cost To Use This? This is brought to you ABSOLUTLY FREE. We believe in the Open Source community and this project/tool uses all Open Source technologies and this is our way of giving back to others We do display Ad's on this page to help cover a small portion of the infrastructure costs to bring this tool to you for free. Other Facts About Using Our Online Tool This tool will not download anything on, nor install anything on your computer. You simply just have to copy and paste your Java Script into the box or upload your JavaScript files, then you will download the new combined and minified JS file. We never store anything you minify compress or upload, the temporary files are destroyed immediately. Since there is nothing to install using this, there is nothing to worry about un-installing later on down the road or remembering to make sure you updated it. This tool does not make any changes to your computer or the computer's settings, so no worrying about remembering what you did or had changed on your computer. This is a OS, Browser and computer independent tool. All the work is done on our servers, then destroyed after outputting the code or once you have downloaded the new combined file, or once you leave the site.
www.ScriptCompress.com
Don't stress about installation choices as there is never any using this tool as it is all online. We do not bundle (unless you are bundling your JS files) or distribute anything harmful, nothing goes on to your machine and you can review all modifications UglifyJS makes to your code before deploying it on your website. Which is wise to do regardless of your library or tool of choice for your minification purposes. What other things can I do to help increase my websites page load speed? If you are trying to help increase your data transmission in all areas you can also add gzip compression with your web server. All major browsers support data being sent in gzip. You might be asking yourself why would I need to minify if I am going to run gzip compression on the data anyways. The main difference between the two types is minifying is a lossy compression, whereas gzipping is lossless. For example It can also speed up parsing of the javascript in the end users browser. If the files the browser has to parse are large it is just going to increase the actual parsing and tokenising the file. Theoretically minifying your JavaScript file may lead to more repetitions of the same text, which if you are using gzip compression as well, could mean slightly higher compression. Another great tip is to make sure all the images on your site are sized to what you are going to display them at for your end users. You can also make sure the image file has been compressed the most without altering your actual image size. Of course after a certain point you will degrade your images quality, so make sure you view your image before pushing live. Make sure you do not have any uneccessary resources running. Such as if you are running a blog, don't just install plugins to install them, everyone you enable requires resources to run which can impact your end users expierence. Or say you have services running on your box that are not really required, make sure you are only running exactly what is required and nothing more, this can also help mitigate any extra security hassles.
www.ScriptCompress.com
The best thing to keep in mind is the more resources running can lead to slower page load times. One big thing many seem to forget is to make sure any scripts you are using are actually up to date and to make sure you take care of all depreciated functions/variables as they arrise. A good example would be say you are running jquery.min.js and you never touched the file after you setup your site or had it built. There is a very good possibility that you are running an outdated version, many times sites are multiple versions behind. This can also open you up to security issues or exploits. CDN's or Content Delivery Networks are a great way to serve content like images. What they can do for you is serve the content to your end users at the closest possible location around the world, which in turn means even faster load times for your visitors around the globe. Browser caching is another great method to help speed up your page load. This technology helps for when your visitors come back to you site. If it is within your cookies life span the content will then be called from their cache instead of actually downloading the file again. The best way to do this is with the actual webserver, there are plugins for blogs and similar types tools. But you will get your best results properly configuring it on the webserver. A preffered method by many is to put your CSS files at the top of your page and have all your JS files or snippets at the bottom. By putting your CSS at the top it prohibits progressive rendering, which will help save resources the browser would use when it loads and redraws the elements on your page. By putting your javascript at the bottom of the page, it prevents your pages from waiting on the full execution of the code before it can continue loading. This will in turn lead to a faster load time. Hey I don't seem to be getting a noticeable result. You may not be noticing any significant change in many factors such as file size or the browser seems to be taking just as long. It is very possible the saving you are getting are not enough to be truly noticed, or there is no real savings. The only true way to see if minifying or even adding in gzip compression will help is to run your own benchmarking and profiling.
Every situation is different ------------- Minification (also minimisation or minimization), in computer programming languages and especially JavaScript, is the process of removing all unnecessary characters from source code without changing its functionality. These unnecessary characters usually include white space characters, new line characters, comments, and sometimes block delimiters, which are used to add readability to the code but are not required for it to execute. JavaScript optimizers such as JSMin[1] and Packer[2] are specially designed for modern web programming techniques, and are able to understand and preserve conditional comments, and similar. Packer, for instance, can optionally Base64 compress the given source code in a manner that can be decompressed by regular web browsers, as well as shrink variable names that are typically 5–10 characters to single letters, which reduces the file size of the script and, therefore, makes it download faster.[3] Google has released their Closure Compiler, which also provides minification as well as the ability to introduce more aggressive renaming, removing dead code, and providing function inlining.[4] In addition, certain online tools, such as Microsoft Ajax Minifier,[5] the Yahoo! YUI Compressor or Pretty Diff,[6] can compress CSS files.[citation needed] There is a PowerShell script named "minifyPS"[7] that is able to shrink PowerShell script code as well as JavaScript code. There is a free online tool that can minify JS[8] with UglifyJS and has the ability to combine multiple files Minified source code is especially useful for interpreted languages deployed and transmitted on the Internet (such as JavaScript), because it reduces the amount of data that needs to be transferred. Minified source code may also be used as a kind of obfuscation, though the term obfuscation may be distinguished as a form of false cryptography while a minified code instance may be reversed using a pretty-printer. In Perl culture, aiming at extremely minified source code is the purpose of the Perl golf game. Minification can be distinguished from the more general concept of data compression in that the minified source can be interpreted immediately without the need for an uncompression step: the same interpreter can work with both the original as well as with the minified source. 
This online JavaScript compression utility, provided as a free service by www.ScriptCompress.com, greatly reduces the size of your JavaScript code, stripping out unnecessary http://closure-compiler.appspot.com characters and performing http://dean.edwards.name/packer/ other various techniques that reduce the size of your code, while never changing the way it works.  Lottery Post uses an internal version of this exact same tool to compress almost all JavaScript code it uses, so you can be sure it delivers safe results. This tool does not store a copy of your code.  The server processes it on-the-fly and returns the output to you without storing anything.  So if you use this tool to compress a super-secret bit of JavaScript code (if there is such a thing) it is not stored or read by me For years I have used my own home-grown JavaScript compression utility, and it has performed very well.  But I have always admired Yahoo's YUI Compressor utility, because in addition to always generating flawless, well-compressed code, it also changed the code output in several ways to squeeze out an incredible amount of extra characters. My difficulty in using the YUI Compressor has always been that it is a Java application, and I use all-Microsoft .NET technology — which made my code and the YUI Compressor like oil and water, unable to mix. Transforms some Object and Array definitions to the literal specification.  For example, new Array(1, 2, 3, 4, 5) becomes [1,2,3,4,5]. Combines duplicate literal values contained in a local function scope into local variables.  For example, if the number 12345 is used multiple times in a function scope, a statement such as var a=12345; is created at the start of the function, and all further instances of 12345 are changed to a. Removes unused function arguments.  if a function is defined as function (a, b) {...} but b is never used in the function, it is removed from the argument list.  For safety, only unused arguments at the end of the argument list are removed. Streamlines switch blocks to remove unneeded code, as well as code that is never executed (for example, a break that occurs after a return. Removes all unnecessary curly braces.  For example, curly braces around an if that only enclose one statement. Strips any debugger statements such as $Debug, Debug, Web.Debug, and Msn.Debug.  Also strips calls to the WAssert function. Reworks single- and double-quotes around literal strings, and uses the one that will require the fewest number of escaped characters. Maintains Safari "quirks" safety.  The Safari Web browser has a few strange bugs in how it parses JavaScript code.  The Microsoft Ajax Minifier looks for the presence of these conditions and automatically fixes them. Removes unused portions of code.  The compressor keeps track of the number of times each locally-scoped function is used, and if a function is never used, it is removed from the final output.  Because globally-scoped items are never removed, this operation is safe. Other miscellaneous efficiencies.  There are some other coding efficiencies that you may find when the Online JavaScript Compressor processes your code.  Every effort is made to ensure that the compressed code executes precisely the same as the uncompressed code does. Removes comments and white-space.  This is the most obvious space-savings that all compressors accomplish. Removal of all extra white-space, such that there is not one single extra white-space character.  That's not so common.  The utility is able to achieve complete elimination of white-space because unlike most compressors, the YUI Compressor is built upon an actual JavaScript parser, so it is able to know which line-breaks were necessary because the developer forgot to insert a semi-colon, and it fixes the code before removing the white-space. Removes all unnecessary semi-colons.  For example, semi-colons are not needed before closing braces (}). Reduction/obfuscation of local variable names.  This is my favorite feature because it really helps reduce the size, and it lets you use long variable names without worrying about performance issues or code bloat.  Any variable name that cannot be referenced from outside a function is renamed to a one- or two-letter variable name.  For example, var myLengthyVariable = 0; will become something like var a=0;. Helpful Tips Eliminate all instances of eval() and with {...} from your JavaScript code.  Those two language features are considered "evil" by most expert JavaScript developers, for a number of reasons.  As far as the compressor is concerned, they will function just fine after your code is compressed, but some minification techniques used by the compressor can't be used — especially variable name shrinking.  Therefore, you code can never achieve optimal size as long as the two "evil" features are in your code. Before delivering the code output, this utility always ensures that the last character is a semi-colon.  I implemented this feature as a safety measure for when minified code segments are combined.  You can decide if the final semi-colon is necessary or not when you make use of the compressed output. Make sure that at the very least your code works before trying to compress it.  Your code doesn't have to be perfect, but if the compressor can't interpret it as valid JavaScript, you may get back an empty result or error message. Another thing that may make compression fail is the use of reserved words.  For example, if you try to reference a property named "static" with dot notation (as in myClass.static), the code will refuse to compress.  To get around this, you can code reserved words as quoted array-style references, like myClass["static"].
www.ScriptCompress.com