src, lib: revert to v0.10 buffer implementation