EncodingPartsForBitLen creates a word backing array and the "last bits used" value given the given total number of bits.
(bitLen uint)
| 293 | // EncodingPartsForBitLen creates a word backing array and the |
| 294 | // "last bits used" value given the given total number of bits. |
| 295 | func EncodingPartsForBitLen(bitLen uint) ([]uint64, uint64) { |
| 296 | if bitLen == 0 { |
| 297 | return nil, 0 |
| 298 | } |
| 299 | numWords, lastBitsUsed := SizesForBitLen(bitLen) |
| 300 | words := make([]word, numWords) |
| 301 | return words, lastBitsUsed |
| 302 | } |
| 303 | |
| 304 | // SizesForBitLen computes the number of words and last bits used for |
| 305 | // the requested bit array size. |
no test coverage detected
searching dependent graphs…