Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Compression

Name: Anonymous 2010-12-20 12:18

Could someone explain to me the basics of how data compression works?

Name: Anonymous 2010-12-20 12:20

You take data that is one size and make it smaller.

Name: Anonymous 2010-12-20 12:20

Name: Anonymous 2010-12-20 12:37

Find common/repetitive pattern, encode data in ways which describe these reptitive patterns using less bytes (simple example: 'aaaaaaaab' -> (x a 8) b

Name: Anonymous 2010-12-20 12:40

>>4
That's the most obvious method that I could come up with myself. Does that happen often enough in real life?

Name: Anonymous 2010-12-20 12:46

>>4,5
U MENA RLE

Name: Anonymous 2010-12-20 13:16

>>4
>>5
U MENA LZ

Name: >>4 2010-12-20 13:28

Sure, RLE is common enough, and LZ is well-known as well, Huffman and arithmetic coding also works, as well as a large number of other algos.
However, my idea was a bit more general. Compression usually means you have to define a function which given some data turns it into another data (this function will be the decompression function, turning compressed input into decompressed output). Such a function is only useful when the input is shorter than the output. Typically, one does this by defining some type of encoding for data which describes what the output is, usually in some form of patterns (could be patterns which are stored in the dictionary, or built from the input or whatever), and the decompression function will read this encoded data and output the decoded(decompressed) data.

I don't really see why I tried to describe the obvious here, as >>1 could easily just read up about it online, there is a huge breadth of resources on the topic on the Internet, there are many open source compressors/decompressors, almost all archive formats worth considering are documented, and you usually have open source code to examine if you want to understand the details.

Name: Anonymous 2010-12-20 15:14

>>6
O RLE?

Name: Anonymous 2010-12-20 15:51

>>9
I feel really terrible(!) for laughing at this.

Name: Anonymous 2010-12-20 18:36

arithmetic coding
discrete cosine transform

Name: Anonymous 2010-12-20 19:44

>>8
That was neverless still very helpful of you. Thanks.

Name: wieners 2010-12-21 13:33

wieners

Don't change these.
Name: Email:
Entire Thread Thread List