More buffer utils

GWT untested. Will add more soon(ish).