tehyoyo — 2012-03-15T22:28:43-04:00 — #1
What are they? What do they do?
What is Gzip? What is Minify?
jeff_mott — 2012-03-15T23:37:17-04:00 — #2
tehyoyo — 2012-03-16T15:41:03-04:00 — #3
Yeah...thanks a lot. Thing is...I have already. And I've gone to both websites.
And I still don't understand. (Sorry?) So can you help me instead of giving me stuff that I've already done?
jeff_mott — 2012-03-16T15:54:31-04:00 — #4
If you've read all that information, then hopefully you'd have more specific questions. Right now, your questions are so general, that the most appropriate answers are the first paragraph of the respective wikipedia pages.
tehyoyo — 2012-03-16T16:45:45-04:00 — #5
Gzip is any of several software applications used for file compression and decompression. The term usually refers to the GNU Project's implementation, "gzip" standing for GNU zip. It is based on the DEFLATE algorithm, which is a combination of Lempel-Ziv (LZ77) and Huffman coding. The program was created by Jean-Loup Gailly and Mark Adler as a free software replacement for the compress program used in early Unix systems, and intended for use by the Project. Version 0.1 was first publicly released on October 30, 1992, and version 1.0 followed in February 1993.
OpenBSD's version of gzip is actually the compress program, to which support for the gzip format was added in OpenBSD 3.4. The "g" in this specific version stands for gratis.
FreeBSD, DragonFlyBSD, and NetBSD use a BSD-licensed implementation instead of the GNU version; it is actually a command-line interface for zlib intended to be compatible with the GNU implementation's options. These implementations originally come from NetBSD, and supports decompression of bzip2 and Unix pack(1) format.
Huh. That did more to confuse me than help :/
From what I can glean, gzip is just a regular file format used on local machines. So how does it apply to the web?
I also looked up Minify (earlier, I might add) and got to the Google Code homepage. It's a 'PHP5' app...what exactly is a PHP5 app? Does that mean it's done on the server? Can I compress code on my own personal desktop?
jeff_mott — 2012-03-16T16:54:13-04:00 — #6
For Gzip, from the wiki page:
...headers in HTTP/1.1 allow clients to optionally receive compressed HTTP responses and (less commonly) to send compressed requests.
Web servers can zip text -- like HTML, CSS, JS, etc. -- and the browser unzips it, so that a smaller file is sent over the wire.
For minify... I'm not sure how you ended up at a PHP app. The first result of the google search explains the general practice of minification. From the wiki page:
tehyoyo — 2012-03-16T20:18:20-04:00 — #7
I'm sorry, but you're being really unhelpful. I can read the Wiki page - that doesn't mean I know what it means. Can you explain it in some way? How does it zip it? Through a program on the server-side? From what I upload through my FTP client?
And for Minify....the first result for searching 'Minify' leads to the Google Code page (that I specifically referenced) where it explains, in the second line (and I quote)
I can read, am self-sufficient, and know fully well the power of Google and Wikipedia. I'm just not well-learned in the field of code compressors. If you are, I'd greatly appreciate it if you could help me out.
jeff_mott — 2012-03-16T20:37:14-04:00 — #8
The web server performs the compression on the fly. That web server could be Apache, IIS, nginx, etc. The specific process to enable compression is different for each server. In Apache, it's done with the mod_deflate module.
You're almost certainly looking for info about the general process of minification -- stripping out whitespace and comments, and sometimes munging the code in other, more complicated ways -- in order to reduce it's size.
For a long time, the [YUI compressor was the de facto standard for minification. Today, [url=https://developers.google.com/closure/compiler/]Google's Closure Compiler](http://developer.yahoo.com/yui/compressor/) has largely superseded it.
tehyoyo — 2012-03-16T20:45:48-04:00 — #9
So the Minify page that I was referencing is a plug-in that I can upload to my server. That program does it on the fly (as per request).
I just downloaded Google's Closure Compiler...that will do it on my own computer, right?
jeff_mott — 2012-03-16T21:39:04-04:00 — #10
That will let you run the compiler from the command line or a script. You'll of course need to read the compiler documentation to find out what command line switches you'll want to use.
tehyoyo — 2012-03-17T15:49:01-04:00 — #11
Gosh dang it. I hate command-line programs
jeff_mott — 2012-03-17T16:18:06-04:00 — #12
As you read through Closure Compiler's documentation, you'll discover the online app: http://closure-compiler.appspot.com/home