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).
23 lines
731 B
Makefile
23 lines
731 B
Makefile
thisdir = class/System.IO.Compression
|
|
SUBDIRS =
|
|
include ../../build/rules.make
|
|
|
|
LIBRARY = System.IO.Compression.dll
|
|
LIB_REFS = System
|
|
KEYFILE = ../ecma.pub
|
|
LIB_MCS_FLAGS = -unsafe
|
|
TEST_RESOURCE_FILES = Test/resources/archive.zip Test/resources/test.nupkg
|
|
TEST_MCS_FLAGS = $(foreach r, $(TEST_RESOURCE_FILES), -resource:$(r),$(r))
|
|
TEST_LIB_REFS = System System.Core
|
|
LIBRARY_WARN_AS_ERROR = yes
|
|
|
|
XTEST_LIB_REFS = System System.Core Facades/System.Threading.Tasks
|
|
|
|
RESX_RESOURCE_STRING = \
|
|
../../../external/corefx/src/System.IO.Compression/src/Resources/Strings.resx \
|
|
../../../external/corefx/src/System.IO.Compression.Brotli/src/Resources/Strings.resx
|
|
|
|
EXTRA_DISTFILES = $(TEST_RESOURCE_FILES)
|
|
|
|
include ../../build/library.make
|