filecoin-project / go-bitfield

Other
4 stars 8 forks source link

Add a cut function to cut one bitfield out of another. #38

Closed Stebalien closed 4 years ago

Stebalien commented 4 years ago

This is useful when you need to remove a set of values from a bitfield, shifting the remaining elements down to compensate. Unlike most bitfield operations in this library, this function treats the bitfield as an actual bitfield.

See the method documentation for more information.

Motivation: I need this to "cut" removed/moved partitions out of deadline bitfields when compacting deadlines.