Swap bytesUsed value, preventing prematurely truncated buffers.