mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 17:10:20 -10:00
Resolves https://github.com/mono/mono/issues/11431 I put the native impl to Mono.Native, but probably it should be in a separate lib (`libmono-native.0.dylib` before: **81kb**, after: **898kb**) if Linker is not able to trim it if it's not used. Compiles and works on Windows (however, we don't build Mono.Native for Windows, but we can borrow `clrcompression.dll` from .net core) and macOS but requires changes in mono/corefx, I disabled xunit tests as those need 50mb of test data. PS: Brotli could be fully managed 😢 https://github.com/dotnet/corefxlab/issues/1673 C# ports: - https://github.com/master131/BrotliSharpLib A quick benchmark (Compressing a 5mb file with max compression level=11) Mono JIT: 25sec Mono LLVM-AOT: 7.8sec .NET Core 2.2: 6.8sec .NET Core 3.0: 5.8sec .NET Core's BrotliStream (with native lib): 3.5sec - https://github.com/google/brotli/tree/master/csharp - official C# port. Based on Java sources, slow, outdated (2 years ago).
12 lines
369 B
C#
12 lines
369 B
C#
// Licensed to the .NET Foundation under one or more agreements.
|
|
// The .NET Foundation licenses this file to you under the MIT license.
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
internal static partial class Interop
|
|
{
|
|
internal static partial class Libraries
|
|
{
|
|
internal const string CompressionNative = "System.Native";
|
|
}
|
|
}
|