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.

learn more… | top users | synonyms

37
votes
7answers
36k views

mysqldump to a tar.gz

Usually after dumping a MySQL database with mysqldump command I immediately tar/gzip the resultant file. I'm looking for a way to do this in one command: So from this: mysqldump dbname -u root -p ...
12
votes
3answers
922 views

I accidently zipped my whole server

Alright if anyone wants to play god and work miracles i'm down. So, i was given the task of making a script that found files that are older than 6 months, zipped them and then deleted them. On my way ...
12
votes
3answers
23k views

How to enable either Gzip or Deflate compression via .htaccess?

How to enable either Gzip or Deflate compression via .htaccess and which one is best these days? Code examples needed.
10
votes
5answers
1k views

Grepping through .gz log files

Does there exist a magical shell piping which would allow easily to grep through bunch of .gz log files without needing to extract them somewhere? .gz files are Apache logs, result of log rotation. ...
10
votes
2answers
4k views

Fastest way to extract tar.gz

Is there anyway to extract a tar.gz file faster than tar -zxvf filenamehere? We have large files, and trying to optimize the operation.
9
votes
4answers
532 views

How do I most efficiently store and serve 1,000,000+ small gziped files on a Linux web server?

I have large static content that I have to deliver via a Linux-based webserver. It is a set of over one million small, gzip files. 90% of the files are less than 1K and the remaining files are at most ...
9
votes
4answers
9k views

Need help with some IIS7 web.config compression settings

I'm trying to configure my IIS7 compression settings in my web.config file. I'm trying to enable HTTP 1.0 requests to be gzip. MSDN has all the info about it here. Is it possible to have this config ...
7
votes
5answers
381 views

Grep-ing gzipped files [duplicate]

I have a set of 100 log files, compressed using gzip. I need to find all lines matching a given expression. I'd use grep, but of course, that's a bit of a nightmare because I'll have to unzip all ...
7
votes
1answer
1k views

How do I configure nginx to accept gzip requests?

I know that you can use nginx HttpGzipModule to gzip responses. Can you als use it to enable nginx to handle gzip-compressed requests, i.e. ones with the request header: Content-Encoding: gzip ? ...
6
votes
1answer
1k views

Why isn't the Nginx Gzip Precompression module working?

I'm currently trying to set up Nginx to serve all of my static files. Since they will not be changed very frequently at all I want to us the gzip_static module to allow me to pre-gzip copies of my ...
6
votes
2answers
1k views

Apache: Send pre-packed gzip'ed files

I want Apache to send static files gzip'ed over the wire, but also want Apache to not always gzip them over and over again. So I thought if it wouldn't be possible to deliver an .gz file if it exists. ...
6
votes
2answers
7k views

Why Apache doesn’t gzip css or js files which have parameters?

Some CSS & JS files are not compressed by apache with mod_deflate enabled. This files looks like this "[domain.name]/aggregator.css?..." or "[domain.name]/misc/jquery.js?..." in YSlow. The other ...
5
votes
2answers
5k views

What is the best nginx compression gzip level?

I'm using nginx reverse proxy cache with gzip enabled. However, I got some problems from Android applications HTTP-requests to my Rails JSON web service. It seems when I turn off reverse proxy cache, ...
5
votes
1answer
300 views

How does a web server/the http protocol handle version control and compression?

When a client browser requests a file from the web server, I know that some kind of check is performed, because the files needed to serve the web page may already be cached by the web browser. So, if ...
5
votes
4answers
4k views

rsync to compressed archive of file

I take backups of a server with rsync, but those backups are quite large, and I'd like to compress them. Is there a way to have some sort of wrapper around rsync to gunzip the file in the backup, ...
5
votes
3answers
9k views

Content-Length not sent when gzip compression enabled in Apache?

I would really appreciate some help understanding this Apache behaviour. I am communicating to PHP from an iPhone Objective-C app in application/json. Gzip compression is enabled on the server, and ...
5
votes
1answer
883 views

Howto: create file with current date and time on linux

I have a cron job for creating a gzip file: mysqldump... | gzip -c > myfile..sql.gz I want myfile to be of the format "time_date.sql.gz" How do I create file with the current date and time? ...
5
votes
2answers
5k views

How can I troubleshoot why my IIS7 site is not gzip compressing?

I've got a number of websites on a single IIS7 machine running W2K8. I'm using Fiddler to help me figure out if something is compressed or not. Nothing is. So, I've googled for a few things and ...
5
votes
4answers
8k views

how to enable iis 7 dynamic content compression?

I've turned on dynamic content compression in IIS 7, but Fiddler is showing that my dynamic pages are still being served without content-encoding: gzip. Static content compression is working fine on ...
4
votes
5answers
3k views

Enabling gzip compression in IIS and having it take effect

We've enabled Gzip compression on the server in IIS (IIS6). We've run iisreset. It just doesn't want to take effect. We had this before on another server, and after a little while, it just started ...
4
votes
3answers
2k views

How to list content from a tar file without recursion?

I've a tar (gz, bzip) file and want to see its content, but not recursively. This is: The "first level" in the file. I already know how to see content: tar -ztf file.tar.gz But it's recursive!! ...
4
votes
2answers
152 views

How GZipped contents are transfered on the web?

I heard that static contents like CSS and JavaScript can be better delivered in GZip format. And Content Developer Network (CDN) always does so. However I don't understand how the format works. First ...
4
votes
2answers
2k views

How to gzip logs created by rotatelogs

I'm using rotatelogs to create my daily apache logs in format host.<day>.<month>.<year>.access.log. Now I want to gzip and move log to different directory after it's been finished. ...
4
votes
1answer
304 views

Apache deflates .xml.gz files

I noticed an error in google webmaster tools regarding a gzipped version of a sitemap. Turns out the sitemap.xml.gz file is gzipped twice: one upon creation (as it should be) and another time when ...
4
votes
3answers
1k views

Incorrect gzipping of http requests, can't find who's doing it

We're seeing some very strange mangling of HTTP responses, and we can't figure out what is doing it. We have an app server handling JSON requests. Occasionally, the response is returned gzipped, but ...
4
votes
1answer
1k views

Apache mod_deflate not compressing javascript and css files?

"GET /Symfony/web/app.php/app/dashboard HTTP/1.1" 4513/37979 (11%) "GET /Symfony/web/css/application.css HTTP/1.1" -/- (-%) "GET /Symfony/web/js/application.js HTTP/1.1" -/- (-%) "GET ...
3
votes
5answers
897 views

`outputscript | gzip > $file` not overwriting $file

I have an hourly cron script which take some output (a mysql dump), pipes it through gzip, and aims to overwrite a file of the same name. When I run it manually as root the file is overwritten. When ...
3
votes
1answer
6k views

How can I enable GZIP compression in Jetty?

I have a Jetty server which does not have compression enabled (I tested this here). How can I enable compression?
3
votes
1answer
2k views

How to limit nginx access log file size and compress?

I'm hoping to get some direction on how to set up truncating and gzip'ing on my domains' access logs. I notice that the core nginx access logs get split and compressed by default, yet my individual ...
3
votes
1answer
745 views

Nginx: disable gzip on images

In my nginx conf I have which enabled gzip: gzip on; gzip_proxied any; gzip_types text/plain text/css text/javascript; gzip_comp_level 9; gzip_vary on; However this also gzips my jpeg's which ...
3
votes
6answers
2k views

Does gunzip work in memory or does it write to disk?

We have our log files gzipped to save space. Normally we keep them compressed and just do gunzip -c file.gz | grep 'test' to find important information but we're wondering if it's quicker to keep ...
3
votes
2answers
1k views

nginx is not using gzip to talk to backend servers

Our web servers are running IIS 7 and are configured to compress dynamic and static content. When I hit these servers directly, gzip compression works. I recently placed nginx in front of them, ...
3
votes
2answers
714 views

gzip js on apache

the following configuration in httpd.conf only gzip css and html, not javascript, any idea? AddOutputFilterByType DEFLATE text/html text/plain text/javascript text/css AddOutputFilterByType DEFLATE ...
3
votes
2answers
1k views

gzip on httpd or on Tomcat?

In a Java web application running in an Apache Tomcat servlet container with an Apache httpd in front of it: is it better to use enable GZIP compression on Tomcat or on httpd level? is it better to ...
3
votes
4answers
2k views

Are there performance impacts to using gzip for web services?

I have a very typical scenario: browser -> web server -> web service I've seen lots of articles/documentation about the benefit of compressing the data sent from the web server to the browser to ...
3
votes
2answers
375 views

Erratic gzip compression on IIS7.5

This is best demonstrated when we just try to request a single CSS file from our IIS server. Sometimes we get the whole uncompressed file back. We'll wait 5 seconds and refresh, then the CSS file is ...
3
votes
2answers
1k views

How can I disable gzip in apache on Ubuntu 10.10?

I'm trying to figure out how to disable or uninstall gzip from my Ubuntu server. This is to support a package of buggy software that breaks when it's trying to do a crazy call to a css file (don't ...
3
votes
4answers
2k views

How to manually extract a backup set made by duplicity?

I have a set of files on my webserver produced by duplicity software: duplicity-full.20110315T085334Z.vol1.difftar.gz duplicity-full.20110315T085334Z.vol2.difftar.gz ...
3
votes
1answer
1k views

IIS 7.5 ignoring HttpCompression settings in web.config

I'm trying to enable dynamic compression for the mime type application/json. In applicationHost.config, I've made the following change: <section name="httpCompression" ...
3
votes
2answers
312 views

Gzip mistake with directory

I accidently gzip -rv directory and now all individual files is in .gz format. How do I undo this and gunzip all .gz files within the directory? And how do I just gzip this whole directory? I tried ...
3
votes
3answers
2k views

Corrupt Zip file when downloaded from Apache with Internet Explorer

I have a zip file being served by Apache with mod_gzip compression turned on. Everything is fine when the file is downloaded with Firefox. When downloaded with IE7 the zip file is corrupt. Any ...
3
votes
4answers
3k views

Getting HTTP Compression (GZip) to work with URL Routing on IIS 6

I haven't seen any questions specifically addressing this specific issue. When URL Routing is used, The Request goes into IIS and then is routed to the Aspx Page. For example, a site: ...
3
votes
1answer
3k views

Enabling HTTP Compression in WebSphere Application Server 7

I know the correct way of enabling gzip HTTP Compression for a WebSphere Application Server is to activate and configure the mod_gzip module in the IBM HTTP Server connected/installed in this ...
3
votes
2answers
1k views

Why is IIS7 not compressing my static files?

I am trying to get IIS to compress jquery.js (and all other static files, but using jquery as the example here) on my localhost, but something goes wrong. The funny part is that when I look in my ...
3
votes
2answers
434 views

Using AddEncoding x-gzip .gz without actual files

With Apache (2.2 and later) how can I achieve the following. I want to transparently compress using GZip encoding (not plain Deflate) the output when a certain file is queried with its name plus the ...
3
votes
2answers
98 views

enabled gzip — running out of threads

I enabled gzip in apache2 and started load testing -- I am seeing a lot of keep alives state busy state -- 95% of the web server worker threads are being used at any given time While CPU is ok, I am ...
2
votes
5answers
5k views

Gzip Piped to Rsync

I want to do something like gzip a file, then immediately rsync it to another server so that the created gzip file will not be written on the local server. I was thinking of doing something like ...
2
votes
3answers
7k views

How do I turn on gzip in Apache2?

I simply did : sudo aptitude install apache2 And that's how my server is set up. No extra modules, no nothing. I'm on ubuntu jaunty.
2
votes
5answers
962 views

Backup MySQL database and gzip

I'm trying to get a little more usefulness out of my MySQL backups. I'm wanting to gzip my backup when it's completed from a cron job. Here's the script I have so far to do the backup. #!/bin/sh ...
2
votes
3answers
6k views

Linux gzip multiple subdirectories into separate archives?

How would I be able to compress subdirectories into separate archives? Example: directory subdir1 subdir2 Should create subdir1(.tar).gz and subdir2(.tar).gz