0

Write a function that when given a buffer b and a number of bits n, splits the buffer into chunks of n bits. Right-pad the last chunk with 0s up to n bits.
e.g.
Given the buffer (each char = 1 byte),
f0oBaR
And n = 5, return
[12, 24, 24, 6, 30, 16, 19, 1, 10, 8]
This is because the above ...