32 They vary in effectiveness, and the time taken to process large files. Experiment! |
32 They vary in effectiveness, and the time taken to process large files. Experiment! |
33 |
33 |
34 ### Uglify |
34 ### Uglify |
35 'Uglification' is the name Squish gives to a certain basic form of compression. With large files it can reduce the |
35 'Uglification' is the name Squish gives to a certain basic form of compression. With large files it can reduce the |
36 size by some kilobytes, even after full minification. It works by replacing Lua keywords with a single byte and |
36 size by some kilobytes, even after full minification. It works by replacing Lua keywords with a single byte and |
37 inserting code at the start of the script to expand the keywords when it is run. |
37 inserting some short code at the start of the script to expand the keywords when it is run. |
38 |
38 |
39 #### --uglify |
39 #### --uglify |
40 Enable the uglification filter. Default is to not uglify. |
40 Enable the uglification filter. Default is to not uglify. |
|
41 |
|
42 #### --uglify-level=LEVEL |
|
43 If the level specified is "full" then Squish will extend its replacement to identifiers and string literals, as |
|
44 well as Lua keywords. It first assigns each identifier and string a score based on its length and how many times |
|
45 it appears in the file. The top scorers are assigned single-byte identifiers and replaced the same as the keywords. |
41 |
46 |
42 ### Gzip |
47 ### Gzip |
43 Gzip, or rather the DEFLATE algorithm, is extremely good at compressing text-based data, including scripts. Using |
48 Gzip, or rather the DEFLATE algorithm, is extremely good at compressing text-based data, including scripts. Using |
44 this extension compresses the squished code, and adds some runtime decompression code. This decompression code adds |
49 this extension compresses the squished code, and adds some runtime decompression code. This decompression code adds |
45 a little bit of time to the loading of the script, and adds 4K to the size of the generated code, but the overall |
50 a little bit of time to the loading of the script, and adds 4K to the size of the generated code, but the overall |