compression

How to compress JSON with PHP?

I'm writing a little analysis page which will help me hunt down bugs in an application. In essence it allows to visually compare actual data and log entries, plus perform a bit of analysis on the data. Since this is for debugging only and since I will be deploying this on the live site I want it to have as little server load as possible...

Is there a library or tool for zipping numerous files

I've downloaded ICSharpCode.SharpZipLib and DotNetZip. I'm zipping over 100 files at a time varying a meg to 4 megs. When I use ICSharpCode I get a 'ContextSwitchDeadlock' error. DotNetZip fails on the finalizing of the file every time. Also, I'm working on sharepoint folders (mapped to my local drive) private bool zipall() //ICShar...

MP3 Compression i.e converting mp3 file from 256kbps to 128kbps in java..

i want to achieve mp3 compression.. it means i want to convert a 256kbps mp3 file into a 128 or even 64kbps mp3 file using java programming language.. is it possible using JLayer..? how do i do it..? A code snippet would be useful. Thanks in advance..!! ...

Any seekable compression library?

I'm looking for a general compression library that supports random access during decompression. I want to compress wikipedia into a single compressed format and at the same time I want to decompress/extract individual articles from it. Of course, I can compress each articles individually, but this won't give much compression ratio. I've...

How to remove zip compression from an XML file?

I have an XML file format .zfo that is compressed using zip algorithm. I need to remove this compression from the file, so that it is in usable XML form. How can I remove this compression, or decompress this XML file? Its not like you might imagine i.e: .zip file containing an xml file. Instead the byte[] thats written to the file is ...

How can I skip compressing one PNG?

(Note: I have solved this problem, but it took long enough that I'm posting question/answer here.) The Xcode build process "optimizes" my PNGs when building. This isn't usually a problem, but iTunesArtwork being processed in this way causes corrupts it so that iTunes not to be able to show it. How can I prevent this? ...

Multiple Headers in asp.net

I'm running code that seems to hit the "AppendHeader" twice in the code. Response.Filter = New DeflateStream(Response.Filter, CompressionMode.Compress, True) Response.AppendHeader("Content-encoding", "deflate") ... Response.AppendHeader("Content-encoding", "deflate") I have tried using the following.... Response.Headers("Content-...

What should i prefer...JLayer or LameOnJ?

Hello, I am about to create a mini project in Java related to MP3. These are the 3 things i will be doing in it. 1) Playing a MP3 file (as we do in a VLC media player with all the play,pause,stop functions) 2) Converting a MP3 file to .WAV file and vice versa 3) Compressing a MP3 file from 256kbps to 128 or 64kbps(depends on the user...

android httprequest compress response.

I am using httprequest to retrieve data from webservice, i know using tomcat we can compress response data using gunzip algo. but how can uncompress data to display, is un-compress is time consuming?? is there any other way to compress response and uncompress on android ??? ...

Mysqldump with empty result in gzip?

When I output my MySQL Dump Regularly, it outputs a 30MB File. When I use gzip, 0KB. Here is my code: $command = "<path to>mysqldump --opt -h $dbhost -u$dbuser -p$dbpass $dbname | gzip> test.sql.gz"; system($command); Result: test.sql.gz 0 KB --------------------------- $command = "<path to>mysqldump --opt -h $dbhost -u$dbuser -p$...

MIME type wont change for IIS6 Dynamic content

After changing .zip file mime type on IIS 6 metabase to (application/x-zip), I can see that .zip downloads with a new content type when I download it from static folder (/zip) But I use ISAPI extention to download .zip the mime type (?downloadname=filename thus dynamic content) changes it to (application/x-zip-compressed). Verified it wi...

Very basic question about Hadoop and compressed input files

I have started to look into Hadoop. If my understanding is right i could process a very big file and it would get split over different nodes, however if the file is compressed then the file could not be split and wold need to be processed by a single node (effectively destroying the advantage of running a mapreduce ver a cluster of paral...

Compression in J2ME

Are there any OSS compression libraries (gzip) available for J2ME? ...

optimizing byte-pair encoding

Noticing that byte-pair encoding (BPE) is sorely lacking from the large text compression benchmark, I very quickly made a trivial literal implementation of it. The compression ratio - considering that there is no further processing, e.g. no Huffman or arithmetic encoding - is surprisingly good. The runtime of my trivial implementation ...

Compress an XML file with javascript?

I have found the DIY Map.. an excellent map tool if you are ever looking for one. Aside from how fantastic it is... the associated XML file can get fairly large (it contains map setting, country names etc). I was wondering if it were possible to compress it and have javascript uncompress it on the users side.... There is a lot of repeti...

What is compression for in PHP's Memcache?

On PHP.net I am looking at the Memcache::set function and it has this optional flag to use compression... Use MEMCACHE_COMPRESSED to store the item compressed (uses zlib). $memcache_obj->set('var_key', 'some really big variable', MEMCACHE_COMPRESSED, 50); I am curious...

Algorithm: Minimal Encoding, Error Correction, Please Help?

Say there's an array of 1024 bits that are all zeros: example: [0,0,0,0,0,0,0,...] Then I overwrite 20 zeros with ones at completely random positions: example: [0,1,0,0,0,0,0,...] What is the theoretical minimum number of bits needed to encode the location of these 20 randomly placed bits, assuming that I had a perfect encoder? I k...

Turn directory into Zip with PHP

How would I turn a directory into a zip file with PHP? Thanks. ...

Compressing High Resolution Satellite Images

Hi! Please advise the best way to compress satellite Image. Details Uncompressed size - 60 gb Uncompressed format - IMG 4 Bands (To be retained after compression) Preferred compression format - JPEG2000 Lossy enough to aid in Visual analysis. Thanks Monika ...

How do I compress a Json result from ASP.NET MVC with IIS 7.5

I'm having difficulty making IIS 7 correctly compress a Json result from ASP.NET MVC. I've enabled static and dynamic compression in IIS. I can verify with Fiddler that normal text/html and similar records are compressed. Viewing the request, the accept-encoding gzip header is present. The response has the mimetype "application/json", bu...