deflate

Is there any performance hit involved in choosing gzip over deflate for http compression?

We recently switched some of our sites from deflate to gzip and noticed a significant increase in cpu load on our servers. ...

http/1.0 and deflate/gzip

Is http/1.0 able to handle deflated and gzip content? I've finished to implement deflate and gzip in my minimalist web server and I don't really know if browsers with http/1.0 are capable to handle deflate and gzip compressed content. ...

Is there a GZIP merger that merges two GZIP files without decompressing them?

Let's say there's a.gz, and b.gz. $ gzip_merge a.gz b.gz -output c.gz I'd like to have this program. Of course, $ cat a.gz b.gz > c.gz doesn't work. Because the final DEFLATE block of a.gz has BFINAL, and the GZIP header of b.gz. (Refer to RFC1951, RFC1952) But if you unset BFINAL, throw away the second GZIP header and walk through t...

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 performance hit involved in choosing gzip over deflate for http compression? ...

What are some good strategies for determining block size in a deflate algorithm?

Hello all, I'm writing a compression library as a little side project, and I'm far enough along (My library can extract any standard gzip file, as well as produce compliant (but certainly not yet optimal) gzip output) that it's time to figure out a meaningful block termination strategy. Currently, I just cut the blocks off after every...

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 have to handle the decompression manually. ...

How do you use a DeflateStream on part of a file?

I'm working on a solution to my other question which is reading the data in the 'zTXt' chunks of a PNG. I am as far as locating the chunks in the file, and reading the zTXt's keyword. I'm having trouble reading the compressed portion of zTXt. I've never worked with the DeflateStream object before, and am having some trouble with it. ...

File extention of zlib zipped html page?

What does a zipped html file using zlib (deflate) look like sitting on the server? Does it have a different extension than .html? ...

How can I compress a char array into a compressed html page using Zlib

I have a CGI application in C that creates an html page by saving a char* as a html page: void saveTextFile(const char *filename, const char *str){.......} called as saveTextFile("..\\index.html",outputFile); How do I use zlib to take as input the "outputFile" char array and output a zipped html page with appropriate headers? Wo...

Enable mod_deflate to send Content-Encoding: gzip

EDIT I have found that the problem is actually php minify. This was sending the deflated content instead of Apache. I'll find more on this. According to High Performance Web Sites, if I enable mod_deflate in Apache 2.x, by adding the following line, it should send gzipped/delfated content: - AddOutputFilterByType DEFLATE text/html text...

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 effective". Why? I maintain HTTP server software that prefers deflate, so I'd like to know if ...

Java - size of compression output-byteArray

When using the deflate-method of java.util.zip.Deflater, a byte[] has to be supplied as the argument, how big should that byte[] be initialized to? I've read there's no guarantee the compressed data will even be smaller that the uncompressed data. Is there a certain % of the input I should go with? Currently I make it twice as big as the...

gzipped Apache response packet analysis

After enabling gzip compression in my Apache server (mod_deflate) I found consistently that end user was being served on average 200 ms slower than uncompressed responses. This was unexpected so I modified the compression directive to ONLY compress text/HTML responses, fired up wireshark and looked at the network dump before and after ...

gzdeflate() and large amount of data

I've been building a class to create ZIP files in PHP. An alternative to ZipArchive assuming it is not allowed in the server. Something to use with those free servers. It is already sort of working, build the ZIP structures with PHP, and using gzdeflate() to generate the compressed data. The problem is, gzdeflate() requires me to load ...

Deflate Compression Stream where pre compressed Data can be inserted. Does a .NET lib exist?

I'm implementing Deflate and GZip compression for web content. The .NET Framework DeflateStream performs very well (it doesn't compress that good as SharpZipLib, but it is much faster). Unfortunately it (and all other libs i know) miss a function to write precompressed data like stream.WritePrecompressed(byte[] buffer). With this funct...

Deflate compression browser compatibility and advantages over GZIP

UPDATE Sept 11 2010: A testing platform has been created for this here HTTP 1.1 definitions of GZIP and DEFLATE (zlib) for some background information: " 'Gzip' is the gzip format, and 'deflate' is the zlib format. They should probably have called the second one 'zlib' instead to avoid confusion with the raw deflate compressed ...

Does the common HTTP server implementation decompress POSTed form data?

If I GZip the a POST request form data, will a HTTP server decompress it, or it only works the other way (server -> client)? ...

Puzzling .Net C# DeflateStream problem

Hi there, I wonder if anyone can shed some light on an issue that is driving me nuts: I am writing a compression decompression test class. To test it, I am serializing a dataset to a memory stream, compressing it, and uncompressing it and comparing the results. Compression is fine, but uncompression is where it hits the dirt. This ...

Compressing xls content with apache deflate module

I am trying to compress an excel spreadsheet being sent from my application using apache deflate module. I have added the following line to the my sites-enabled file: AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/excel But is seems to make the response data bigger??? Using firebug, w...

How to deal with deflated response by urllib2?

I currently use following code to decompress gzipped response by urllib2: opener = urllib2.build_opener() response = opener.open(req) data = response.read() if response.headers.get('content-encoding', '') == 'gzip': data = StringIO.StringIO(data) gzipper = gzip.GzipFile(fileobj=data) html = gzipper.read() Does it handle de...