add bitbuffer read function