The Zeus Compression Algorithm

Discussion in 'C Programming' started by dunric@yahoo.com, Dec 18, 2005.

  1. Guest

    After writing the computing urban legend "The Helsinki Code",
    I spent several nights thinking up how in the world Gustav
    Larsson, the Finnish PDP-8 computer programmer, could have
    managed to receive such a miraculous message from God.

    Surely, for a 1-byte computer program such as "@" to compile
    successfully (in RTPS FORTRAN), a miracle compression algorithm
    would be necessary.

    Then it dawned on me. Gustav had accidentally stumbled upon
    a compiled Fortran program compressed by the Impossibly Efficient
    "Zeus Compression Algorithm" (ZCA). That is, a compression algo-
    rithm so efficient that pages upon pages of text can be compressed
    into a single byte. The ZCA, in theory, can compress the entire
    contents of the Holy Bible into a single byte.

    We presently know of no technology which can accomplish this, but
    since God wrote the "@" program, only God could possibly make
    the ZCA work. In future years, it will happen.

    BTW, the story of the Helsinki Code can still be found online (just
    search for it on Usenet).

    A ZCA could work, in theory, like this:
    (using pseudo-c)

    '// ------------------------------------------------
    '// zeus.c
    '// An example of how a 1-byte Zeus Compression Algo
    '// might be written.
    '// Dec 18 2005 A.D.
    '// Source code is public domain.
    '// By: Paul Panks ()
    '// ------------------------------------------------
    #include "compress.hhf";
    #include "stdlib.hhf";
    #include "strings.hhf";
    #include "math.hhf";
    declare string w(str 32);
    declare integer null(int 32);
    declare integer io.channel.read(int 32);
    declare integer io.channel.write(int 32);
    declare string byte1(str 32 long);
    declare string byte2(str 32 long);
    declare array bytelevel[100];
    null:=0;
    w:=null;
    io.channel.readwrite:=1;
    byte1:=memory($01); '$01 is fist byte of read/write;
    byte2:=memory($02); '$02 is second byte of read/write;
    bytelevel[100]:=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,
    17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,
    36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,
    55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,
    74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,
    93,94,95,96,97,98,99,100];
    begin program zeus;
    stdout.put("Zeus Compression Algorithm [ZCA]" nl nl);
    stdout.put("Input file to compress to 1 byte: ");
    get.input(w);
    open.file(w,io.channel.readwrite);
    readbit(byte1);
    readbit(byte2);
    compress(byte1,byte2) @ bytelevel[1 to 100];
    call zeus; ' call special 'zeus' compression subroutine
    bit.mark(byte1 as zeus);
    bit.mark(byte2 as zeus);
    term zeus; ' close special 'zeus' compression subroutine
    writebit(byte1);
    writebit(byte2);
    close.file(w,io.channel.readwrite);
    stdout.put("File compressed to 1 byte at 100% ratio." nl);
    stdout.put("To uncompress, run 'dezeus' at shell prompt." nl nl);
    stdout.put("Press a key to terminate application..." nl);
    get.keyinput(w);
    return 0;
    end program zeus;

    Paul
    , Dec 18, 2005
    #1
    1. Advertising

  2. writes:
    > After writing the computing urban legend "The Helsinki Code",
    > I spent several nights thinking up how in the world Gustav
    > Larsson, the Finnish PDP-8 computer programmer, could have
    > managed to receive such a miraculous message from God.

    [snip]
    >
    > A ZCA could work, in theory, like this:
    > (using pseudo-c)

    [...]
    > declare integer io.channel.write(int 32);
    > declare string byte1(str 32 long);
    > declare string byte2(str 32 long);
    > declare array bytelevel[100];
    > null:=0;

    [snip]

    I've seen some stuff about the "Helsinki Code" elsewhere, but
    comp.lang.c has been relatively free of it so far.

    The author seems to be under the delusion (a) that something he
    recently made up out of whole cloth qualfies as an "urban legend",
    (b) that the "pseudo-c" he posted bears some resemblance to actual C,
    and (c) that anyone might actually be interested.

    It's not C, it's off-topic, and it's almost certainly total nonsense.
    For those of you who use killfiles, I suggest adding an entry. Beyond
    that, please don't feed the troll.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.
    Keith Thompson, Dec 18, 2005
    #2
    1. Advertising

  3. Richard Bos Guest

    Keith Thompson <> wrote:

    > writes:

    [ SNIP! ]
    > The author seems to be under the delusion


    The author is under many, many delusions. He is well known in another
    group I frequent as one of the most self-delusional individuals on this
    globe. He isn't even a troll - he doesn't have the grasp on reality to
    understand that he's not the genius he thinks he is.

    Richard
    Richard Bos, Dec 19, 2005
    #3
  4. jacob navia Guest

    Richard Bos wrote:
    > Keith Thompson <> wrote:
    >
    >
    >> writes:

    >
    > [ SNIP! ]
    >
    >>The author seems to be under the delusion

    >
    >
    > The author is under many, many delusions. He is well known in another
    > group I frequent as one of the most self-delusional individuals on this
    > globe. He isn't even a troll - he doesn't have the grasp on reality to
    > understand that he's not the genius he thinks he is.
    >
    > Richard


    Wait, god using C to write a program ???

    Nice... What *compiler* did he use?

    I would bet that he compiled with lcc-win32!!!

    I'm going straight to heaven :)

    jacob
    jacob navia, Dec 19, 2005
    #4
  5. Keith Thompson wrote:
    > writes:
    > > After writing the computing urban legend "The Helsinki Code",
    > > I spent several nights thinking up how in the world Gustav
    > > Larsson, the Finnish PDP-8 computer programmer, could have
    > > managed to receive such a miraculous message from God.

    > [snip]
    > >
    > > A ZCA could work, in theory, like this:
    > > (using pseudo-c)

    > [...]
    > > declare integer io.channel.write(int 32);
    > > declare string byte1(str 32 long);
    > > declare string byte2(str 32 long);
    > > declare array bytelevel[100];
    > > null:=0;

    > [snip]
    >
    > I've seen some stuff about the "Helsinki Code" elsewhere, but
    > comp.lang.c has been relatively free of it so far.
    >
    > The author seems to be under the delusion (a) that something he
    > recently made up out of whole cloth qualfies as an "urban legend",
    > (b) that the "pseudo-c" he posted bears some resemblance to actual C,
    > and (c) that anyone might actually be interested.
    >
    > It's not C, it's off-topic, and it's certainly total nonsense.


    Fixed the above sentence. No compression algorithm (known or unknown)
    can compress *any* file to just one byte and then recover the original
    file.

    > For those of you who use killfiles, I suggest adding an entry. Beyond
    > that, please don't feed the troll.
    >
    > --
    > Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    > San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    > We must do something. This is something. Therefore, we must do this.
    Antonio Contreras, Dec 19, 2005
    #5
  6. "Antonio Contreras" <> writes:
    > Keith Thompson wrote:

    [snip]
    >> It's not C, it's off-topic, and it's certainly total nonsense.

    >
    > Fixed the above sentence. No compression algorithm (known or unknown)
    > can compress *any* file to just one byte and then recover the original
    > file.


    I wrote "it's almost certainly total nonsense". You deleted the word
    "almost". You did say that you "fixed" the sentence, but please don't
    alter quoted material without clearly indicating what you've changed.

    I wrote "almost" because I hadn't taken the time to understand his
    nonsense well enough to be certain about it. If you want to state
    your own certainty, by all means do so in your own words.

    (We've had people in this newsgroup deliberately alter quoted text, so
    some of us are a little touchy on the subject.)

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.
    Keith Thompson, Dec 19, 2005
    #6
  7. Keith Thompson wrote:
    > "Antonio Contreras" <> writes:
    > > Keith Thompson wrote:

    > [snip]
    > >> It's not C, it's off-topic, and it's certainly total nonsense.

    > >
    > > Fixed the above sentence. No compression algorithm (known or unknown)
    > > can compress *any* file to just one byte and then recover the original
    > > file.

    >
    > I wrote "it's almost certainly total nonsense". You deleted the word
    > "almost". You did say that you "fixed" the sentence, but please don't
    > alter quoted material without clearly indicating what you've changed.
    >
    > I wrote "almost" because I hadn't taken the time to understand his
    > nonsense well enough to be certain about it. If you want to state
    > your own certainty, by all means do so in your own words.
    >
    > (We've had people in this newsgroup deliberately alter quoted text, so
    > some of us are a little touchy on the subject.)


    I apologize if my previous post went against this group's netiquette.

    What I wanted to point is that it's not necessary to read the
    pseudo-code in order to be able to say that it's nonsense. The claimed
    effect is simply imposible. As a friend of mine says, "entropy is the
    limit between compression and magic". The zeus compression algorithm
    certainly falls into the category of magic.
    Antonio Contreras, Dec 19, 2005
    #7
  8. Alex Fraser Guest

    "Antonio Contreras" <> wrote in message
    news:...
    > Fixed the above sentence. No compression algorithm (known or unknown)
    > can compress *any* file to just one byte and then recover the original
    > file.


    Depends on the value of CHAR_BIT ;).

    Alex
    Alex Fraser, Dec 19, 2005
    #8
  9. Alex Fraser wrote:
    > "Antonio Contreras" <> wrote in message
    > news:...
    > > Fixed the above sentence. No compression algorithm (known or unknown)
    > > can compress *any* file to just one byte and then recover the original
    > > file.

    >
    > Depends on the value of CHAR_BIT ;).


    xDDD

    Well, in fact it doesn't. As long as CHAR_BIT remains finite such an
    algorithm simply cannot exist.
    Antonio Contreras, Dec 19, 2005
    #9
  10. Chris Dollin Guest

    Antonio Contreras wrote:

    > Alex Fraser wrote:
    >> "Antonio Contreras" <> wrote in message
    >> news:...
    >> > Fixed the above sentence. No compression algorithm (known or unknown)
    >> > can compress *any* file to just one byte and then recover the original
    >> > file.

    >>
    >> Depends on the value of CHAR_BIT ;).

    >
    > xDDD
    >
    > Well, in fact it doesn't. As long as CHAR_BIT remains finite such an
    > algorithm simply cannot exist.


    You're assuming that the universe contains unboundedly many bits.

    --
    Chris "bits and pieces of mind" Dollin
    oxygen is a highly reactive waste-product of plant life.
    Chris Dollin, Dec 19, 2005
    #10
  11. Chris Dollin wrote:
    > Antonio Contreras wrote:
    >
    > > Alex Fraser wrote:
    > >> "Antonio Contreras" <> wrote in message
    > >> news:...
    > >> > Fixed the above sentence. No compression algorithm (known or unknown)
    > >> > can compress *any* file to just one byte and then recover the original
    > >> > file.
    > >>
    > >> Depends on the value of CHAR_BIT ;).

    > >
    > > xDDD
    > >
    > > Well, in fact it doesn't. As long as CHAR_BIT remains finite such an
    > > algorithm simply cannot exist.

    >
    > You're assuming that the universe contains unboundedly many bits.


    Point taken.
    Antonio Contreras, Dec 19, 2005
    #11
  12. jacob navia <> wrote:

    > I would bet that he compiled with lcc-win32!!!


    Nay. In the beginning, the Earth was a formless void, and then said
    God "Let there be GCC", and he looked upon free software, and saw
    that it was good.

    --
    Christopher Benson-Manica | I *should* know what I'm talking about - if I
    ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
    Christopher Benson-Manica, Dec 19, 2005
    #12
  13. Chuck F. Guest

    Antonio Contreras wrote:
    > Keith Thompson wrote:
    >>

    .... snip ...
    >>
    >> (We've had people in this newsgroup deliberately alter quoted
    >> text, so some of us are a little touchy on the subject.)

    >
    > I apologize if my previous post went against this group's
    > netiquette.
    >
    > What I wanted to point is that it's not necessary to read the
    > pseudo-code in order to be able to say that it's nonsense.


    It is not "this group", it is all Usenet. Altering quoted material
    without explicit indication is simply not acceptable anywhere.

    Aside - having been gone from here since August, it is pleasant to
    see that ERT has apparently given up plaguing us.

    --
    "If you want to post a followup via groups.google.com, don't use
    the broken "Reply" link at the bottom of the article. Click on
    "show options" at the top of the article, then click on the
    "Reply" at the bottom of the article headers." - Keith Thompson
    More details at: <http://cfaj.freeshell.org/google/>
    Chuck F., Dec 19, 2005
    #13
  14. In article <>,
    Chuck F. <> wrote:

    >It is not "this group", it is all Usenet. Altering quoted material
    >without explicit indication is simply not acceptable anywhere.


    He did give explicit indication: "Fixed the above sentence". It would
    have been better to indicate it within the quoted text though. The aim
    should be to ensure that no-one reads it without realising that it's
    been changed.

    -- Richard
    Richard Tobin, Dec 19, 2005
    #14
  15. Default User Guest

    wrote:

    > After writing the computing urban legend "The Helsinki Code",


    This is all one really needs to know about Paul Panks. He generates
    urban legends and then spends time spamming them. He is either a troll
    or mentally ill (that's what he claims).

    Please ignore anything he says. He gets off on people spinning out
    threads based on his trolls/delusions. We just went through this over
    on comp.lang.c++.



    Brian
    Default User, Dec 19, 2005
    #15
  16. Barry Guest

    Re: The Zeus Compression Algorithm = OT

    <> wrote in message
    news:...
    > After writing the computing urban legend "The Helsinki Code",
    > I spent several nights thinking up how in the world Gustav
    > Larsson, the Finnish PDP-8 computer programmer, could have
    > managed to receive such a miraculous message from God.
    >
    > Surely, for a 1-byte computer program such as "@" to compile
    > successfully (in RTPS FORTRAN), a miracle compression algorithm
    > would be necessary.
    >
    > Then it dawned on me. Gustav had accidentally stumbled upon
    > a compiled Fortran program compressed by the Impossibly Efficient
    > "Zeus Compression Algorithm" (ZCA). That is, a compression algo-
    > rithm so efficient that pages upon pages of text can be compressed
    > into a single byte. The ZCA, in theory, can compress the entire
    > contents of the Holy Bible into a single byte.
    >
    > We presently know of no technology which can accomplish this, but
    > since God wrote the "@" program, only God could possibly make
    > the ZCA work. In future years, it will happen.
    >
    > BTW, the story of the Helsinki Code can still be found online (just
    > search for it on Usenet).
    >
    > A ZCA could work, in theory, like this:
    > (using pseudo-c)
    >
    > '// ------------------------------------------------
    > '// zeus.c
    > '// An example of how a 1-byte Zeus Compression Algo
    > '// might be written.
    > '// Dec 18 2005 A.D.
    > '// Source code is public domain.
    > '// By: Paul Panks ()
    > '// ------------------------------------------------
    > #include "compress.hhf";
    > #include "stdlib.hhf";
    > #include "strings.hhf";
    > #include "math.hhf";
    > declare string w(str 32);
    > declare integer null(int 32);
    > declare integer io.channel.read(int 32);
    > declare integer io.channel.write(int 32);
    > declare string byte1(str 32 long);
    > declare string byte2(str 32 long);
    > declare array bytelevel[100];
    > null:=0;
    > w:=null;
    > io.channel.readwrite:=1;
    > byte1:=memory($01); '$01 is fist byte of read/write;
    > byte2:=memory($02); '$02 is second byte of read/write;
    > bytelevel[100]:=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,
    > 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,
    > 36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,
    > 55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,
    > 74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,
    > 93,94,95,96,97,98,99,100];
    > begin program zeus;
    > stdout.put("Zeus Compression Algorithm [ZCA]" nl nl);
    > stdout.put("Input file to compress to 1 byte: ");
    > get.input(w);
    > open.file(w,io.channel.readwrite);
    > readbit(byte1);
    > readbit(byte2);
    > compress(byte1,byte2) @ bytelevel[1 to 100];
    > call zeus; ' call special 'zeus' compression subroutine
    > bit.mark(byte1 as zeus);
    > bit.mark(byte2 as zeus);
    > term zeus; ' close special 'zeus' compression subroutine
    > writebit(byte1);
    > writebit(byte2);
    > close.file(w,io.channel.readwrite);
    > stdout.put("File compressed to 1 byte at 100% ratio." nl);
    > stdout.put("To uncompress, run 'dezeus' at shell prompt." nl nl);
    > stdout.put("Press a key to terminate application..." nl);
    > get.keyinput(w);
    > return 0;
    > end program zeus;
    >
    > Paul
    >


    On all the newsgroups I see his post I compress dunric's posts to zero bytes
    (at least for my own purposes). Interestingly enough, the same algorithem
    works
    with Kenny McCormack's posts.

    Yet, I am sure the entropy, when measured accurately, of the messages is
    preserved :).

    barry
    Barry, Dec 19, 2005
    #16
  17. "Antonio Contreras" <> writes:
    > Alex Fraser wrote:
    >> "Antonio Contreras" <> wrote in message
    >> news:...
    >> > Fixed the above sentence. No compression algorithm (known or unknown)
    >> > can compress *any* file to just one byte and then recover the original
    >> > file.

    >>
    >> Depends on the value of CHAR_BIT ;).

    >
    > xDDD
    >
    > Well, in fact it doesn't. As long as CHAR_BIT remains finite such an
    > algorithm simply cannot exist.


    And arguing the point here in comp.lang.c constitutes "feeding the
    troll", something I was trying to forestall with my initial followup.

    If someone posts something here that is (a) off-topic, and (b) utter
    nonsense, the *only* thing we need to do is point out that it's
    off-topic and ignore it. Otherwise we allow any random troll to lure
    us into a discussion of any topic of his or her choosing. Flaming a
    troll, or refuting his claims, constitutes victory for the troll. (In
    this particular case, a pointer to the comp.compression FAQ might be
    appropriate.)

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.
    Keith Thompson, Dec 19, 2005
    #17
  18. Re: The Zeus Compression Algorithm = OT

    On Mon, 19 Dec 2005 16:31:24 -0600, "Barry" <>
    wrote:

    >
    > <> wrote in message
    > news:...

    <unnecessarily quoted blither snipped>
    > On all the newsgroups I see his post I compress dunric's posts to zero bytes
    > (at least for my own purposes). Interestingly enough, the same algorithem
    > works
    > with Kenny McCormack's posts.
    >
    > Yet, I am sure the entropy, when measured accurately, of the messages is
    > preserved :).
    >

    So if Kenny quotes dunric, do you get a negative-sized output?

    ObC: this affects whether you want to use an unsigned type. :)

    - David.Thompson1 at worldnet.att.net
    Dave Thompson, Jan 4, 2006
    #18
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Howie
    Replies:
    1
    Views:
    416
    Gianni Mariani
    Mar 4, 2004
  2. Replies:
    1
    Views:
    2,923
    Victor Bazarov
    Feb 28, 2006
  3. Valli
    Replies:
    1
    Views:
    1,835
  4. cornelis van der bent

    inaccuracies in compression algorithm

    cornelis van der bent, Jul 23, 2009, in forum: C Programming
    Replies:
    18
    Views:
    532
    Keith Thompson
    Jul 24, 2009
  5. gokuldeep
    Replies:
    0
    Views:
    487
    gokuldeep
    Mar 29, 2013
Loading...

Share This Page