If you don't use `ensure(int)` from `unpackString`, maximum necessary length of this buffer is 8 bytes. You can pre-allocate this buffer to `extraBuffer` field.

My suggestion is to pre-allocate 8-byte extraBuffer and string decoding buffer separatelly. String decoding buffer will be StringBuilder (full string builder) + CharBuffer (temp buffer) + CharsetDecoder (fills CharBuffer and append it to StringBuffer).