EncodingPartsForBitLen creates a word backing array and the "last bits used" value given the given total number of bits.
(bitLen uint)
| 313 | // EncodingPartsForBitLen creates a word backing array and the |
| 314 | // "last bits used" value given the given total number of bits. |
| 315 | func EncodingPartsForBitLen(bitLen uint) ([]uint64, uint64) { |
| 316 | if bitLen == 0 { |
| 317 | return nil, 0 |
| 318 | } |
| 319 | numWords, lastBitsUsed := SizesForBitLen(bitLen) |
| 320 | words := make([]word, numWords) |
| 321 | return words, lastBitsUsed |
| 322 | } |
| 323 | |
| 324 | // SizesForBitLen computes the number of words and last bits used for |
| 325 | // the requested bit array size. |
no test coverage detected