-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compression support for single-file publish #44569
Comments
Tagging subscribers to this area: @agocke, @vitek-karas Issue meta data
|
we need this function. |
This has been implemented as an optional switch for .NET 6. |
As mentioned in the original single-file issue and in bottom of the single-file design doc, compression is something that is worth taking a look at.
A lot of applications would benefit from smaller executables. Not only is the user experience better as a smaller file means smaller download time, but it also benefits the data transfer costs.
Trimming has helped a lot, and the new .NET 5.0 single-file publish is a great improvement on what we had in .NET Core 3.1. However, a simple Hello World application is still 19 MB as a single-file executable. If I compress it with 7Z LZMA it is 6 MB.
A first step could be to implement deflate compression in the GenerateBundle Msbuild step, and then have the host decompress it in a streaming fashion from the bundle directly. This would incur a small overhead in startup time, so maybe it should have a switch - something like
/p:SingleFileCompression=true
.It would be nice to have the compression algorithm pluggable, so if we ever get to have LZMA (see #1542), we can get even better compression ratio.
The text was updated successfully, but these errors were encountered: