Add bitwritting manipulating functionality.

It was added some bit-by-bit I/O manipulation, primarily to be used on writting
bits into a file.