639bd30321
The new implementation use the mirroring method to distinguish full buffer and the empty buffer. It also support buffers of arbitrary size.