Skip to content

Commit

Permalink
Merge branch 'fireflies-xlt-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
spencergibb committed Nov 29, 2021
2 parents f0a13f1 + 2f51705 commit fdfb81b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ static void encodeByteString(ByteBuf byteBuf, String s) {

static String decodeByteString(ByteBuf byteBuf, int offset) {
int length = byteBuf.getByte(offset);
length &= UNSIGNED_BYTE_MAX_VALUE;
offset += Byte.BYTES;

return byteBuf.toString(offset, length, StandardCharsets.UTF_8);
}

static int decodeByteStringLength(ByteBuf byteBuf, int offset) {
int length = byteBuf.getByte(offset);
length &= UNSIGNED_BYTE_MAX_VALUE;
return Byte.BYTES + length;
}

Expand Down

0 comments on commit fdfb81b

Please sign in to comment.