compression

WCF REST Compression

I have a REST service that returns a large chunk of XML, about 150k worth. e.g. http://xmlservice.com/services/RestService.svc/GetLargeXML Therefore I want to compress the response from the server, as GZIP should reduce this to something much smaller. Having searched everywhere I cannot for the life of me find an example of how to ...

Why can I "fold" a range of integers into one half the size without losing information?

I'm trying to understand a paper on lossless compression of floating point numbers and get stuck on one particular step where the authors map a signed integer from a certain range into a range of half the size, losing information that I would think is required. I have a feeling that the authors are using some standard technique which is ...

Deflate Compression Stream where pre compressed Data can be inserted. Does a .NET lib exist?

I'm implementing Deflate and GZip compression for web content. The .NET Framework DeflateStream performs very well (it doesn't compress that good as SharpZipLib, but it is much faster). Unfortunately it (and all other libs i know) miss a function to write precompressed data like stream.WritePrecompressed(byte[] buffer). With this funct...

Asynchronous Compression Library for Compact Framework

I'm looking for Asynchronous Compression and Decompression Streaming. By asynchronous I mean it supports BeginRead, EndRead, BeginWrite, and EndWrite. The only library that I've found that claims to is the native .NET classes. (I haven't tried them out yet, but it looks like they support it). I'm hoping to write this for the Compact ...

Sending text file over network with high compression

I have a text file that I want to send over the network, this file could vary in size from as low as 1KB to 500KB. What algorithms/techniques could I use to tightly compress this file before sending it such that the least amount of bytes are send over the network and compression ratio is high? ...

Compressing strings for client/server transport in Java

I work with a propriety client/server message format that restricts what I can send over the wire. I can't send a serialized object, I have to store the data in the message as a String. The data I am sending are large comma-separated values, and I want to compress the data before I pack it into the message as a String. I attempted to us...

String table encoding vs. gzip compression

In my application, I need to store and transmit data that contains many repeating string values (think entity names in an XML document). I have two proposed solutions: A) create a string table to be stored along the document, and then use index references (using multi-byte encoding) in the document body, or B) simply compress the do...

Deflate algorithm - deflate stream format - documentation beyond RFC1951

I'm interested on documentation of the deflate stream format or deflate algorithm which goes beyond RFC1951. Sample streams, implementation hints whatever may be interesting. ...

JavaScript compression

I look for tool which can compress JavaScript source code. I found some web tools which only deletes whitespace chars? But maybe exist better tool which can compress user's function names, field name, deletes unused fields, others. ...

Most efficient way to encode 2 positions between 0 and 64?

I have 64 bit values that I want to compress by exploiting the fact that only a portion somewhere in the middle contains data and before and after that are zeroes. Say the actual data is l bits long and padded with n 0s in front and m 0s at the end such that n + l + m = 64. Instead of transmitting / storing 64 bits, I can transmit l bit...

Compressing IplImage to JPEG using libjpeg in OpenCV

Hi everybody. So I have this problem. I have an IplImage that i want to compress to JPEG and do something with it. I use libjpeg. I found a lot of answers "read through examples and docs" and such and did that. And successfully written a function for that. FILE* convert2jpeg(IplImage* frame) { FILE* outstream = NULL; outstream=mallo...

How does the compression file attribute impact performance on a file save in windows?

QUESTION: If I set the compression attribute on a directory on a windows server, how does that effect file saving performance? WHY I WANT TO KNOW: I have a server that several batch processes save huge files on, and these are mostly Txt or CSV files that I'd like to compress to save disk space. If it does compression on the fly as i...

Compress about 1000 bytes of text for a QueryString

I want to create a mechanism (in C#) where text from a QueryString is displayed on a website. For example, in C# I might literally do; public void Page_Load(blah) { litSomething.text = Reques.QueryString["msg"]; } Assume that the message is written in English (allowing UTF8 would be nice), and is no longer than say 1000 char...

input a string then return it compressed(deflated) using zlib.h

Greetings It sounds easy, but it's giving me a hard time. I am trying to create a method that inputs a string then return it compressed(deflated) using zlib.h (the one from zlib.net) I've read the zlib.h a couple times, no success :/ I think I need to use the deflateInit2() function, but woah, look at its complex definition: #define ...

Where can I learn about text compression in Java?

Where can I learn about text compression in Java? What classes would be used, and how would I use them? ...

Compacting HTTP Response Headers?

I had asked a few questions regarding compressing HTTP Request headers here and here but I some how skipped the HTTP response part... I am looking for a way to reduce/compact the headers in my HTTP response... The situation is that I am communicating a Java ME app with a remote Server and any extra baggage is causing me to shed out load...

How can I protect myself from a zip bomb?

I just read about zip bombs, i.e. zip files that contain very large amount of highly compressible data (00000000000000000...). When opened they fill the server's disk. How can I detect a zip file is a zip bomb before unzipping it? UPDATE Can you tell me how is this done in Python or Java? ...

How does one make a Zip bomb?

This question about zip bombs naturally led me to the Wikipedia page on the topic. The article mentions an example of a 45.1 kb zip file that decompresses to 1.3 exabytes. What are the principles/techniques that would be used to create such a file in the first place? I don't want to actually do this, more interested in a simplified "how...

I thought *.DDS files were meant to be quick to load!?

Ok, so I'm trying to weigh up the pro's and con's of using various different texture compression techniques. I spend 99.999% of my time coding 2D sprite games for Windows machines using DirectX. So far I have looked at texture packing (SpriteSheets) with alpha-trimming and that seems like a decent way to get a bit more performance. Now ...

IIS7 Staticfilehandler changing GIF file colors

Environment: 2 IIS7 servers, 1 appears to be compressing images the other is not, i want to turn off the compression. I have a site running on two IIS7 server, when serving images from one server the GIFs look fine, when i serve them from the other instance, with the same files, the GIF color palette looks web safe or compressed or some...