Like Tree1Likes
  • 1 Post By itsme86

Smaller File Size?

This is a discussion on Smaller File Size? within the C Programming forums, part of the General Programming Boards category; I want to make this program as small as possible. I've seen programs do far more then what mine does ...

  1. #1
    err: undefined :(
    Join Date
    Mar 2005
    Posts
    17

    Smile Smaller File Size?

    I want to make this program as small as possible. I've seen programs do far more then what mine does and at far smaller filesize.

    This compiles to about 420kb

    What can I do to this program to make its file size far smaller? I tried to write this code to keep it as short as I can, I get the feeling more can be done, I just don't know what. Any help and/or recommendations would be nice.

    Source: http://www.simpleindesign.com/_encryption.cpp

    This compiles and works well for me, I hope it does for everyone else.
    (yeah I know, it's encryption only... for now!)



    Thanks.
    Last edited by exoeight; 03-31-2005 at 11:22 AM.

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,755
    1. Compile in release mode, rather than debug mode.
    2. Use shared libraries rather than static libraries.
    3. Use an exe "packer" like http://upx.sourceforge.net/
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    err: undefined :(
    Join Date
    Mar 2005
    Posts
    17
    UPX is pretty cool, thanks.

    420Kb -> 268Kb
    Last edited by exoeight; 03-31-2005 at 11:45 AM.

  4. #4
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,171
    You could write it in C instead of C++

    *points to board name*
    inu11byte likes this.
    If you understand what you're doing, you're not learning anything.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. To find the memory leaks without using any tools
    By asadullah in forum C Programming
    Replies: 2
    Last Post: 05-12-2008, 08:54 AM
  2. Need Help Fixing My C Program. Deals with File I/O
    By Matus in forum C Programming
    Replies: 7
    Last Post: 04-29-2008, 08:51 PM
  3. Can we have vector of vector?
    By ketu1 in forum C++ Programming
    Replies: 24
    Last Post: 01-03-2008, 05:02 AM
  4. help with text input
    By Alphawaves in forum C Programming
    Replies: 8
    Last Post: 04-08-2007, 05:54 PM
  5. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 02:53 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21