revise the zero-buffer encoding