SitePoint Sponsor

User Tag List

Results 1 to 12 of 12
  1. #1
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)

    Code Compressors

    What are they? What do they do?

    What is Gzip? What is Minify?

    Thanks.
    ~TehYoyo

  2. #2
    SitePoint Wizard bronze trophy Jeff Mott's Avatar
    Join Date
    Jul 2009
    Posts
    1,314
    Mentioned
    19 Post(s)
    Tagged
    1 Thread(s)

  3. #3
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    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?

    ~TehYoyo

  4. #4
    SitePoint Wizard bronze trophy Jeff Mott's Avatar
    Join Date
    Jul 2009
    Posts
    1,314
    Mentioned
    19 Post(s)
    Tagged
    1 Thread(s)
    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.

  5. #5
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    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.[citation needed]
    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.[2]
    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.[3] 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?

    ~TehYoyo

  6. #6
    SitePoint Wizard bronze trophy Jeff Mott's Avatar
    Join Date
    Jul 2009
    Posts
    1,314
    Mentioned
    19 Post(s)
    Tagged
    1 Thread(s)
    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:

    ...the process of removing all unnecessary characters from source code, without changing its functionality.... 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.

  7. #7
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Jeff Mott View Post
    For Gzip, from the wiki page:

    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:
    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)
    Quote Originally Posted by Google
    Minify is a PHP5 app...
    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.

    ~TehYoyo

  8. #8
    SitePoint Wizard bronze trophy Jeff Mott's Avatar
    Join Date
    Jul 2009
    Posts
    1,314
    Mentioned
    19 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by TehYoyo View Post
    How does it zip it? Through a program on the server-side? From what I upload through my FTP client?
    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.

    Quote Originally Posted by TehYoyo View Post
    And for Minify....the first result for searching 'Minify' leads to the Google Code page
    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, Google's Closure Compiler has largely superseded it.

  9. #9
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    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?

    Thanks.
    ~TehYoyo

  10. #10
    SitePoint Wizard bronze trophy Jeff Mott's Avatar
    Join Date
    Jul 2009
    Posts
    1,314
    Mentioned
    19 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by TehYoyo View Post
    I just downloaded Google's Closure Compiler...that will do it on my own computer, right?
    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.

  11. #11
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Gosh dang it. I hate command-line programs

    But thanks.
    ~TehYoyo

  12. #12
    SitePoint Wizard bronze trophy Jeff Mott's Avatar
    Join Date
    Jul 2009
    Posts
    1,314
    Mentioned
    19 Post(s)
    Tagged
    1 Thread(s)
    As you read through Closure Compiler's documentation, you'll discover the online app: http://closure-compiler.appspot.com/home


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •