Files
Egor Bogatov 2f6104f163 [System.IO.Compression] Brotli from CoreFX (#12189)
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).
2019-02-06 00:25:19 +01:00

119 KiB