getsentry / getsentry/sentry-dotnet
Add support for Zstandard: dotnet/android tools/assembly-store-reader-mk2 @ 2e30614
- Dominant language
- C#
- Stars
- 770
- Forks
- 248
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 49
Description
## TLDR;
Microsoft are adding support for Zstd compression to Android Assembly Stores:
> Switches the per-assembly AssemblyStore compression from LZ4 (dotnet/lz4 + the K4os managed wrapper) to Zstandard, using the `ZSTD_*` entry points already exported by `libSystem.IO.Compression.Native` in the .NET runtime pack. This drops an external dependency and trades for a better compression ratio.
Eventually, this will be good news as we'll be able to drop this dependency:
https://github.com/getsentry/sentry-dotnet/blob/65363ca3f18c0c57dfc062a0e0833dc9eeb8efab/src/Sentry.Android.AssemblyReader/Sentry.Android.AssemblyReader.csproj#L8-L10
In the near term, we'll be able to conditionally drop/replace this for recent enough versions of .NET (likely .NET 11 or later). We'll need to do this before shipping the next major version of the Sentry SDK for .NET.
## First Change Detected
Headline: Switched to LZ4
The code at [`dotnet/android/tools/assembly-store-reader-mk2`](https://github.com/dotnet/android/tree/main/tools/assembly-store-reader-mk2) has a new commit since our last review.
| | |
|---|---|
| **Latest commit** | [`2e30614`](https://github.com/dotnet/android/commit/2e306140c4ef623476b0a2d6dad0a2d263d542a6) |
| **Path history** | [View history](https://github.com/dotnet/android/commits/main/tools/assembly-store-reader-mk2) |
| **Tracking Code** | `dotnet/android tools/assembly-store-reader-mk2 @ 2e30614` |
Our vendored copy lives in `src/Sentry.Android.AssemblyReader/`. We modified the upstream code significantly,
so a direct merge is unlikely to be appropriate — but the commit above may reveal logic
changes worth porting.
## Second Change Detected
Headline: re-use cached copies of decompressed files
The code at [`dotnet/android/tools/assembly-store-reader-mk2`](https://github.com/dotnet/android/tree/main/tools/assembly-store-reader-mk2) has a new commit since our last review.
| | |
|---|---|
| **Latest commit** | [`b367d98`](https://github.com/dotnet/android/commit/b367d98cde5e21f1c112ba507f8e0f09d3ed5b9c) |
| **Path history** | [View history](https://github.com/dotnet/android/commits/main/tools/assembly-store-reader-mk2) |
Our vendored copy lives in `src/Sentry.Android.AssemblyReader/`. We modified the upstream code significantly,
so a direct merge is unlikely to be appropriate — but the commit above may reveal logic
changes worth porting.
> _Automatically opened by the [Watch Upstream Changes](https://github.com/getsentry/sentry-dotnet/actions/runs/28775925164) workflow._
Contributor guide
Research direction
Start by comparing the upstream changes at dotnet/android/tools/assembly-store-reader-mk2, especially commits 2e30614 and b367d98, with the vendored code in src/Sentry.Android.AssemblyReader/. Trace the existing assembly-store compression and decompression entry points before deciding what logic can be ported. Done means the reader supports the upstream Zstandard behavior and the relevant decompressed-file reuse without breaking this repository's modifications.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- mobile-dev, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100