Gentoo Archives: gentoo-user

From: Rich Freeman <rich0@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: OT Best way to compress files with digits
Date: Fri, 31 Oct 2014 22:22:56
In Reply to: [gentoo-user] Re: OT Best way to compress files with digits by Grant Edwards
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 >
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.
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.
19 --
20 Rich