在发布版本上使用 UPX(可执行压缩器)?

发布于 2024-12-04 17:42:01 字数 284 浏览 1 评论 0原文

我想知道在发行版上使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

a√萤火虫的光℡ 2024-12-11 17:42:01

我听说(未经测试)某些程序在压缩时启动时性能更好,因为从硬盘读取比解压缩更昂贵。

有时情况恰恰相反,因为程序只需要按需加载代码页。但它不能这样做,因为 exe 被压缩了。

如果您的可执行文件有多个实例正在运行,那么内存将在每个实例之间共享。但如果你压缩它们,情况就不再是这样了。

至于下载,当然下载的是压缩后的安装包。

简而言之,我真的不认为可执行压缩器值得。

I have heard - not tested - that some programs perform better on startup when compressed because reading from the harddisk is more expensive than decompressing.

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文