We don't do buffer compacting. You can call refillBuffer, but it's a no-op if there is still data in the buffer. You have consume all the data before you can get more.

I like the compaction policy for a more general-purpose buffered reader abstraction, but in this case it's a private implementation class and the wire encoding never requires us to materialize an arbitrary amount of data at one time, so I think we can keep it simple.