Can you add support for the << and >> operators? Perhaps look at https://bitbucket.org/quiark/bitarray/src/473cb720d09d/bitarray/_bitarray.c for a reference. Thanks.