buffer encoders and decorders

Adding all methods of buffers