Questions tagged [compression]

The name given to the process of encoding data such that it uses lesser number of bits as compared to the original representation.

There are a number of techniques to compress information, with most algorithms working to compress image, speech, music or video. Encoding the same information in lesser bits results in saving some crucial resource such as transmission bandwidth or hard-disk space. Compression algorithms also take advantage of human perception to further reduce the size of information. By encoding the same piece of information with fewer bits in places that the human brain is not accustomed to perceiving as well as other parts, substantial gains in compression ratios can be achieved.

9175 questions
4
votes
2 answers

GZIP Java vs .NET

Using the following Java code to compress/decompress bytes[] to/from GZIP. First text bytes to gzip bytes: public static byte[] fromByteToGByte(byte[] bytes) { ByteArrayOutputStream baos = null; try { ByteArrayInputStream bais =…
Jim Jones
  • 287
  • 3
  • 14
4
votes
2 answers

Compile/use unrar C++ source for iphone app?

Writing an app that will include the ability to decompress zip and rar files. I think I'm OK on how to handle the .zips but .rars seem a little more trouble. I noticed that rarlabs has source available but it's C++. Is there a way to compile, wrap…
CBGrey
  • 643
  • 7
  • 22
4
votes
3 answers

How to resolve "Sevenzip: Error result (00000001) Incorrect function" using JCLcompression unit

I'm using JCL version 2.4.1.4571 with Delphi XE3 and have had no luck decompressing archives. I've downloaded the dll's from JEDI's site and also tried using the 7z.dll (32bit) from 7-zip.org but either way I get the same error when I try to…
Mike
  • 153
  • 3
  • 11
4
votes
1 answer

Getting error on System.IO.Compression when trying to use ZipFile class

I am using ZipFile class. A reference/dll must be added in order to use this class. It seems that you can use both the System.IO.Compression and the Ionic.Zip dll (one at a time ofcourse). In my case, only the latter works. The problem though, is…
user1960836
  • 1,732
  • 7
  • 27
  • 47
4
votes
3 answers

What compression/archive formats support inter-file compression?

This question on archiving PDF's got me wondering -- if I wanted to compress (for archival purposes) lots of files which are essentially small changes made on top of a master template (a letterhead), it seems like huge compression gains can be had…
Toybuilder
  • 11,153
  • 5
  • 28
  • 33
4
votes
2 answers

WebSocket permessage-deflate C#

I've written a WebSocket in C# and am trying to implement the permessage-deflate extension. It seems that the C# DeflateStream is unable to decompress message payloads sent from Chrome (Version 36.0.1985.143 m) - the only one I've tried so far. I am…
Michael
  • 53
  • 1
  • 5
4
votes
1 answer

Grayscale image compression using Huffman Coding in MATLAB

I am trying to compress a grayscale image using Huffman coding in MATLAB, and have tried the following code. I have used a grayscale image with size 512x512 in tif format. My problem is that the size of the compressed image (length of the…
parvathy
  • 47
  • 1
  • 1
  • 6
4
votes
1 answer

SequenceMatcher for multiple inputs, not just two?

wondering about the best way to approach this particular problem and if any libraries (python preferably, but I can be flexible if need be). I have a file with a string on each line. I would like to find the longest common patterns and their…
Peck
  • 822
  • 1
  • 9
  • 26
4
votes
0 answers

Android video compression using MediaCodec

I want to compress an input mp4 video file using android's mediacodec for decoding and encoding and the mp4parser library for muxing to mp4. I found a number of samples on the internet, but none of them are clear to me, and I can't get them to work.…
svanheste
  • 71
  • 1
  • 3
4
votes
4 answers

String Compression / Decompression of data to be sent over the network

I am looking for a string compression method in C# which I can run on the data String before I write it to the network socket? I am fairly new to any sort of compression hence the reason I am looking for some advice / guidance here. WHY? This is…
Zapnologica
  • 22,170
  • 44
  • 158
  • 253
4
votes
2 answers

Using LZMA SDK in C++

I am trying to use LZMA SDK to compress a file in my program. I have download the SDK but I don't know how to use it. Can anyone tell me what steps I need to take to make this work? Any help would be highly appreciated I am almost a newbie to C and…
Milad
  • 4,901
  • 5
  • 32
  • 43
4
votes
2 answers

Compress/decompress string on .NET server that was encoded with lz-string.js on client

I am using the LZString.compressToBase64 function of lz-string.js and need to decompress/compress the data on the server side. The obvious solution seems to be lz_string_csharp but I am concerned about this statement: If you use just the regular…
CodeToad
  • 4,656
  • 6
  • 41
  • 53
4
votes
7 answers

Dealing with large number of text strings

My project when it is running, will collect a large number of string text block (about 20K and largest I have seen is about 200K of them) in short span of time and store them in a relational database. Each of the string text is relatively small and…
Fadrian Sudaman
  • 6,405
  • 21
  • 29
4
votes
5 answers

Who Compresses their HTML?

Even Stack Overflow doesn't compress their HTML. Is it recommended to compress HTML? As far as I've seen, it looks like Google is the only one.... (view the source). Why isn't this standard practice?
Lance
  • 75,200
  • 93
  • 289
  • 503
4
votes
3 answers

Sorting a file to optimize for compression efficiency

We have some large data files that are being concatenated, compressed, and then sent to another server. The compression reduces the transmission time to the destination server, so the smaller we can get the file in a short period of time, the…
heyitsbmo
  • 1,715
  • 1
  • 14
  • 29