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
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to