1 |
On Fri, Oct 31, 2014 at 4:25 PM, Grant Edwards |
2 |
<grant.b.edwards@×××××.com> wrote: |
3 |
> |
4 |
> You're cheating. The algorithm you tested will compress strings of |
5 |
> arbitrary 8-bit values. The algorithm you proposed will only compress |
6 |
> strings of bytes where each byte can have only one of 10 values. |
7 |
> |
8 |
|
9 |
Of course. I wasn't expecting the general-purpose algorithm to do as |
10 |
well. In some sense, part of the information that is being encoded is |
11 |
actually in the compression algorithm itself (the mapping), while in a |
12 |
general-purpose compression algorithm that information has to be part |
13 |
of the compressed data stream. |
14 |
|
15 |
I was just expecting gzip/etc to get much closer to the theoretical |
16 |
limit. I figured that it might be a few percent higher, but I wasn't |
17 |
expecting a 10+% difference. |
18 |
|
19 |
-- |
20 |
Rich |