New implementation for C#.
A new implementation based on spans was created for both encoding and decoding to support various scenarios beyond the standard .NET array. This allows for the use of various sources, such as arrays, ArrayPools, and natively or externally allocated memory. For both the Encode and Decode functions, pre-allocated buffers can be provided to avoid allocation. If buffers were not provided, an uninitialized array will be allocated by the GC, which will then be filled by the LercAPI. Due to design limitations in .NET's Span, the largest buffer size is either int.MaxValue or 2147483591 (the maximum length of an array). While pinned or aligned buffers are certainly welcome, it is important to note that they are not strictly necessary.
Encoding were implemented as generics, decoding as Span
If I've done something wrong, feel free to let me know!
@halmaia Thank you for this contribution! I haven't done anything in C# for years, so I can't give you any ratings on it. Let's see what others say. I hope you are ready and willing to maintain your C# code in case there are bugs or any other issues.