Hi,
I think there has been allready some talk about some (understandable) problems when using exe compressors on togo .exe . I am thinking maybe D6 could include its own compression of image for togo? I guess even rudimentary compression could significantly reduce size of togo applications. It could be optional, since it would be adding some time to startup, but I guess some classes of apps like littly utilities distributed by downloads could benefit from it. rush -- http://www.templatetamer.com/ |
rush wrote:
> I think there has been allready some talk about some (understandable) > problems when using exe compressors on togo .exe . I am thinking maybe D6 > could include its own compression of image for togo? As far as I can tell, a ToGo .exe consists of a stub executable loader followed by a gzip-compressed image file. I.e. it's already pretty well compressed, only the stub is uncompressed. (I wonder if it'd be possible to use a .exe compressor on the stub /before/ deploying...) E.g. one of my most trivial apps includes a large word list, I took a bit of care to ensure that the word list was stored in consecutive memory locations in the image before image stripping / deployment so as to allow most effective compression. The result is that the deployed .exe is smaller than the word list that is embedded in it... -- chris |
Chris,
> As far as I can tell, a ToGo .exe consists of a stub executable > loader followed by a gzip-compressed image file. > > I.e. it's already pretty well compressed, only the stub is > uncompressed. (I wonder if it'd be possible to use a .exe compressor > on the stub before deploying...) > > E.g. one of my most trivial apps includes a large word list, I took a > bit of care to ensure that the word list was stored in consecutive > memory locations in the image before image stripping / deployment so > as to allow most effective compression. The result is that the > deployed .exe is smaller than the word list that is embedded in it... Damn. It seems we've been "outed". Best regards, Andy Bower Dolphin Support www.object-arts.com |
In reply to this post by Chris Uppal-3
"Chris Uppal" <[hidden email]> wrote in message
news:[hidden email]... > As far as I can tell, a ToGo .exe consists of a stub executable loader followed > by a gzip-compressed image file. > > I.e. it's already pretty well compressed, only the stub is uncompressed. (I > wonder if it'd be possible to use a .exe compressor on the stub /before/ > deploying...) shame on me :) rush -- http://www.templatetamer.com/ |
In reply to this post by rush
"rush" <[hidden email]> wrote in message news:<cdbmbc$sjp$[hidden email]>...
> Hi, > > I think there has been allready some talk about some (understandable) > problems when using exe compressors on togo .exe . I am thinking maybe D6 What kind of problems are you referring to? I did used CExe (http://www.eskimo.com/~scottlu/win/) successfully for a simple ToGo application before. -- Regards Hwee Boon MotionObj |
Yar Hwee Boon wrote:
> > I think there has been allready some talk about some (understandable) > > problems when using exe compressors on togo .exe . I am thinking maybe > > D6 > > What kind of problems are you referring to? I did used CExe > (http://www.eskimo.com/~scottlu/win/) successfully for a simple ToGo > application before. I didn't think this was possible (because a ToGo .exe apparently has some sort of checksum in it), so I downloaded CExe. And, of course, you are right -- it does work. Looking harder, it seems to use a slightly different scheme from most .exe compressors. It creates a .exe that consists of a stub that does decompression followed by the compressed data, just like any other, but the stub uses an unusually simple method to do the decompression. It just decompresses the data to a temporary file in the same directory (thus reconstituting the exact original .exe), and exec()s it. I haven't checked the source yet (I will because he seems to have a solution to a problem that has been bugging me -- how to manipulate image resources in a .exe), but I'm pretty sure that's what's going on. -- chris |
In reply to this post by Chris Uppal-3
"Chris Uppal" <[hidden email]> wrote in message
news:[hidden email]... > rush wrote: > >> I think there has been allready some talk about some (understandable) >> problems when using exe compressors on togo .exe . I am thinking maybe D6 >> could include its own compression of image for togo? > > As far as I can tell, a ToGo .exe consists of a stub executable loader > followed > by a gzip-compressed image file. > > I.e. it's already pretty well compressed, only the stub is uncompressed. > (I > wonder if it'd be possible to use a .exe compressor on the stub /before/ > deploying...) > In D6 the image is stored as a resource, and this allows any PE tool (exe compressors, resource editors, what have you) to be used. I tried an exe compressor on it (can't remember the name, the GNU one I think) and it did work, however it doesn't have that much effect because as you have noticed, the image section of the .exe is already compressed. Also you have to compress the .exe after deployment, since the compressed stub is not valid for resource updating through the Win32 APIs. Regards Blair |
Free forum by Nabble | Edit this page |