compression

visualization of compressed (deflated, gzipped) content structures

I have some ideas I would like to experiment with relating to data compression, but am finding it difficult to decipher some parts of how the standard are applied "in real life". I would like to look at some sample compressed files to observe how the the blocks are arranged and the huffman tree(s) are structured. Are there any tools in...

Does JPEG use a row-major compression algorithm?

A JPEG image, if it is non-progrssive loads from top-to-bottom, and not from left-to-right or any other manner. Doesn't that imply that jpeg uses some row-wise compression technique? Does it (use a row-wise compression technique)? ...

Given a decompressed gzip file, is there any way to recreate the exact original gzip file?

Given a gzip file Z, if I decompress it to Z', is there any way I can recompress it to get the exact same gzip file Z back? After a cursory reading of the DEFLATE format, I am guessing no, as any given file may have multiple representations in DEFLATE stream format, and there is no way to determine which one was originally used. Can anyb...

Array Compression Algorithm

I have an array of 10345 bytes, I want to compress the array and then decompress, kindly suggest me the compression algorithm which can reduce the size of array. I am using c language, and the array is of unsigned char type. Rephrased: Can someone suggest a general-purpose compression algorithm (or library) for C/C++? ...

IIS6 GZIP root directories that load a URL not compressing?

Hello, I just enabled GZIP for IIS6 with these instructions: http://weblogs.asp.net/owscott/archive/2004/01/12/57916.aspx According to the Google Chrome Developer Tools Audit, it's working for CFM, HTML, HTM, JS, CSS but it's not working when the site points to: /projects/ --- This is what shows in the browser In actuality it loads: /...

How to extract zip file using dotnet framework 4.0 without using third party dlls.

Im in a fix. need to download a zip file from network location and then decompress it on local machine and use the files. The only constraint is i cannot use any third party dll. Please reply fast. its very urgent. ...

Send GZipOutputStream XML using Blackberry to RoR web server

Hi, I tried to post data from Blackberry device using GZipOutputStream, on the server we use Ruby on Rails to capture the request. Somehow the request contain unknown characters, it looks like this : Parameters: {"format"=>"xml", "action"=>"inspections", "\030\031\000��bbrequest"=>"<?xml version=\"1.0\"?>\r\n<rqsCreateInspection><verA...

Smallest Google Homepage

Inspired by this and this topic about the fact that Google's homepage isn't validating, just because of performance issues (1 byte less saves gigabytes of data traffic a day), I wondered: What is the smallest possible HTML-file that renders Google Homepage correctly in at least one browser? By Google Hompage I mean the most simple vers...

Creating a zip archive in C++

Is there a simple way to create a zip archive in C++? I'm writing a GPL app and I looked in to minizip but it seems too complicated. Is there a simple library to do this? I already have the files on the disk, I just want to make a zip from them. ...

PPMD compression in Java?

Does anyone know of a Java implementation of the PPMD compression algorithm? I have not been able to find a Java implementation, but there is a C# implementation at http://users.senet.com.au/~mjbone/Compression.html that is about 4k lines of code. I'm not going to ask if anyone feels like porting it to Java... ...

Deflate (or similar) compression available for Silverlight 3?

Is there any deflate implementation for Silverlight 3 that is compatible with the .NET one? Or, barring that, is there any similar compression algorithm available for both .NET and Silverlight I can use? I tried this LZW example: http://paste.lisp.org/display/12198, but unfortunately it doesn't work very well. ...

Firefox issues with Compression Filter Attribute in ASP.Net MVC

In ASP.Net MVC 2 I am using the following compression filter and, in Chrome it works fine but in Firefox 3.3.6 it returns weird characters. public class CompressAttribute : ActionFilterAttribute { public override void OnActionExecuting(ActionExecutingContext filterContext) { //get request and response var reques...

Run length encoding of hexadecimal strings including newlines.

I am implementing run length encoding using the GZipStream class in a C# winforms app. Data is provided as a series of strings separated by newline characters, like this: FFFFFFFF FFFFFEFF FDFFFFFF 00FFFFFF Before compressing, I convert the string to a byte array, but doing so fails if newline characters are present. Each newline is...

How to enable gzip for images in iis7?

Hello. I set dynamic compression and static compression on in iis7 manager. So html,css,js content is compressed ok and i see in headers Content-Encoding:gzip, but not with image formats: jpeg, gif and even bmp. ...

Why does gzip/deflate compressing a small file result in many trailing zeroes?

I'm using the following code to compress a small (~4kB) HTML file in C#. byte[] fileBuffer = ReadFully(inFile, ResponsePacket.maxResponsePayloadLength); // Read the entire requested HTML file into a memory buffer inFile.Close(); // Close the requested HTML file byte[] payl...

jpeg compression ratio

Is there a table that gives the compression ratio of a jpeg image at a given quality? Something like the table given on the wiki page, except for more values. A formula could also do the trick. Bonus: Are the [compression ratio] values on the wiki page roughly true for all images? Does the ratio depend on what the image is and the siz...

Zlib compresion technique in asp.net

I am new to .net. I created one website.I want to implement Zlib compression technique for compressing data in each every page, so that i can access open my website quickly.But i don't know where I have to write code for that and how to implement it. Can yo send me the sample application code or zip file. ...

What's the recommended TIFF compression for color photos?

We use G4 compression for all bitonal scanned images, however, what is the recommended format to save TIF images when they contain color? ...

Way to gzip files like CSS, Javascript once and save them for serving to client instead of processing and gzipping every time a request is made

I believe this would be a more CPU friendly method, can it be implemented with php ?, instead of gzipping content for every request, I compress the files once and serve those instead =). ...

Possible to use CodeIgniter output compression with <pre> to display code blocks?

Is it possible to exclude <pre> tags from this code igniter compression hook? I don't understand regular expressions well enough to not break my page. I have tried, but it always jacks up the output. EDIT: This CodeIgniter Compression hook strips all unecisary white space and formatting from the code in order to compress the output. ...