Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Gregory Ewing Newsgroups: comp.lang.python Subject: Re: Algorithm that makes maximum compression of completly diffused data. Date: Fri, 08 Nov 2013 20:09:15 +1300 Lines: 15 Message-ID: References: <205bfa4f-29de-43de-be5a-72a12d77d0c9@googlegroups.com> <9d998707-a6e9-4911-a585-c2310e4a2b31@googlegroups.com> <9b62770c-7ca1-4a4d-81a5-bf7251bac957@googlegroups.com> <13c04f06-f1f2-4f67-b975-3cff28714641@googlegroups.com> <527c6cf1$0$29983$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net 8vbcIuPvm3pwe+9ORVpDEQInt/ejl2V7dI4lUVlr9cZkif78X8 Cancel-Lock: sha1:4DM59oAzvEI7qYEvJSDRf8rwiC0= User-Agent: Mozilla Thunderbird 1.0.5 (Macintosh/20050711) X-Accept-Language: en-us, en In-Reply-To: <527c6cf1$0$29983$c3e8da3$5496439d@news.astraweb.com> Xref: csiph.com comp.lang.python:58756 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