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
24
votes
2 answers

System.IO.Compression and ZipFile - extract and overwrite

I'm using the standard VB.NET libraries for extracting and compressing files. It works as well but the problem comes when I have to extract and files exist already. Code I use Imports: Imports System.IO.Compression Method I call when it…
user1714647
  • 664
  • 2
  • 7
  • 20
24
votes
11 answers

Can a program output a copy of itself

I think this might be a classic question but I am not aware of an answer. Can a program output a copy of itself, and, if so, is there a short program that does this? I do not accept the "empty program" as an answer, and I do not accept programs that…
ragnarius
  • 5,642
  • 10
  • 47
  • 68
24
votes
6 answers

why is LZMA SDK (7-zip) so slow

I found 7-zip great and I will like to use it on .net applications. I have a 10MB file (a.001) and it takes: 2 seconds to encode. Now it will be nice if I could do the same thing on c#. I have downloaded http://www.7-zip.org/sdk.html LZMA SDK c#…
Tono Nam
  • 34,064
  • 78
  • 298
  • 470
24
votes
4 answers

What is the easiest way to add compression to WCF in Silverlight?

I have a silverlight 2 beta 2 application that accesses a WCF web service. Because of this, it currently can only use basicHttp binding. The webservice will return fairly large amounts of XML data. This seems fairly wasteful from a bandwidth…
caryden
  • 7,738
  • 3
  • 30
  • 31
23
votes
5 answers

Closest group of 3 points

Is there a known, efficient algorithm for finding the closest group of three points in a cloud? This is similar to the closest pair of points problem but I am looking for three points instead of two. Edit The definition of "closest" will affect the…
finnw
  • 47,861
  • 24
  • 143
  • 221
23
votes
9 answers

How to efficiently predict if data is compressible

I want to write a storage backend to store larger chunks of data. The data can be anything, but it is mainly binary files (images, pdfs, jar files) or text files (xml, jsp, js, html, java...). I found most of the data is already compressed. If…
Thomas Mueller
  • 48,905
  • 14
  • 116
  • 132
23
votes
7 answers

How to determine compression method of a ZIP/RAR file

I have a few zip and rar files that I'm working with, and I'm trying to analyze the properties of how each file was compressed (compression level, compression algorithm (e.g. deflate, LZMA, BZip2), dictionary size, word size, etc.), and I haven't…
Intenex
  • 1,907
  • 3
  • 20
  • 33
23
votes
8 answers

Create a ZIP file in Kotlin

I'm trying to create a zip file in Kotlin. this is the code: fun main(args: Array) { var files: Array = arrayOf("/home/matte/theres_no_place.png", "/home/matte/vladstudio_the_moon_and_the_ocean_1920x1440_signed.jpg") var out =…
matteo
  • 2,121
  • 4
  • 20
  • 33
23
votes
4 answers

When should I use MySQL compressed protocol?

I've learned that MySQL can compress communication between servers and clients. Compression is used if both client and server support zlib compression, and the client requests compression. (from MySQL Forge Wiki) The most obvious pros and cons…
ento
  • 5,801
  • 6
  • 51
  • 69
23
votes
7 answers

Compression algorithm for IEEE-754 data

Anyone have a recommendation on a good compression algorithm that works well with double precision floating point values? We have found that the binary representation of floating point values results in very poor compression rates with common…
David Taylor
  • 2,021
  • 21
  • 25
23
votes
1 answer

How to compress JSON responses

I am using a lot of ajax calls to query the database and I get large text (json) responses. I will like to compress the response. There is a great way of compressing text using javascript in JavaScript implementation of Gzip. The problem is I want…
Tono Nam
  • 34,064
  • 78
  • 298
  • 470
23
votes
1 answer

Video compression on android using new MediaCodec Library

In my app I'm trying to upload some videos that the user picked from gallery. The problem is that usually the android video files are too big to upload and so- we want to compress them first by lower bitrate/ resolution. I've just heard about the…
shem
  • 4,686
  • 2
  • 32
  • 43
23
votes
1 answer

MsgPack for compressing json data, why not using gzip/deflate?

I heard something about MsgPack that can be used for compressing json messages, but I have a question about that, why not simply using Gzip/Deflate instead of MsgPack? I think it's so better to debugging also.
Afshin Mehrabani
  • 33,262
  • 29
  • 136
  • 201
23
votes
6 answers

Python library for converting files to MP3 and setting their quality

I'm trying to find a Python library that would take an audio file (e.g. .ogg, .wav) and convert it into mp3 for playback on a webpage. Also, any thoughts on setting its quality for playback would be great. Thank you.
Abid A
  • 7,588
  • 4
  • 32
  • 32
23
votes
6 answers

Creating a zipped/compressed folder in Windows using Powershell or the command line

I am creating a nightly database schema file and would like to put all the files created each night, one for each database, into a folder and compress that folder. I have a PowerShell script that creates the schema.Only creation script of the db's…
TechDawg270
  • 725
  • 3
  • 9
  • 20