zlib

Compress data before storage on Google App Engine

I im trying to store 30 second user mp3 recordings as Blobs in my app engine data store. However, in order to enable this feature (App Engine has a 1MB limit per upload) and to keep the costs down I would like to compress the file before upload and decompress the file every time it is requested. How would you suggest I accomplish this (...

"Untar" file on iPhone

Hi All, I'm writing an iPhone app which downloads a tar-gzipped file from a Webserver, then needs to unarchive this file so that it can be copied into the app's Documents folder. I'm using tar/gzip because I want to download a whole bunch of small files in one HTTP request, to make everything nice and fast. I've investigated solutions...

Transparent SQLite Data Compression

I am looking for an existing solution for transparent SQLite 3 zlib compression using a custom VFS implementation and a custom IO methods implementation. Is anyone aware of an existing project that already does that, or will I have to roll my own? I vaguely remember seeing something similar a year ago, but can't find it anymore. ...

Uncompress Zlib string in using ByteArrays

Hi all, I have a web application developed in Adobe Flex 3 and Python 2.5 (deployed on Google App Engine). A RESTful web service has been created in Python and its results are currently in an XML format which is being read by Flex using the HttpService object. Now the main objective is to compress the XML so that there is as less a tim...

Python zlib not decodable when returned by an http response

I'm using Amazon S3 to serve static files. When the Content-Type is just 'text/css' and I haven't compressed the file, it is returned ok. If I try to zlib.compress() the contents that will be returned and change Content-Encoding to 'gzip', the browser cannot decode the result. In Chrome, the error is Error 330 net::ERR_CONTENT_DECODING...

How can I decompress a gzip stream with zlib?

Gzip format files (created with the gzip program, for example) use the "deflate" compression algorithm, which is the same compression algorithm as what zlib uses. However, when using zlib to inflate a gzip compressed file, the library returns a Z_DATA_ERROR. How can I use zlib to decompress a gzip file? ...

Can't compile with zlib dependency on Windows?

I'm trying to port a program that uses zlib to Windows with MSVC. Unfortunately, though, after many hours of trying I can't seem to get anything referencing zlib to run. Here's a dummy program I'm using to test whether zlib can run: #include <zlib.h> #include <stdio.h> int main(void) { z_stream zst; zst.zalloc = Z_NULL; zs...

How to compress data using zlib

Is there a class that allows to compress data with zlib, or the only possibility is to use directly zlib.dylib? ...

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 class. When passing a dictionary to the deflate algorithm by setDictionary, I can improve the...

Combining deflate and minify - am i creating overhead?

I minify my css and js files on the fly with google.codes minify. I have also set my .htaccess to use deflate on all my css and js files - the reason beeing some js files (like shadowbox and tinymce) reference to other js files in the code. So i'm compressing with apache deflate and also minify compresses some js and css files with gzip ...

How to determine compressed size from zlib for gzipped data?

I'm using zlib to perform gzip compression. zlib writes the data directly to an open TCP socket after compressing it. /* socket_fd is a file descriptor for an open TCP socket */ gzFile gzf = gzdopen(socket_fd, "wb"); int uncompressed_bytes_consumed = gzwrite(gzf, buffer, 1024); (of course all error handling is removed) The question i...

How do I pass compressed data using the Task Queue Python API in App Engine?

I'm trying to use compressed data with my Tasks in the Task Queue like so: t = taskqueue.Task(url='/tasks/queue', params={'param': zlib.compress(some_string)} However when I try to decompress it in the queue handler like so message = self.request.get('param') message = zlib.decompress(message) I get this error: ...

In gzip libary, what's the difference between 'uncompress' and 'gzopen' ?

There are some functions to decompress in zlib library(zlib version 1.2.3) I want to decompress my source zip(.gz) file using 'uncompress' function. It is now working(error code -3) but gzopen is. It is still not working when I input payload pointer(passing gzip header) to 'uncompress' . So the question is "What's the valid arguments ...

Python: Creating a streaming gzip'd file-like?

I'm trying to figure out the best way to compress a stream with Python's zlib. I've got a file-like input stream (input, below) and an output function which accepts a file-like (output_function, below): with open("file") as input: output_function(input) And I'd like to gzip-compress input chunks before sending them to output_func...

Zlib Error Message

I have a "zlib error" message as I'm playing an old school RPG called "Laxius Power" on Windows XP. It just kicks me out of the game! How can I fix it? ...

C http request gzip (zlib)

I'm making http requests using winsock and I need to parse the html. The problem is that some sites I'm working with compress the html in gzip no matter what I specify in my request header. I've even tried downgrading the request to HTTP/1.0 with no success. So now I'm forced to actually decompress the gzip. However, Im having no success...

Python decompressing gzip chunk-by-chunk

I've a memory- and disk-limited environment where I need to decompress the contents of a gzip file sent to me in string-based chunks (over xmlrpc binary transfer). However, using the zlib.decompress() or zlib.decompressobj()/decompress() both barf over the gzip header. I've tried offsetting past the gzip header (documented here), but sti...

Are zlib.compress on Python and Deflater.deflate on Java (Android) compatible?

I am porting a Python application to Android and, at some point, this application has to communicate with a Web Service, sending it compressed data. In order to do that it uses the next method: def stuff(self, data): "Convert into UTF-8 and compress." return zlib.compress(simplejson.dumps(data)) I am using the next method to ...

How do I uncompress data in PHP which was originally compressed using zlib?

Hello Everyone, I am quite new to Iphone development , so please bear me if I ask some some common questions. In my application I have to transfer data from my Iphone app to a PHP server and for this I have to compress the NSdata in my Iphone app and then pass it on to the PHP server and then Uncompress it in PHP and process the data se...

RVM Ruby 1.9.1 troubles

Trying to get Ruby 1.9.1 up and running with RVM on a fresh install(fedora). So after doing rvm install 1.9.1, the rubygems error logs show that zlib can't be located no such file to load -- zlib (LoadError) However both the zlib runtime and development libraries are installed and up-to-date, So I'm kinda stumped on this one at ...