在发布版本上使用 UPX(可执行压缩器)?
我想知道在发行版上使用 UPX (或与此相关的任何其他可执行压缩器)是否正常/可接受为一个项目构建。
例如,我有一个可执行文件,发货时通常为 1.7MB,但打包后为 426KB。我并不关心 1.2MB 的存储空间,但在下载时和一般情况下 426KB 看起来更好。
另外,我听说(未经测试)某些程序在压缩时启动时性能更好,因为从硬盘读取比解压缩更昂贵。
那么是否建议在发布版本上压缩可执行文件?
I was wondering if it's normal/acceptable to use UPX (or any other executable compressor for that matter) on a release build for a project.
For example, I have this executable which normally is 1.7MB when shipped, but when packed it's 426KB. Not that I care about 1.2MB of storage, but 426KB looks much nicer when downloading and in general.
Also, I have heard - not tested - that some programs perform better on startup when compressed because reading from the harddisk is more expensive than decompressing.
So is it recommended to compress your executables on a release build?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有时情况恰恰相反,因为程序只需要按需加载代码页。但它不能这样做,因为 exe 被压缩了。
如果您的可执行文件有多个实例正在运行,那么内存将在每个实例之间共享。但如果你压缩它们,情况就不再是这样了。
至于下载,当然下载的是压缩后的安装包。
简而言之,我真的不认为可执行压缩器值得。
Sometimes the opposite is true because the program only needs to load code pages on demand. But it can't do this is the exe is compressed.
If you have multiple instances of your executable running, then the memory will be shared between each instance. But if you compress them this is no longer the case.
As for downloading, surely what is downloaded is an install package which is compressed.
In short, I really don't think executable compressors are worthwhile.