buffer encoders and decorders