Encode buffers until rewrite