EnableCompressionInSingleFile or EnableCompression under Linux? #126970
-
|
Hello everyone, I would like to know how do I understand which correct high compression like mkbundle with -z under mono project has already compressed with assemblies OK and Rip! Now we use modern Dotnet 10/11 how do I understand if I know whole csproj arguments like But I am still not understanding. <Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<ProjectReference Include="..\..\..\DeafMan1983.Interop.CRuntime\DeafMan1983.Interop.CRuntime.csproj" />
<DirectPInvoke Include="c" />
<LinkerArg Include="-lc -ldl" />
<DirectPInvoke Include="c_helper" />
<LinkerArg Include="-L. -lc_helper" />
<LinkerArg Include="-flto -Wl,--gc-sections" />
</ItemGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PublishAot>true</PublishAot>
<InvariantGlobalization>true</InvariantGlobalization>
<StaticExecutable>true</StaticExecutable>
<LinkerFlavor>lld</LinkerFlavor>
<GCSections>true</GCSections>
<StripSymbols>true</StripSymbols>
<DebugSymbols>false</DebugSymbols>
<DebugType>none</DebugType>
<OptimizationPreference>size</OptimizationPreference>
<DisableReflection>true</DisableReflection>
<UseSystemResourceKey>true</UseSystemResourceKey>
<PublishTrimmed>true</PublishTrimmed>
<TrimMode>link</TrimMode>
<IlcGenerateStackTraceData>false</IlcGenerateStackTraceData>
<IlcOptimizationPreference>Size</IlcOptimizationPreference>
<IlcDisableReflection>true</IlcDisableReflection>
</PropertyGroup>
</Project>normal size 1.9 ls -lh 00_helloworld
-rwxrwxr-x 1 deafman1983 deafman1983 1.9M Apr 15 23:32 00_helloworldHow do I compress smaller than 1.9Mb but I don't want to use upx from PublishAotCompressed because it is unusable. That is why I want to know how do I get zlib or lzma for EnableCompressionWithLzma or EnableCompressionWith7z etc.... Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
We don't have switches to compress PublishAot outputs. EnableCompressionInSingleFile only works for PublishSingleFile where it compresses the assemblies that are embedded in the single file bundle (PublishSingleFile basically just glues all the assemblies together and puts them inside an executable). PublishAot is an AOT compiled executable same as what one gets for C++ or Rust and neither of those offer built-in compression of code either. We have no plans for this. |
Beta Was this translation helpful? Give feedback.
We don't have switches to compress PublishAot outputs. EnableCompressionInSingleFile only works for PublishSingleFile where it compresses the assemblies that are embedded in the single file bundle (PublishSingleFile basically just glues all the assemblies together and puts them inside an executable).
PublishAot is an AOT compiled executable same as what one gets for C++ or Rust and neither of those offer built-in compression of code either. We have no plans for this.