Write the buffer directly to the writer instead of its bytes
PacketCodecVarIntLength: Inline bytes.NewBuffer instead of a new variable