Questions tagged [gzip]

GZip/gzip is both the name for a compressed data format and any of several software applications implementing this format. Use this tag for questions about implementing the library on your program.

gzip is the name for the compressed data format used by the eponymous GZip application for compressing and decompressing data.

The format is based on the deflate compressed data format, with the addition of a file metadata header and a CRC32 checksum. It is defined in RFC 1952. It is commonly used to compress HTTP requests and responses, and also often combined with the tar format for archival.

The most known standalone command-line implementation is GNU zip. The format is also implemented by the zlib library, and in this form used in many applications.

GZip on Wikipedia

6057 questions
1192
votes
3 answers

How are zlib, gzip and zip related? What do they have in common and how are they different?

The compression algorithm used in zlib is essentially the same as that in gzip and zip. What are gzip and zip? How are they different and how are they same?
Abhishek Jain
  • 9,614
  • 5
  • 26
  • 40
513
votes
22 answers

How do I tar a directory of files and folders without including the directory itself?

I typically do: tar -czvf my_directory.tar.gz my_directory What if I just want to include everything (including any hidden system files) in my_directory, but not the directory itself? I don't want: my_directory --- my_file --- my_file ---…
user4903
297
votes
8 answers

Utilizing multi core for tar+gzip/bzip compression/decompression

I normally compress using tar zcvf and decompress using tar zxvf (using gzip due to habit). I've recently gotten a quad core CPU with hyperthreading, so I have 8 logical cores, and I notice that many of the cores are unused during…
user1118764
  • 9,255
  • 18
  • 61
  • 113
296
votes
5 answers

How to uncompress a tar.gz in another directory

I have an archive *.tar.gz How can I uncompress this in a destination directory?
Mercer
  • 9,736
  • 30
  • 105
  • 170
281
votes
3 answers

Command Line Tool - Error - xcrun: error: unable to find utility "xcodebuild", not a developer tool or in PATH

I am getting this error while building the SwiftJSON framework to the Some Xcode project through Carthage Dependency Manager. Sivaramaiahs-Mac-mini:GZipDemoApp vsoftMacmini5$ carthage update --platform iOS *** Fetching GzipSwift *** Fetching…
Sivaram Yadav
  • 3,141
  • 3
  • 13
  • 15
272
votes
7 answers

TypeError: 'str' does not support the buffer interface

plaintext = input("Please enter the text you want to compress") filename = input("Please enter the desired filename") with gzip.open(filename + ".gz", "wb") as outfile: outfile.write(plaintext) The above python code is giving me following…
Future King
  • 3,819
  • 6
  • 28
  • 37
231
votes
3 answers

How to gzip all files in all sub-directories into one compressed file in bash

Possible Duplicate: gzipping up a set of directories and creating a tar compressed file This post describes how to gzip each file individually within a directory structure. However, I need to do something slightly different. I need to produce one…
Doug
  • 5,116
  • 10
  • 33
  • 42
230
votes
10 answers

Enable IIS7 gzip

How can I enable IIS7 to gzip static files like js and css and how can I test if IIS7 is really gziping them before sending to the client?
Paulo
  • 7,123
  • 10
  • 37
  • 34
218
votes
9 answers

Why use deflate instead of gzip for text files served by Apache?

What advantages do either method offer for html, css and javascript files served by a LAMP server. Are there better alternatives? The server provides information to a map application using Json, so a high volume of small files. See also Is there any…
Ken
  • 77,016
  • 30
  • 84
  • 101
215
votes
9 answers

JavaScript implementation of Gzip

I'm writing a Web application that needs to store JSON data in a small, fixed-size server-side cache via AJAX (think: Opensocial quotas). I do not have control over the server. I need to reduce the size of the stored data to stay within a…
David Citron
  • 43,219
  • 21
  • 62
  • 72
205
votes
8 answers

How can I tell if my server is serving GZipped content?

I have a webapp on a NGinx server. I set gzip on in the conf file and now I'm trying to see if it works. YSlow says it's not, but 5 out of 6 websites that do the test say it is. How can I get a definite answer on this and why is there a difference…
Johnny
  • 7,073
  • 9
  • 46
  • 72
197
votes
6 answers

Serving gzipped CSS and JavaScript from Amazon CloudFront via S3

I've been looking for ways of making my site load faster and one way that I'd like to explore is making greater use of Cloudfront. Because Cloudfront was originally not designed as a custom-origin CDN and because it didn't support gzipping, I have…
Donald Jenkins
  • 3,485
  • 8
  • 33
  • 35
179
votes
2 answers

How to properly handle a gzipped page when using curl?

I wrote a bash script that gets output from a website using curl and does a bunch of string manipulation on the html output. The problem is when I run it against a site that is returning its output gzipped. Going to the site in a browser works fine.…
BryanH
  • 5,826
  • 3
  • 34
  • 47
175
votes
10 answers

How to unzip gz file using Python

I need to extract a gz file that I have downloaded from an FTP site to a local Windows file server. I have the variables set for the local path of the file, and I know it can be used by GZIP muddle. How can I do this? The file inside the GZ file is…
Darkdeamon
  • 1,889
  • 2
  • 11
  • 8
150
votes
10 answers

Excluding directory when creating a .tar.gz file

I have a /public_html/ folder, in that folder there's a /tmp/ folder that has like 70gb of files I don't really need. Now I am trying to create a .tar.gz of /public_html/ excluding /tmp/ This is the command I ran: tar -pczf MyBackup.tar.gz…
suresh
  • 1,503
  • 2
  • 10
  • 4
1
2 3
99 100