Skip to content
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

Add Brotli compression to existing System.IO.Compression assembly #11431

Closed
marek-safar opened this issue Oct 29, 2018 · 0 comments
Labels

Comments

@marek-safar
Copy link
Member

@marek-safar marek-safar commented Oct 29, 2018

Port managed and unmanaged code for Brotli compression types BrotliDecoder, BrotliEncoder, BrotliStream from CoreFX. The code lives under src/System.IO.Compression.Brotli and src/Native/AnyOS/brotli in CoreFX repo. The goal is to use tests from the repo as well.

Checklist

  • Pass all tests on desktop
  • Pass all tests on XA
  • Pass all tests on XI
  • Update netstandard reference
@marek-safar marek-safar added the task label Oct 29, 2018
@marek-safar marek-safar added this to Backlog in Short Term Projects via automation Oct 29, 2018
@marek-safar marek-safar referenced this issue Oct 29, 2018
11 of 12 tasks complete
Short Term Projects automation moved this from Backlog to Completed Tasks in this Sprint Feb 5, 2019
marek-safar added a commit that referenced this issue Feb 5, 2019
Resolves #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 😢 dotnet/corefxlab#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).
@marek-safar marek-safar moved this from Completed Tasks in this Sprint to Done in Short Term Projects Feb 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
1 participant
You can’t perform that action at this time.