Port BitBuffers to transitional syntax.

Should return int.