gzip

How to implement GZip compression in ASP.NET ?

Hi, I am trying to implement GZip compression for my asp.net page (including my CSS and JS files). I tried the following code, but it only compresses my .aspx page (found it from YSlow) HttpContext context = HttpContext.Current; context.Response.Filter = new GZipStream(context.Response.Filter, CompressionMode.Compress); HttpContext.Cur...

Why CSS files not loading when compressing HTTP response using GZipStream ??

I am developing an application using asp.net 2.0 (C#), in which I am trying to implement the compression of my files, so that performance of my website will improve. For that I have added a code in my Global.asax file to compress all requests (.aspx, .js, .css) But when I am running my application it works well for first time then the C...

How can I offer a gzipped xml file for download using PHP

I have a PHP script that creates an xml file from the db. I would like to have the script create the xml data and immediately make a .gzip file available for download. Can you please give me some ideas? Thanks! ...

GZip for PHP on IIS

If GZip is enabled in IIS is it only going to improve performance for ASP pages or can it be setup to compress PHP pages as well? ...

When I try to GZIP .js files using PHP I get some kind of php related error.

Okay, So I've googled a couple of pages and come up with the following solution: Add this in .htaccess #Active GZIP for php-files php_flag zlib.output_compression On php_value zlib.output_compression_level 5 and this for .js and .css: AddHandler application/x-httpd-php .css .js php_value auto_prepend_file /Library/WebServer/Documen...

Which compression method to use in PHP?

I have a large amount of data to move using two PHP scripts: one on the client side using a command line PHP script and other behind Apache. I POST the data to the server side and use php://input stream to save it on the web-server end. To prevent from reaching any memory limits, data is separated into 500kB chunks for each POST request....

How do I read / write gzipped files?

How do I read / write gzipped files in C++? The iostream wrapper classes here look good, and here is a simple usage example: gz::igzstream in(filename); std::string line; while(std::getline(in, line)){ std::cout << line << std::endl; } But I wasn't able to actually link it (although I have a /usr/lib/libz.a). A simple g++ test-gzs...

Decompress a Gzip archive in Java

I'm trying to decompress about 8000 files in gzip format in Java. My first try was to use GZIPInputStream but the performance was awful. Anyone know any alternative to decompress gzip archives? I tried ZipInputStream but it's not recognizing the gzip format. Thank you in advance. ...

Algorithm to find string matches in a sliding window

One of the core steps in file compression like ZIP is to use the previous decoded text as a reference source. For example, the encoded stream might say "the next 219 output characters are the same as the characters from the decoded stream 5161 bytes ago." This lets you represent 219 characters with just 3 bytes or so. (There's more to Z...

opening a .tar.gz file with a single command

when I download a .tar.gz file, I open it with two commands, first gunzip and then tar. Is it possible to open it with just one command? ...

Is gzip encoding compatible with JSON?

I'm trying to narrow down some weirdness going on with my AJAX calls. My PHP scripts have this at the start: ob_start("ob_gzhandler"); Works great with HTML. But are there any problems with doing it with application/json data? Any browser issues anyone is aware of? ...

Problems Decompressing a GZip Archive in .Net

I grabbed the following code somewhere off the net, and I am using it to decompress Gzip files, such as http://wwwmaster.postgresql.org/download/mirrors-ftp/pgadmin3/release/v1.8.4/src/pgadmin3-1.8.4.tar.gz but when I run It, I get an exception, stating that the magic number doesnt match. public byte[] Download(string pUrl) { WebClien...

CSS/JS GZip Compression with Asp.Net

I am currently on a hosted Virtual Server, I want to enable GZip compression for my Asp.Net 3.5 site, how do I go about starting? I have tried using 'packed' JS files, but they don't work, I am assuming it's because they are not handled correctly...? ...

how do I use wwScriptCompressionModule? for gzip compression with asp.net

Ok, I downloaded the WestWind Ajax Controls, and I added this to my web.config: <httpModules> <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add name="wwScriptCompressionModule" type="Westwind.Web.Controls.wwScriptCompr...

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. ...

Use GZIP to boost XML-parsing

Hello all, I am facing the problem to handle many xml-files that are all greater than 70 MB. Validating and accessing them cost a lot of time. Now I am wondering if the following steps could increase my applications performence. I can compress a 70MB xml-file in a gzip-file < 1MB. So I could hold only gzip files. Working with the data...

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? Thanks! ...

Use GZIP, JSON responses and JQuery

However, I want to compress my responses with GZIP wheren possible. I tried using the Compression filter code available for free download in the headfirst site. It works great for html, images, css and javascript. I post the filter next. It checks if GZIP is an accepted encoding and it adds gzip as Content-Encoding. See: wrappedResp.se...

IIS7 not gziping all static files

Hi, I enabled gzip in IIS7, and it works for some files, but others don't... I'm using httpwatch and I can see that some .js files are being gziped but others don't, they get gziped after I manually request for the files 3 or 4 times, then iis gzips it... Is this a normal behavior? How can I make it gzip all the static files? thanks!...

Yslow doesnt recognize my gzip

Hi.. my site is all happily Gzipped according to: http://www.gidnetwork.com/tools/gzip-test.php However when I run it through Yslow I get a F for Gzip and it lists all of my scripts as components that are not gzipped. Any ideas ? ...