GstBitWriter provides a bit writer that can write any number of bits into a memory buffer. It provides functions for writing any number of bits into 8, 16, 32 and 64 bit variables. https://bugzilla.gnome.org/show_bug.cgi?id=707543