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
0 answers

Difference between writing compressed file

I am using zlib library to compress my files for my project. I have a compressed file content having 204 chars length. when I tried to write the files in 2 different ways I am getting different chars length as the contents in the file. When I used…
Aneesh Narayanan
  • 3,220
  • 11
  • 31
  • 48
4
votes
9 answers

How to extract a rar file in C#?

I want to extract .rar files using cmd shell so I wrote this code: string commandLine = @"c:\progra~1\winrar\winrar e c:\download\TestedU.rar c:\download"; ProcessStartInfo PSI = new ProcessStartInfo("cmd.exe"); PSI.RedirectStandardInput =…
Hanad
  • 61
  • 1
  • 1
  • 3
4
votes
1 answer

Java - Compressing an Image without Quality Loss

I have a jpeg Image that is 2.1mb in size. I am attempting to compress the Image data as much as possible. Possibly below 1mb. Currently I have done some research on the subject and I have written some code to attempt to compress the data. I have…
user3011902
4
votes
1 answer

Windows Service "self hosted" WCF : compression?

Using compression with WCF in IIS I can find documentation for, but its oriented towards using IIS features. I can find people talking about how they've written their own compression handlers, but it all looks pretty custom. Is there a best practice…
Kyle
  • 963
  • 3
  • 16
  • 32
4
votes
1 answer

7Zip fails to uncompress the files created by a JAVA source in Oracle 11g DB

I've written a JAVA source to zip the files in Oracle DB 11g. The program is working as expected, i.e. it is creating the zip file in the /home/oracle/ directory. But when I download the files to my hard-disk via FTP or email them using the SMTP…
Ratan
  • 51
  • 1
  • 3
4
votes
2 answers

Compressing sequence of unique sorted numbers

I a project I am working on, I have a sequence of numbers (around 2 billion). Each number is 4 bytes and unique. The numbers are sorted. My goal is to read them into the RAM ASAP in uncompressed format. It don't care about HDD space. If I store them…
AlgoCoder
  • 41
  • 2
4
votes
4 answers

Basics of SharpZipLib. What am I missing?

I have the following method in my code: private bool GenerateZipFile(List filesToArchive, DateTime archiveDate) { try { using (ZipOutputStream zipStream = new ZipOutputStream(File.Create(GetZipFileName(archiveDate)))) …
Yes - that Jake.
  • 16,725
  • 14
  • 70
  • 96
4
votes
6 answers

Better compression algorithm for vector data?

I need to compress some spatially correlated data records. Currently I am getting 1.2x-1.5x compression with zlib, but I figure it should be possible to get more like 2x. The data records have various fields, but for example, zlib seems to have…
Qwertie
  • 16,354
  • 20
  • 105
  • 148
4
votes
3 answers

How to compress HTTP response headers?

At the Velocity 2010 conference, Google said that header compression can yield big gains: Hölzle noted a glaring inefficiency in the handling of web page headers, which provide information about a user’s IP address, browser and other session data.…
Joe Lencioni
  • 10,231
  • 18
  • 55
  • 66
4
votes
3 answers

Is there a precompiler for JavaScript like Sass?

Good morning, is there a precompiler solution for JavaScript like Sass for CSS ? The only features I need are the partials precompiling (to have fewer js files) and the auto-compression of the file. I googled for Coffeescript but it's not what I'm…
Manuel Di Iorio
  • 3,631
  • 5
  • 29
  • 31
4
votes
5 answers

How to compress columns in MySQL?

I have a table which stores e-mail correspondences. Every time someone replies, the whole body of the trail is also included and saved into the database (and I need it that way because the amount of application level changes to rectify that are…
MontyPython
  • 2,906
  • 11
  • 37
  • 58
4
votes
3 answers

Compression makes slow response time

I have reacently activated gzip compression on an IIS6 webserver. I use both static and dynamic compression (static level 10 and dyamic level 1). This was a measure to increase server response time performance. However it seems like the page loads…
picknick
  • 3,897
  • 6
  • 33
  • 48
4
votes
1 answer

Automatic compression of a string as a regular expression

Given a set of strings, I would like to automatically compress each string into a minimum length regular expression. The regular expression for two different strings should only be the same if these strings are identical. For example: String 1:…
Michael Anslow
  • 397
  • 3
  • 12
4
votes
3 answers

Merging compressed files on HDFS

How do I merge all files in a directory on HDFS, that I know are all compressed, into a single compressed file, without copying the data through the local machine? For example, but not necessarily, using Pig? As an example, I have a folder…
matthiash
  • 3,105
  • 3
  • 23
  • 34
4
votes
2 answers

Noise reduction and compression in streaming audio

hope you can help. I am recording audio from a microphone and streaming it live across a network. The quality of the samples is 11025hz, 8 bit, mono. Although there is a small delay (1 second), it works great. What I need help with is I am trying…
Rodney Burton
  • 427
  • 8
  • 18