Questions tagged [deflate]

deflate is a lossless data compression format, and also refers to implementations that compress to the deflate format. The deflate format was created by Phil Katz of PKWare for the PKZip (.zip) archive format. Public domain software provides deflate and inflate functionality in the gzip utility and the zlib library.

Documentation of the deflate format may be found in RFC-1951

588 questions
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
91
votes
4 answers

Deflate compression browser compatibility and advantages over GZIP

UPDATE Feb 10 2012: zOompf has completed some very thorough research on this very topic here. It trumps any findings below. UPDATE Sept 11 2010: A testing platform has been created for this here HTTP 1.1 definitions of GZIP and DEFLATE (zlib)…
David Murdoch
  • 87,823
  • 39
  • 148
  • 191
90
votes
22 answers

How to DEFLATE with a command line tool to extract a git object?

I'm looking for a command line wrapper for the DEFLATE algorithm. I have a file (git blob) that is compressed using DEFLATE, and I want to uncompress it. The gzip command does not seem to have an option to directly use the DEFLATE algorithm, rather…
Felix Geisendörfer
  • 2,902
  • 5
  • 27
  • 36
69
votes
6 answers

Why do real-world servers prefer gzip over deflate encoding?

We already know deflate encoding is a winner over gzip with respect to speed of encoding, decoding and compression size. So why do no large sites (that I can find) send it (when I use a browser that accepts it)? Yahoo claims deflate is "less…
Steve Clay
  • 8,671
  • 2
  • 42
  • 48
56
votes
6 answers

Easy HTTP requests with gzip/deflate compression

I'm trying to figure out how the best way to easily send HTTP/HTTPS requests and to handle gzip/deflate compressed responses along with cookies. The best I found was https://github.com/mikeal/request which handles everything except compression. Is…
wridgers
  • 717
  • 1
  • 5
  • 8
50
votes
4 answers

Does .NET's HttpWebResponse uncompress automatically GZiped and Deflated responses?

I am trying to do a request that accepts a compressed response var request = (HttpWebRequest)HttpWebRequest.Create(requestUri); request.Headers.Add(HttpRequestHeader.AcceptEncoding, "gzip,deflate"); I wonder if when I add the second line I will…
Jader Dias
  • 88,211
  • 155
  • 421
  • 625
48
votes
1 answer

Why are major web sites using gzip?

I just searched about gzip and Deflate, and found out that Deflate is better. GZip or Deflate for HTTP compression Why use deflate instead of gzip for text files served by Apache? Is there any performance hit involved in choosing gzip over deflate…
Sanghyun Lee
  • 21,644
  • 19
  • 100
  • 126
29
votes
1 answer

zlib: Differences Between the `deflate` and `compress` Functions

What are the differences between the deflate() and compress() functions in zlib? I have looked through online examples and some used deflate while others used compress. How should I decide which situation I would use one over the other?
mma1480
  • 659
  • 1
  • 9
  • 18
28
votes
2 answers

How to "deflate" a ViewStub?

So I can inflate a ViewStub at runtime. Let's say I want to make it disappear and then maybe inflate again depending on some event occurring (for example, a toolbar that inflates and deflates according to what the user selects on screen). I can use…
Sid
  • 9,508
  • 5
  • 39
  • 60
28
votes
1 answer

How to find a good/optimal dictionary for zlib 'setDictionary' when processing a given set of data?

I have a (huge) set of similar data files. The set is constantly growing. The size of a single file is about 10K. Each file must be compressed on its own. The compression is done with the zlib library, which is used by the java.util.zip.Deflater…
Miro
  • 281
  • 1
  • 3
  • 4
27
votes
2 answers

JavaScript DEFLATE Implementation

Are there any open source DEFLATE encoder implementations for JavaScript? I need it to generate a binary format on the client-side that requires DEFLATE.
Eli Grey
  • 35,104
  • 14
  • 75
  • 93
26
votes
4 answers

why png size doesn't change after using http gzip compression

I use following .htaccess to set gzip compression: AddOutputFilterByType DEFLATE text/html image/png image/jpeg text/css text/javascript Please check this url: http://www.coinex.com/cn/silver_panda/proof/china_1984_27_gram_silver_panda_coin/ the…
Mark Ma
  • 1,342
  • 3
  • 19
  • 35
24
votes
2 answers

What exactly is DEFAULT_COMPRESSION?

Of the possible DEFLATE compression levels [0 .. 9], which one exactly Java's Deflater.DEFAULT_COMPRESSION correspond to? In the Java source code, I see it as public static final int DEFAULT_COMPRESSION = -1;
kolistivra
  • 4,229
  • 9
  • 45
  • 58
23
votes
3 answers

apache compression Deflate .js and .css files not compressed?

In Apache Im enabling output compression by adding the following to my .htaccess file: # compress text, html, javascript, css, xml: AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE…
luca
  • 36,606
  • 27
  • 86
  • 125
23
votes
1 answer

MsgPack for compressing json data, why not using gzip/deflate?

I heard something about MsgPack that can be used for compressing json messages, but I have a question about that, why not simply using Gzip/Deflate instead of MsgPack? I think it's so better to debugging also.
Afshin Mehrabani
  • 33,262
  • 29
  • 136
  • 201
1
2 3
39 40