WIP: lib: bitstream

No idea why it's not working tbh. I'll need to take a
more serious look.

Signed-off-by: Levente Kurusa <levex@linux.com>