invertedtomato / packing

Library for encoding integers in the minimal number of bits. Includes VLQ and Elias Omega encoding.
MIT License
76 stars 6 forks source link

BitOperation from achived repo #8

Open dzmitry-lahoda opened 5 years ago

dzmitry-lahoda commented 5 years ago

Please migrate to live package or source code

https://github.com/invertedtomato/buffers/blob/master/Library/IO/Bits/BitOperation.cs

May be reuse some from

https://github.com/dotnet/corefx/blob/release/3.0/src/Common/src/CoreLib/System/Numerics/BitOperations.cs

as internal copy paste

invertedtomato commented 5 years ago

I've removed the library dependency and tidied a few things at the same time.

Numeric.BitOperations isn't available in .NET Standard it seems. I'd love to re-implement their tweaks, but I'm low on time at the moment sadly.

dzmitry-lahoda commented 5 years ago

BitOperations is next .NET Standard. I just have copied these into my code for now as internal classes. As I am target lower versions. Convenience of using properly tested future API now.

invertedtomato commented 2 years ago

The situation is unchanged on this. BitOperations isn't supported in any .NET Standard that I can find.

Did you end up with your own implementation using Lzcnt.LeadingZeroCount() that works in .NET Standard? I haven't given any real time to this yet.

dzmitry-lahoda commented 2 years ago

i think standard is dead somewhat. MS merged mono/donet/aot into .NET 7 and that is kind of standard.

invertedtomato commented 2 years ago

It will be when .NET Framework finally dies itself. Until .NET Framework is gone I must keep support going sadly.