* Converts a bit length to the number of bytes needed to contain it. * Non-byte lengths are rounded up to the next byte. * @param {number} length * @returns {number}
(length)
| 557 | * @returns {number} |
| 558 | */ |
| 559 | function numBitsToBytes(length) { |
| 560 | return MathFloor(length / 8) + MathFloor((7 + (length % 8)) / 8); |
| 561 | } |
| 562 | |
| 563 | /** |
| 564 | * Copies `bytes` up to the byte length needed for `length` bits, then clears |
no outgoing calls
no test coverage detected
searching dependent graphs…