Announcement

Collapse
No announcement yet.

EXE compression tool

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    EXE compression tool

    PowerBasic can produce some very small executables but if you really want to impress you should try PECompact, a Windows Executable compressor, that will shrink your applications and DLLs down to very small sizes.

    I've been using this, remarkable inexpensive, tool for a while now and am very happy with what it can achieve, providing a GUI for interactive use and a command line for automation. The best bit is that your users are none the wiser and just see a very small exe or DLL that loads quickly.

    I've also tried this on large Delphi applications around 8 megabytes in size which shrinks them down to less than 2 megabytes with no loss of functionality.

    Real-Time CPU Optimization and Automation. Keep your PC responsive during high CPU loads and automate process settings with rules. Apps run YOUR WAY!

    #2
    Just be aware that compressed executables can trigger false positives with some anti-virus software. Their "heuristic" virus detection sees a packed executable and flags it as potentially hostile, without even attempting to unpack it and scan the decompressed image.

    Compress your EXE and then upload it to http://www.virustotal.com/ and they'll scan it through about 20 or so AV engines and give you the results.
    Mike Stefanik
    sockettools.com

    Comment


      #3
      >I've also tried this on large Delphi applications around 8 megabytes

      Pray what makes these applications so large? Does Delphi always include ALL its runtime libary even if not used? Or the phone books for every city east of the Mississippi River?

      The entire PPPS is only abut 3.5 Mb uncompressed, and that includes three Exes, three DLLs, artwork, an empty database and the help files. http://www.providerpaymentpartner.com

      Am I just 'spoiled' by the compact executables the PB compilers produce?


      MCM
      Michael Mattias
      Tal Systems (retired)
      Port Washington WI USA
      [email protected]
      http://www.talsystems.com

      Comment


        #4
        Originally posted by Michael Mattias View Post
        Pray what makes these applications so large? Does Delphi always include ALL its runtime libary even if not used?
        No. You can actually make very small Delphi apps. You can also do them "SDK style" (to speak in PB terms).

        Bye!
        -- The universe tends toward maximum irony. Don't push it.

        File Extension Seeker - Metasearch engine for file extensions / file types
        Online TrID file identifier | TrIDLib - Identify thousands of file formats

        Comment


          #5
          Originally posted by Marco Pontello View Post
          No. You can actually make very small Delphi apps. You can also do them "SDK style" (to speak in PB terms).

          Bye!
          While it's 'possible' to make small Delphi apps it doesn't come out of the box without a fair amount of work and few use 'SDK style'.

          PowerBasic scores on all fronts.

          I've never had a false positive yet from a virus checker, but then I've only compressed 50 applications so far.

          Comment


            #6
            Originally posted by Graham McPhee View Post
            While it's 'possible' to make small Delphi apps it doesn't come out of the box without a fair amount of work and few use 'SDK style'.
            Probably. But to get to 8MB I think one need to include *a lot of things*, and maybe some BMPs, right?
            A basic GUI app may get about 250KB for the VCL.

            Bye!
            Last edited by Marco Pontello; 23 Jun 2008, 06:40 PM.
            -- The universe tends toward maximum irony. Don't push it.

            File Extension Seeker - Metasearch engine for file extensions / file types
            Online TrID file identifier | TrIDLib - Identify thousands of file formats

            Comment


              #7
              Originally posted by Marco Pontello View Post
              Probably. But to get to 8MB I think one need to include *a lot of things*, and maybe some BMPs, right?
              A basic GUI app may get about 250KB for the VCL.

              Bye!
              Yes this particular application does include 'a lot of things' as you put it, but that's not the point. The point of the discussion was that PECompact is a very efficient Exe compressor both for small PowerBasic applications and large applications written in any language.

              Comment


                #8
                There are a lot of executable compressors out there but as far as compressing your commercial programs goes it's pretty hard to go past PECompact like the OP said. Its compression is actually better than that of UPX, yet offers a hell of a lot more options/flexibility than UPX does. It also has an SDK for developing your own plugins for it (UPX doesn't), but nobody has ported that to PB yet ...
                -

                Comment


                  #9
                  Along the lines of the virus scanners mentioned. I've also found that when I have applications that are installed and use some type of compact or protection scheme opening the folder is slower and even the start menu that contains shortcuts to those apps in some cases when the AV scanner tries to read the files. It seems to slow down everything using/accessing them. I see this a lot in Nod32 even when turning off the options for scanning them. That and any app that reads a lot of files for icon information and such like a firewall log does seems to slow things down and even more with compressed apps.

                  Could be a way of making the user not want your app due to slowdowns.
                  sigpic
                  Mobile Solutions
                  Sys Analyst and Development

                  Comment


                    #10
                    Originally posted by Roger Garstang View Post
                    That and any app that reads a lot of files for icon information and such like a firewall log does seems to slow things down and even more with compressed apps.
                    With PECompact, you can tell it to not compress specific types of resources. For example, you can specify that you want to compress any bitmaps, cursors, fonts and strings but that you don't want to compress any icons, manifests, version info or type libraries. That way when a program tries to read the version resource or extract an icon, they're able to get it. Of course, you could tell it to not compress any resources, or just string resources. So there's a lot of flexibility there.

                    I would think a smart AV scanner would take the hit once, but presumably they'd store an MD5 or SHA1 hash of the PE image and wouldn't scan it again (unless told to) if it's already been declared clean and hasn't changed. But then again, I'm not an expert by any stretch, so perhaps they do go through the exercise of unpacking the executable each and every time.
                    Mike Stefanik
                    sockettools.com

                    Comment


                      #11
                      Originally posted by Mike Stefanik View Post
                      With PECompact, you can tell it to not compress specific types of resources. For example, you can specify that you want to compress any bitmaps, cursors, fonts and strings but that you don't want to compress any icons, manifests, version info or type libraries. That way when a program tries to read the version resource or extract an icon, they're able to get it. Of course, you could tell it to not compress any resources, or just string resources. So there's a lot of flexibility there.
                      Mike,
                      I use PECompact and I can see the version info of my exe's in Explorer just fine. I use default settings.

                      James

                      Comment


                        #12
                        I think the default is to not compress version info, manifests and type libraries (maybe a few other things as well). I believe it does compress icons by default. But my point was simply that it's something that's under the programmer's control when they pack the executable.
                        Mike Stefanik
                        sockettools.com

                        Comment


                          #13
                          You can see in the bottom right hand corner how you can specify which resources you do and don't want compressed, giving you total flexibility over them:


                          The resource types are: shellicons, cursor, bitmap, icon, menu, dialog, string, fontdir, font, accelerator, rcdata, messagetable, groupcursor, groupicon, version, dlginclude, plugplay, vxd, animcursor, animicon, html, manifest, typelib, registry
                          Attached Files
                          -

                          Comment


                            #14
                            Interesting, I'm going to have to try that out. I think most of mine are more of a protection scheme like Armadillo, etc that give the AV issues. I think Nod32 has some kind of sandbox it unpacks them to and tests them like they are running to scan them. I have the check turned off, but it still seems to do something.
                            sigpic
                            Mobile Solutions
                            Sys Analyst and Development

                            Comment

                            Working...
                            X
                            😀
                            🥰
                            🤢
                            😎
                            😡
                            👍
                            👎