Tools to compress a finite list as a function

38 Views Asked by At

Can someone show me some tool to a lossless compression in an algorithm of a finite list of rational numbers?

By example this list A=(0,1,3,2,-1,-2,0), there is a way to construct an algorithm or any kind of function that map this list?

1

There are 1 best solutions below

0
On BEST ANSWER

The good news: There's lots of compression algorithms, and they are all amenable to deployment against lists of numbers. In fact, that's what basically all compression algorithms are designed to work on! "A list of numbers" can represent anthing -- for instance: (72, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100, 33) can, decoded correctly, represent the string "Hello, world!".

The terrible news: There is no such thing as a compression algorithm that losslessly compresses every list of numbers, even with finite states and finite lists: every compression algorithm must make some lists longer, simply because there's not enough room among the shorter lists to hold them all. all compression algorithms rely on patterns in the data.

Without some knowledge of what precisely we're representing, what kind of patterns we can expect, we will basically thrash at the data hoping something might work.