compression

How to solve Gzip Magic Number Missing

I have a string that I Gzip on the server and download to a client using the WebClient class. When I try to uncompress it, I get the error message that the Magic Number is missing. I have tried both the GZipStream class and the ICSharpLib methods of solving this, so I'm at a loss. The compression/decompression works if I omit the step o...

CSS compression & combining / js minification - Better to do at runtime or at build time?

I have to come up with a solution to compress, version (for caching purposes) and potentially combine our JS and CSS files and I've seen two dominant approaches so far: 1) At build time: As an MSBuild task or similar. 2) Dynamically at run time: As a custom HTTPHandler (we are ASP.NET btw) for .js and .css files, with something like thi...

PNG compression with PHP magickwand

Hi fellow programmers, I'm wondering how to compress an PNG image correctly. The situation is this : I have a PNG image compressed and color-reduced with Irfanview on Windows. It's about 20KB. When my portal software resizes (using magickwand 1.0.7) it with default values, it's about 63K (!). Next try was to call MagickSetImageDepth...

PVR compression in animation - iphone sdk

im animating an 89 frame png sequence, that has been cut down to half by putting two frames per 512 x 512 frame. but im having major image qaulity issues (lossy) does anyone know of a good way to animate an 89 frame animation, without losing quality or chugging the processor? all the best. ...

Does ICSharpCode.SharpZipLib's FastZip supports setting compression level?

It seems fast, what could be its compression level? Can it be changed? I'm using FastZip so I can show a progressbar. I tried Peter Bromberg's sample code first, setting the compression level is possible, but don't have a sample code for progress event ...

Web service response compression

Hi, i'm trying understand what are consequences of enabling compression for web service response. Web service is implemented as IIS hosted WCF service with http binding. I would like to add compression on http level, so it should be seamless for clients. Soap response size is in 100kb - 1Mb range. We do this to improve user experience ...

What is the best unix compression utility?

What is the best unix compression utility available? ...

BlackBerry - Problem with GZip decompression

There is a strange problem I've run in using RIM compression API, I can't make it work as it's described in documentation. If I gzip plain text file using win gzip tool, add gz to resources of blackberry project and in app try to decompress it, there will be infinite loop, gzis.read() never return -1... try { InputStream inputStrea...

What's the easiest way to create multipart archives on Unix?

tar|gzip is wonderful, except files can get too big, and transferring them over network gets complicated. DOS era archivers were routinely used to create multipart archives, one per floppy, but gzip doesn't seem to have such option (because of Unix streaming philosophy). So what's the easiest and most robust way of doing this under Linu...

IIS 7 static file compression problem

We have 3 web servers running IIS7. I've enabled compression for static and dynamic content. We have been testing the servers under heavy load and after half an hour the styles on the site started breaking. I started investigating and found out that IIS was serving css and js files with Content-Encoding: gzip but the actual file content...

Compressing a directory of files with PHP

I am creating a php backup script that will dump everything from a database and save it to a file. I have been successful in doing that but now I need to take hundreds of images in a directory and compress them into one simple .tar.gz file. What is the best way to do this and how is it done? I have no idea where to start. Thanks in ad...

What is the cause/use/reason for the blocks that show up in high compression videos?

Be patient since I haven't worked with compression algorithms much so this may be obvious to some of you. Something I've always noticed when some streaming video starts to lag. I only realized I was curious when looking over this question: http://stackoverflow.com/questions/891643/twitter-image-encoding-challenge/929360#929360 I'm not ...

check md5 of compressed file without unpacking it completely

I want to check the integrity of a backup of a Ubuntu disk, copied with dd onto a Windows share. There is not enough space to unpack the backup. Is there a utility to calculate the md5 of a compressed file without unpacking it completely? ...

Why can IE 8 display compressed CSS but other browsers can't display?

I use IIS web server 7.5 on Windows 7 for hosting my project. I try to create Javascript & CSS handler that can optimize and compress both Javascript & Css file size. But I found some problem. Please look at the following request & response of Test.css file which I found at Firebug on Firefox 3.0.11 browser. Response Headers Cache-Cont...

Lossless compression in small blocks with precomputed dictionary

I have an application where I am reading and writing small blocks of data (a few hundred bytes) hundreds of millions of times. I'd like to generate a compression dictionary based on an example data file and use that dictionary forever as I read and write the small blocks. I'm leaning toward the LZW compression algorithm. The Wikipedia...

.NET Saving jpeg with the same quality as it was loaded

Hello I have a cannon digital camera and I set it to take pictures with superfine quality and it outputs a .jpg file 3 mega in size. If I load it like this in ASP.NET(this is useful to change it's dpi resolution or crop it or whaterver) imgPicture = Image.FromFile(Config.WorkDirectory + this.TempPhotoName); bmpPicture = new Bitmap(img...

Is there a way to store a string longer than 25 characters into a hexadecimal string shorter than 25 characters and have it reversible?

Sorry if the title doesn't make sense. Basically I have a series of strings that are 10-60 characters long. The problem being is the service I have to use only accepts strings up to 25 so I need a way to convert the strings I have to 25 characters or less, send it off and when I get the results back be able to convert it back to the orig...

lz77 question

what is the minimum source length (in bytes) for LZ77. can anyone suggest a small and fast real time compression technique (preferable with c source). i need it to store compressed text and fast retrieval for excerpt generation in my search engine. thanks ...

Internet Explorer 8 + Deflate

I have a very weird problem.. I really do hope someone has an answer because I wouldn't know where else to ask. I am writing a cgi application in C++ which is executed by Apache and outputs HTML code. I am compressing the HTML output myself - from within my C++ application - since my web host doesn't support mod_deflate for some reason....

Compressing array of integers in java

I have some extremely large array of integers which i would like to compress. However the way to do it in java is to use something like this - int[] myIntArray; ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(1024); ObjectOutputStream objectOutputStream = new ObjectOutputStream(new DeflaterOutputStream(byteArrayO...