oleg-st / ZstdSharp

Port of zstd compression library to c#
MIT License
225 stars 31 forks source link

Version 0.8.2 breaks android support #45

Open MaxwellDAssistek opened 4 hours ago

MaxwellDAssistek commented 4 hours ago

Hello,

After I updated from 0.8.1 to 0.8.2, I started getting the following exception when trying to use the CompressionStream class:

System.TypeInitializationException: The type initializer for 'ZstdSharp.Unsafe.Methods' threw an exception.
 ---> System.PlatformNotSupportedException: Operation is not supported on this platform.
   at System.Runtime.CompilerServices.RuntimeHelpers.AllocateTypeAssociatedMemory(Type type, Int32 size)
   at ZstdSharp.Unsafe.Methods..cctor()
   --- End of inner exception stack trace ---
   at ZstdSharp.SafeCctxHandle.Create()
   at ZstdSharp.Compressor..ctor(Int32 level)
   at ZstdSharp.CompressionStream..ctor(Stream stream, Int32 level, Int32 bufferSize, Boolean leaveOpen)
oleg-st commented 3 hours ago

@teo-tsirpanis Do you know the right way to handle it?