don't click here

Smallest PE file challenge

Discussion in 'Technical Discussion' started by Sik, Mar 24, 2009.

  1. Sik

    Sik

    Sik is pronounced as "seek", not as "sick". Tech Member
    6,718
    10
    0
    being an asshole =P
    Probably old, but found this when Googling around:
    http://www.phreedom.org/solar/code/tinype/

    Basically the challenge was to write the smallest PE (a normal program, c'mon) that would download a file from Internet. The result is a file that is 133 bytes long O_O Yes, that's freaking small. Anybody wants to comment on it?
     
  2. Overlord

    Overlord

    Now playable in Smash Bros Ultimate Moderator
    19,549
    1,126
    93
    Long-term happiness
    Impressive. Much like the 4k challenges, it's interesting to see the tricks coders can use for optimising programs like this. This kind of thing is programming as an art rather than as a science =P
     
  3. AamirM

    AamirM

    Tech Member
    I think compressors (like UPX) do the header related things already (along with compressing your code of course).

    Reminds of the time when I was trying to make the smallest PCE emu. I made it in 16 KB :P .
     
  4. Bibin

    Bibin

    DON'T LET THE SUN LAUGH AT YOU. Member
    881
    0
    0
    New York City
    Ghost in the Machine
    Binary please, this interests me.
     
  5. Uberham

    Uberham

    King Of Oblivion Member
    Reminds me of the "10 line" games in the old Acorn magazines.

    some quality stuff in there.
     
  6. Sik

    Sik

    Sik is pronounced as "seek", not as "sick". Tech Member
    6,718
    10
    0
    being an asshole =P
    I wonder if somebody noticed it's making Windows import a DLL from some random Internet address =P
     
  7. FraGag

    FraGag

    Tech Member
    Ha, I found that a while ago, and
    yes, I noticed that, since I read the page :( . I didn't know it was possible until I saw that :P .
     
  8. Shibunoa

    Shibunoa

    Banned
    329
    0
    0
    Italy
    No news assembly can make much smaller programs than high-level languages, which are just as powerful, if not even more.
     
  9. AamirM

    AamirM

    Tech Member
    I don't have that binary anymore and my PCE emu has grown massively in size.

    But I guess trying one more time doesn't hurt so I will give it a shot once more. It will be fun anyway :( .

    EDIT:
    After some trying and removing a lot of things from the emu, I got down to 50 KB. And I haven't used any of the trick mentioned in the doc posted by Sik yet. I'll try those later since I am getting bored now :P .