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