Re: Supercomputer and encryption and compression @ rate of 96%

2005-05-11 Thread TZOTZIOY
On Mon, 2 May 2005 23:11:54 +0530, rumours say that km
[EMAIL PROTECTED] might have written:

Hi all,

This was posted long ago.
I tried to compress a  mp3 file but i couldnt get the keycode+.out file 
which is of size 1 bit. instead it is printed to STDOUT. i am usng python 2.4 
. i understand that the keycode is embedded in the filename itself. Is it a 
problem with python not able to create a file with such a big filename ? 
any workarounds ? 

Ah...

Perhaps your humour is too subtle for me, in which case my reply is
totally off.  In any case:

Python does not restrict filename lengths; it happily creates filenames
of length less than or equal to the limit imposed by the underlying
operating system.

Now, in our universe there cannot be a compression algorithm that
reduces entropy and file size at the same time.  The code was a joke (I
even suggested a correction, which was a mistake because I hadn't
understood the full joke[1] :)

[snip effbot's code]


[1] I thought that Fredrik just made up something that looked like
working, and he explained that his code *was* working.
-- 
TZOTZIOY, I speak England very best.
Be strict when sending and tolerant when receiving. (from RFC1958)
I really should keep that in mind when talking with people, actually...
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Supercomputer and encryption and compression @ rate of 96%

2005-05-02 Thread km
Hi all,

This was posted long ago.
I tried to compress a  mp3 file but i couldnt get the keycode+.out file which 
is of size 1 bit. instead it is printed to STDOUT. i am usng python 2.4 . i 
understand that the keycode is embedded in the filename itself. Is it a problem 
with python not able to create a file with such a big filename ? 
any workarounds ? 

regards,
KM

On Thu, Apr 14, 2005 at 01:49:22PM +0200, Fredrik Lundh wrote:
 Will McGugan wrote:
 
  Please implement this as a Python module. I would like to compress my mp3 
  collection to single 
  bits.
 
 here's the magic algorithm (somewhat simplified):
 
 def algorithm(data):
 m = 102021 # magic constant
 d = [int(c) for c in str(1*2*3*4*5*m+5+4+2+1)]
 x = [ord(c) for c in hex(1+2+4+5+m*5*4*3*2*1)]
 x[d[0]*d[1]*d[2]] = x[d[-1]] + sum(d) - d[d[-d[-1]-1]] + d[0]
 x = __import__(.join(chr(c) for c in x[d[0]*d[1]:])).encodestring
 return .join(x(data).split(\n)).rstrip(=), sum(d)-sum(reversed(d))
 
 and here's a driver for your MP3 collection:
 
 import glob
 
 def compress(filename):
 data = open(filename, rb).read()
 keycode, bit = algorithm(data)
 file = open(keycode + .out, wb)
 file.write(chr(bit))
 file.close()
 print compressed, filename,
 print len(data), =, 1, round(100.0/len(data), 3), %
 
 for file in glob.glob(*.mp3):
 compress(file)
 
 /F 
 
 
 
 -- 
 http://mail.python.org/mailman/listinfo/python-list
 

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-15 Thread R. C. James Harlow
On Thursday 14 April 2005 10:27, [EMAIL PROTECTED] wrote:
 Supercomputer and encryption and compression @ rate of 96%

snip

Dear Sir or Madam,
I have received notification that you posted a compression algorithm on 
the newsgroup comp.lang.python on or about 10:27:26 on the 04/14/2005. I am 
writing to you to inform you that the algorithm published infringes my 
zero-bit compression algorithm, US Pat No. 13375P33K, which details the 
transmission of information using no bandwidth to achieve a 100% 
compression. Please immediately follow up with a retraction of rights to this 
algorithm or you will hear from my solicitor, Mr J. Peasbody.

Yours in law,
James Harlow.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-15 Thread Robin Becker
R. C. James Harlow wrote:
On Thursday 14 April 2005 10:27, [EMAIL PROTECTED] wrote:
Supercomputer and encryption and compression @ rate of 96%

snip
Dear Sir or Madam,
I have received notification that you posted a compression algorithm on 
the newsgroup comp.lang.python on or about 10:27:26 on the 04/14/2005. I am 
writing to you to inform you that the algorithm published infringes my 
zero-bit compression algorithm, US Pat No. 13375P33K, which details the 
transmission of information using no bandwidth to achieve a 100% 
compression. Please immediately follow up with a retraction of rights to this 
algorithm or you will hear from my solicitor, Mr J. Peasbody.

Yours in law,
James Harlow.
Isn't it time we decompressed Adolf Hitler so that this thread can die?
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list


Supercomputer and encryption and compression @ rate of 96%

2005-04-14 Thread c3poptuse
Supercomputer and encryption and compression @ rate of 96%

Take a document then or a 3D matrix document change it two random or
binary code or just a program for 0's and 1's and fold it over and over
like a piece of paper then having the 1 and 0 add each other or the
0,1's canceling each other out 1+0=0 and 0+1=1 1+1=1 0+0=0 if you gave
the folds addresses like on a spread sheet there would be no math.
First A 1-24  would fold to k 1-24 down.(See Example A )  Then at F1-24
down two k 1-24 ( See example B )  If you written a very long letter
and then change it two binary code it would look like this.
   123456789.24
 a.01010101010101010101010
 b.10010101010101010101010
 c.01010101001010101010010
 e.00010101000101010101010
 f.10010101010100101010101 First A 24  would fold to k 24 down
 g.0101010101011100101  See Example A
 h.01001010101010101010111
 I.0111001101010101010
 j.01010101010101010101010
 k.10101010101010101010101


   See Example A
   123456789.24
 f.10010101010100101010101
 g.0101010101011100101
 h.01001010101010101010111 Then at F1-24 down two k 1-24
 I.0111001101010101010
 j.01010101010101010101010
 k.10101010101010101010101


  See example B
   123456789.24
 I.0111001101010101010
 j.01010101010101010101010 Then from I 1-24 to K 1-24
 k.10101010101010101010101

   123456789.24
 j.01010101010101010101010  Then from j-24 to j-1

   123456789...
 j.010101010101 Then from j-12 to j-1

   123456
 j.010101   Then from j-6 to j1

   123
 j.010  Then from j-3 to j1

   12
 j.01Then from j-2 to j1


 j.0 Then you would have
 1 bit to transfer over the
 Internet
The bit sent would be 0 and the key code would be F1-24,k 1-24,
I 1-24,K 1-24,j24,j1,j12,j1,j6,j1,j3,j1,j2,j1 and would unzip or be new
encryption you could encrypt or compress 100 terabits down to 1 bit of
information. Now if you take this idea from my web site you could make
this allot more complex and unbreakable. Data encryption 360 degrees
rotation document 90 degrees and encrypt on every angel then 45 degrees
change it two binary code do it again and again and fold it over like a
piece of paper then having the one's and zero cancel each other out. In
theory you could send a 100 terabit program to someone's computer and
have it unzip and run and install or make
A computer processor like the new 64 bit AMD have the bit unzip into a
large ram drive and buffer use one half of the 64 bit processor decode
the message and the main 64 bit run the numbers. Another way of doing
this is to have a parallel computers with using one of the processes
run the compressed 1 bit of information give the uncompressed a address
on the ram drive to change and not even go threw the processor and then
with different information on each machine compare and run statistics
on information on a 45 tflops supercomputer and turn that 45 tflops
computer into a 1 bit = 100,000 terabits to infinite as long as you
have the ram for storage! with my calculations 45 tflops wouldn't
matter any more it would be how much data you have on a 32bit operating
system changing that to a 1 bit system it would be 32 * 45tflops would
= 1440 tflops   Matter moves so fast that it intergreats and
deintergreats faster then any speed we can see it like water from a
hose at real close speed it moves in  lines.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-14 Thread Will McGugan
[EMAIL PROTECTED] wrote:
Supercomputer and encryption and compression @ rate of 96%
The bit sent would be 0 and the key code would be F1-24,k 1-24,
I 1-24,K 1-24,j24,j1,j12,j1,j6,j1,j3,j1,j2,j1 and would unzip or be new
encryption you could encrypt or compress 100 terabits down to 1 bit of
information. Now if you take this idea from my web site you could make
this allot more complex and unbreakable. Data encryption 360 degrees
rotation document 90 degrees and encrypt on every angel then 45 degrees
change it two binary code do it again and again and fold it over like a
piece of paper then having the one's and zero cancel each other out. In
theory you could send a 100 terabit program to someone's computer and
have it unzip and run and install or make
A computer processor like the new 64 bit AMD have the bit unzip into a
large ram drive and buffer use one half of the 64 bit processor decode
the message and the main 64 bit run the numbers. Another way of doing
this is to have a parallel computers with using one of the processes
run the compressed 1 bit of information give the uncompressed a address
on the ram drive to change and not even go threw the processor and then
with different information on each machine compare and run statistics
on information on a 45 tflops supercomputer and turn that 45 tflops
computer into a 1 bit = 100,000 terabits to infinite as long as you
have the ram for storage! with my calculations 45 tflops wouldn't
matter any more it would be how much data you have on a 32bit operating
system changing that to a 1 bit system it would be 32 * 45tflops would
= 1440 tflops   Matter moves so fast that it intergreats and
deintergreats faster then any speed we can see it like water from a
hose at real close speed it moves in  lines.
Please implement this as a Python module. I would like to compress my 
mp3 collection to single bits.

Will McGugan
--
http://www.willmcgugan.com
.join( [ {'*':'@','^':'.'}.get(c,None) or chr(97+(ord(c)-84)%26) for c 
in jvyy*jvyyzpthtna^pbz ] )
--
http://mail.python.org/mailman/listinfo/python-list


Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-14 Thread Stephen Kellett
In message [EMAIL PROTECTED], Will McGugan 
[EMAIL PROTECTED] writes
Please implement this as a Python module. I would like to compress my 
mp3 collection to single bits.
Just think you could have better than broadband download speeds, on your 
old 300bps modem!
--
Stephen Kellett
Object Media Limitedhttp://www.objmedia.demon.co.uk
RSI Information:http://www.objmedia.demon.co.uk/rsi.html
--
http://mail.python.org/mailman/listinfo/python-list


Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-14 Thread Fredrik Lundh
Will McGugan wrote:

 Please implement this as a Python module. I would like to compress my mp3 
 collection to single 
 bits.

here's the magic algorithm (somewhat simplified):

def algorithm(data):
m = 102021 # magic constant
d = [int(c) for c in str(1*2*3*4*5*m+5+4+2+1)]
x = [ord(c) for c in hex(1+2+4+5+m*5*4*3*2*1)]
x[d[0]*d[1]*d[2]] = x[d[-1]] + sum(d) - d[d[-d[-1]-1]] + d[0]
x = __import__(.join(chr(c) for c in x[d[0]*d[1]:])).encodestring
return .join(x(data).split(\n)).rstrip(=), sum(d)-sum(reversed(d))

and here's a driver for your MP3 collection:

import glob

def compress(filename):
data = open(filename, rb).read()
keycode, bit = algorithm(data)
file = open(keycode + .out, wb)
file.write(chr(bit))
file.close()
print compressed, filename,
print len(data), =, 1, round(100.0/len(data), 3), %

for file in glob.glob(*.mp3):
compress(file)

/F 



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-14 Thread TZOTZIOY
On 14 Apr 2005 02:27:26 -0700, rumours say that [EMAIL PROTECTED]
might have written:

Supercomputer and encryption and compression @ rate of 96%

[snip]

In other words, the story of your life can be expressed as a single
binary zero.  Get one.
-- 
TZOTZIOY, I speak England very best.
Be strict when sending and tolerant when receiving. (from RFC1958)
I really should keep that in mind when talking with people, actually...
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-14 Thread TZOTZIOY
On Thu, 14 Apr 2005 13:49:22 +0200, rumours say that Fredrik Lundh
[EMAIL PROTECTED] might have written:

Will McGugan wrote:

 Please implement this as a Python module. I would like to compress my mp3 
 collection to single 
 bits.

here's the magic algorithm (somewhat simplified):

[snip algo [0]]

Well, I take advantage of this folding idea for years now.  Do you
remember DoubleSpace?  I was getting to the limits [1] of my 100 MiB
hard disk, so I was considering upgrading my hardware.  A female friend
of mine, knowing a little but not a lot about MS-DOS asked the
eye-opening question: why don't you reapply double space to the
compressed drive?

I was enlightened.

Of course, a couple of weeks ago I had a bad sector which destroyed 800
KiB right in the middle of _Echoes_, but I had my whole Pink Floyd
collection on a 5.25 floppy (zip of zip of zip of...)


[0] -- btw, in your code, Fredrik:
file = open(keycode + .out, wb).replace(keycode, filename)

[1] disk space -- the final frontier
-- 
TZOTZIOY, I speak England very best.
Be strict when sending and tolerant when receiving. (from RFC1958)
I really should keep that in mind when talking with people, actually...
-- 
TZOTZIOY, I speak England very best.
Be strict when sending and tolerant when receiving. (from RFC1958)
I really should keep that in mind when talking with people, actually...
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-14 Thread Fredrik Lundh
 [0] -- btw, in your code, Fredrik:
 file = open(keycode + .out, wb).replace(keycode, filename)

if you do that, decompression won't work.

/F 



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-14 Thread martijn
And how do you get the data back ?

1+0=0 == 0+0=0
0+1=1 == 1+1=1

let's say you have the end key : 0
then you want to decompress it , but in what ? 0 0 or 1 0

;)

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-14 Thread Will McGugan
Fredrik Lundh wrote:
Will McGugan wrote:

Please implement this as a Python module. I would like to compress my mp3 collection to single 
bits.

here's the magic algorithm (somewhat simplified):
def algorithm(data):
m = 102021 # magic constant
d = [int(c) for c in str(1*2*3*4*5*m+5+4+2+1)]
x = [ord(c) for c in hex(1+2+4+5+m*5*4*3*2*1)]
x[d[0]*d[1]*d[2]] = x[d[-1]] + sum(d) - d[d[-d[-1]-1]] + d[0]
x = __import__(.join(chr(c) for c in x[d[0]*d[1]:])).encodestring
return .join(x(data).split(\n)).rstrip(=), sum(d)-sum(reversed(d))
and here's a driver for your MP3 collection:
import glob
def compress(filename):
data = open(filename, rb).read()
keycode, bit = algorithm(data)
file = open(keycode + .out, wb)
file.write(chr(bit))
file.close()
print compressed, filename,
print len(data), =, 1, round(100.0/len(data), 3), %
for file in glob.glob(*.mp3):
compress(file)
/F 


Muchas gracias. Although there may be a bug. I compressed my Evanescence 
albumn, but after decompression it became the complete works of Charles 
Dickens..

--
http://www.willmcgugan.com
.join( [ {'*':'@','^':'.'}.get(c,None) or chr(97+(ord(c)-84)%26) for c 
in jvyy*jvyyzpthtna^pbz ] )
--
http://mail.python.org/mailman/listinfo/python-list


Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-14 Thread TZOTZIOY
On Thu, 14 Apr 2005 16:35:59 +0200, rumours say that Fredrik Lundh
[EMAIL PROTECTED] might have written:

 [0] -- btw, in your code, Fredrik:
 file = open(keycode + .out, wb).replace(keycode, filename)

if you do that, decompression won't work.

How obvious, now that you mention it... :)
-- 
TZOTZIOY, I speak England very best.
Be strict when sending and tolerant when receiving. (from RFC1958)
I really should keep that in mind when talking with people, actually...
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-14 Thread Fredrik Lundh
Will McGugan wrote:

 Muchas gracias. Although there may be a bug. I compressed my Evanescence
 albumn, but after decompression it became the complete works of Charles

strange.  the algorithm should be reversible.  sounds like an operating
system bug.  what system are you using?

/F



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-14 Thread Tiziano Bettio
[EMAIL PROTECTED] wrote:
And how do you get the data back ?
1+0=0 == 0+0=0
0+1=1 == 1+1=1
let's say you have the end key : 0
then you want to decompress it , but in what ? 0 0 or 1 0
;)
 

hi there
could someone please tell me that this thread wasn't a aprilsfoll day
joke and it is for real...
i'm pretty much able to go down to a single bit but what would be the
reverse algorithm as stated by martin...
:0
--
http://mail.python.org/mailman/listinfo/python-list


Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-14 Thread Jeremy Bowers
On Thu, 14 Apr 2005 17:44:56 +0200, Fredrik Lundh wrote:

 Will McGugan wrote:
 
 Muchas gracias. Although there may be a bug. I compressed my Evanescence
 albumn, but after decompression it became the complete works of Charles
 
 strange.  the algorithm should be reversible.  sounds like an operating
 system bug.  what system are you using?
 
 /F

After I compressed my OS (on the other machine) with your code, none,
apparently.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-14 Thread Fredrik Lundh
Tiziano Bettio wrote:

 could someone please tell me that this thread wasn't a aprilsfoll day
 joke and it is for real...

 i'm pretty much able to go down to a single bit but what would be the
 reverse algorithm as stated by martin...

magic?

I suggest running my script on a couple of small text files.  when you've done 
that,
see if you can figure out how the decompression algorithm works.

/F 



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-14 Thread Tiziano Bettio
Fredrik Lundh wrote:
Tiziano Bettio wrote:
 

could someone please tell me that this thread wasn't a aprilsfoll day
joke and it is for real...
i'm pretty much able to go down to a single bit but what would be the
reverse algorithm as stated by martin...
   

magic?
I suggest running my script on a couple of small text files.  when you've done 
that,
see if you can figure out how the decompression algorithm works.
/F 


 

Actually your script doesn't work on my python distribution...
(using 2.3.2)
cheers
--
http://mail.python.org/mailman/listinfo/python-list


Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-14 Thread R. C. James Harlow
On Thursday 14 April 2005 22:18, Tiziano Bettio wrote:

 Actually your script doesn't work on my python distribution...

Works fine here - did you decompress the first bit of the python executable? 
You have to do that before Fredrick's script works...


pgpYFHzjRTUoB.pgp
Description: PGP signature
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-14 Thread Tiziano Bettio
R. C. James Harlow wrote:
On Thursday 14 April 2005 22:18, Tiziano Bettio wrote:
 

Actually your script doesn't work on my python distribution...
   

Works fine here - did you decompress the first bit of the python executable? 
You have to do that before Fredrick's script works...
 

well i tried, but i don't have enough diskspace... my 4.67TerraByte are 
just 98.889 ExaByte short to complete the task

;)
--
http://mail.python.org/mailman/listinfo/python-list


Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-14 Thread Fred Pacquier
Christos TZOTZIOY Georgiou [EMAIL PROTECTED] said :

 Well, I take advantage of this folding idea for years now.  Do you
 remember DoubleSpace?  I was getting to the limits [1] of my 100 MiB
 hard disk, so I was considering upgrading my hardware.  A female
 friend of mine, knowing a little but not a lot about MS-DOS asked the
 eye-opening question: why don't you reapply double space to the
 compressed drive?

Any BBS-era old-timers here remember NABOB ? :-)

-- 
YAFAP : http://www.multimania.com/fredp/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-14 Thread Fredrik Lundh
Tiziano Bettio wrote:

 Actually your script doesn't work on my python distribution...

 (using 2.3.2)

since then, 2.3.3, 2.3.4, 2.3.5, 2.4, and 2.4.1 has been released.  since
the code uses generator expressions, you need at least 2.4.

(or you can add [] around the generator expressions, to turn them into
list comprehensions)

/F 



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-14 Thread R. C. James Harlow
On Thursday 14 April 2005 22:21, R. C. James Harlow wrote:
 You have to do that before Fredrick's script works...

Damn - 'Fredrik's' - I accidentally decompressed his name.


pgpbUXNRRyNvA.pgp
Description: PGP signature
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-14 Thread Michael Spencer
Fredrik Lundh wrote:
Tiziano Bettio wrote:

could someone please tell me that this thread wasn't a aprilsfoll day
joke and it is for real...
i'm pretty much able to go down to a single bit but what would be the
reverse algorithm as stated by martin...

magic?
I suggest running my script on a couple of small text files.  when you've done 
that,
see if you can figure out how the decompression algorithm works.
/F 

Tricky - especially checking the parity of the data bit, but I believe the 
following works:

def decompress(filename):
m = '\x00\x00\x0fE\xc7\xc4'
m = [(ord(i)  0x7F) - (ord(i)  0x80) for i in m]
filename, data = open(filename, rb).read(), filename[:-4]
class Unfold(object):
# Accumulator for partially unfolded data
args = []
try:
unfold = Unfold()
data  = ==.join([data,'\n'])
compressed = [abs(data)]
for fold in compressed:
unfold.args.append(fold ** abs(fold))
except TypeError, unfold:
# No more unfolds
pass
decoder = __import__(.join(chr(ord(i)+j)
for i, j in zip(unfold.args[0], m))).decodestring
return decoder(data)
Michael
--
http://mail.python.org/mailman/listinfo/python-list


Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-14 Thread Lonnie Princehouse
That's pretty good, but I have an algorithm that compresses data into
zero bits.

def compress(data):
  pass

To decompress, you simply generate a random string of random length
using a random number generator based on quantum states, with the
expectation that you happen to be in one of the possible universes for
which this string turns out to be the data you compressed in the first
place.

Now, according to Leibniz,  God (who alone exists by necessity)
initially conceived of all possible worlds, and He chose this world out
of all others to actualize.  Because God is benevolent, he chose the
fullest world with the least evil, meaning that we do indeed exist in
the Best of All Possible Worlds.  In the Best of All Possible worlds,
that random string you just generated would be your uncompressed data,
right?  In fact, it might even be better than the original data.  (a
gainy algorithm?)


[file under Faith Algorithms]

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-14 Thread Peter Hansen
R. C. James Harlow wrote:
On Thursday 14 April 2005 22:21, R. C. James Harlow wrote:
You have to do that before Fredrick's script works...

Damn - 'Fredrik's' - I accidentally decompressed his name.
It actually *is* Fredrick, but the c is both silent,
and hidden...
-seemed-silly-enough-for-this-thread-ly y'rs,
 Peter
--
http://mail.python.org/mailman/listinfo/python-list