Initial version of bit stream buffer implementation