Skip to content

Clean up the ByteBuffer utility methods

Compare
Choose a tag to compare
@VaporBot VaporBot released this 19 Sep 14:31
· 19 commits to main since this release
5b0f377
This patch was authored and released by @gwynne.
  • Replace the readNullTerminatedString() implementation with the much more efficient version used by PostgresNIO.
  • Made writeNullTerminatedString(), writeLengthEncodedInteger(), and writeLengthEncodedSlice() return the number of bytes written, to match ByteBuffer method conventions.
  • Simplified [read|write]LengthEncodedInteger(), might be slightly faster but probably not enough to notice.
  • Remove a couple of unused utility methods altogether.