gzip

Working with Zip and GZip files in Java

It's been a while since I've done Java I/O, and I'm not aware of the latest "right" ways to work with Zip and GZip files. I don't necessarily need a full working demo - I'm primarily looking for the right interfaces and methods to be using. Yes, I could look up any random tutorial on this, but performance is an issue (these files can get...

Content Encoding Error

Hello. I have a page with gzip and in my php index file i have ob_start('ob_gzhandler'); [HTTP_ACCEPT_ENCODING] has value gzip,deflate and even that i receive in some refresh case that error about Encoding. In htacces i added php_value zlib.output_compression Off and nothing. Any ideea how to fix that? Thanks. ...

How do I use GZipStream with System.IO.MemoryStream?

I am having an issue with this test function where I take an in memory string, compress it, and decompress it. The compression works great, but I can't seem to get the decompression to work. //Compress System.IO.MemoryStream outStream = new System.IO.MemoryStream(); GZipStream tinyStream = new GZipStream(outStream, Comp...

IronPython - How do I import Gzip?

I am trying to use IronPython under VS 2010. I need Gzip, but there is no (that I can find) documentation to tell me how to "reference" or add a module. Can anyone tell how to add Gzip please. ...

IronPython gzip

Is there a direct equivalent of gzip for IronPython? ...

C# SslStream with GZipStream

Is it possible to use GZipStream passing an SslStream in C#? i.e. can you do GZipStream stream = new GZipStream(sslStream, CompressionMode.Compress); stream.Write(...); ... GZipStream stream = new GZipStream(sslStream, CompressionMode.Decompress); stream.Read(...); If this is possible, is the SslStream still in a useable state afte...

Compressing data coming out of WCF

I would like to compress the data coming out of WCF on a basicHttpBinding. I am trying to produce a new version of a system originally written as SOAP web services. In that we returned a GZipStream when we received a request. Is there any way to do the same with WCF? I am using VS2010, currently against .Net 3.5 but that's flexible. ...

GZip in android

Hi all, How to compress and decompress a file in android using GZip. please provide with some reference , so that it would a great help for me. Thanks in advance ...

Unzip files and/or streams in rhomobile

How do I decompress a compressed file in a rhomobile application? I saw that the zlib extension is unavailable in rhodes, because it needs a ruby port. Ruby uses the "zlib.c" or "zlib.h" source files and not a portable zlib. When running the rhodes application, in a line with the source: require 'zlib' it raises the error: no such f...

PHP - compress static css file with GZIP

Hi so I have a css file, style.css. in the same directory I have the images/ folder. How can I make a script that compresses style.css, but from another folder? Right now I have this: <?php if(isset($_GET['css'])) $file = array('url' => htmlspecialchars($_GET['css']), 'type' => 'text/css'); if(isset($_GET['js'])) $file = array('ur...

Is it possible to force jQuery to make AJAX calls for URLs with gzip/deflate enabled?

I have a web service that is willing to output gzip/deflated data. I've verified that the service will respond with raw JSON or with gzip'd JSON using wget and curl. I want to consume this web service using the jQuery AJAX call. By default, the $.ajax call that jQuery provides does not add the "Accept-Encoding: gzip" HTTP request hea...

How to extract a tar.gz archive in PHP without system()?

Hi, I have been wondering for couple of days: Is there a way to extract files from a .tar.gz archive in PHP without resorting to calling system commands with system()? (So: either with a built-in classes/functions or using an external free library?) I need it to work both on Windows (development) and Linux (deployment), if possible. T...

Is it possible that zipping an swf file results in a bigger file?

When I GZIP an swf file, the size goes from 1,21 mb to 1,86 mb... So, my question is a bit answered by myself. The real question is how this is possible? I guess, as a colleague of mine said, that the swf is already binary and can't be compressed anymore. Conclusions is also that zipping swf files shouldn't be done. ...

How do I use file_get_contents to get a gzip'ed page on a remote web server in php?

I'm trying to receive a gzip'ed version of a page through file_get_contents in php 5.2.9 I was able to do it using fopen with the following code: $opts = array( 'http'=>array( 'method'=>"GET", 'header'=>"Accept-language: en\r\n" . "Accept-Encoding: gzip\r\n" ) ); $context = stream_context_create($opts); o...

how to gzip content in asp.net MVC??

how to compress the output send by an asp.net mvc application?? ...

Erlang File I/O: Large binary files and gzip streaming

I have two questions regarding Erlang file i/o; what is the best way to achieve in Erlang: reading large binary files (many gigabytes) without copying the whole file into memory reading a gzipped binary file as a decompressed stream Thanks! ...

How can I write compressed files on the fly using Perl?

I am generating relatively large files using Perl. The files I am generating are of two kinds: Table files, i.e. textual files I print line by line (row by row), which contain mainly numbers. A typical line looks like: 126891 126991 14545 12 Serialized objects I create then store into a file using Storable::nstore. These objects usual...

How do the compression codecs work in Python?

I'm querying a database and archiving the results using Python, and I'm trying to compress the data as I write it to the log files. I'm having some problems with it, though. My code looks like this: log_file = codecs.open(archive_file, 'w', 'bz2') for id, f1, f2, f3 in cursor: log_file.write('%s %s %s %s\n' % (id, f1 or 'NULL', f2...

Cygwin and alternatives to replicating linux commands on windows

I keep running into issues with a .bat script I want to write to automate some tasks related to the setup of my PHP application. I can't for instance do simple wget to download files and so on. I hear that by installing Cygwin, the user should be able to have access to all linux related commands, so my script will run without problems....

Minify & Gzip vs Google CDN

Should I minify/gzip my Jquery with my other scripts on my page, or use Google CDN for Jquery & JQuery UI and gzip my own stuff. From what I can see its more likely to be faster to deliver from Google and there is a better chance the files will be cached already on the users machine, however its a couple of extra http request and atleas...