CollapseLauncher / SharpHDiffPatch.Core

A port of original HDiffPatch by housisong, written in C# and .NET Standard 2.0 compatible
MIT License
31 stars 6 forks source link

Question: Is cross-platform or Windows-only? #5

Closed Leayal closed 3 months ago

Leayal commented 3 months ago

Is this library/package support cross-platform or it is Windows-only?

neon-nyan commented 3 months ago

Hi there, This library supposed to work on all platforms. You can use this on .NET 6/7/8 and older frameworks down to .NET Framework 4.6.2 or any runtimes that supports .NET Standard 2.0.

Also, if you're looking for the pre-compiled one, you can use one from NuGet here.

Note:

The Zstd decompressor for Non-Windows platform will use the C# Managed version of the code, which is a bit slower compared to Native/via Interop one. However, other decompressor like Deflate, LZMA2, BZip uses the C# Managed version of its library, so the performance will be likely the same across other platform.

Another additional note:

SSE2 (for x86-64) SIMD support is only available on .NET 6/7/8 and AdvSIMD (for Arm64) on .NET 7/8. Any other framework/runtime will use the software implementation version for adding vectorized data. https://github.com/CollapseLauncher/SharpHDiffPatch.Core/blob/d00cd30f27b68489efc562fe96d1dba1c8883c90/SharpHDiffPatch.Core/Patch/PatchCore.cs#L444-L530

Leayal commented 3 months ago

Thank you for the answer. I should have read the source code more carefully before asking the question and wasted your time.