Algorithm that makes maximum compression of completly diffused data.

Gregory Ewing greg.ewing at canterbury.ac.nz
Fri Nov 8 02:09:15 EST 2013


Steven D'Aprano wrote:
> Of course, to reverse the 
> compression you need to keep a table of the prime numbers somewhere,

That's not strictly necessary -- you could calculate them
as needed. It wouldn't be *fast*, but it would work...

You've got me thinking now about how viable a compression
scheme this would be, efficiency issues aside. I suppose
it would depend on things like the average density of primes
and the average number of prime factors a number has.
Any number theorists here?

-- 
Greg



More information about the Python-list mailing list