Type of encoded data
Type of encoded data
Append result of $writer to this Writer
Length of encoded data
Length of encoded data
Creates new instance of this Writer
Creates new instance of this Writer
new instance of Writer
Encode signed byte
Encode signed byte
byte value to encode
Encode an array of boolean values as a bit array
Encode boolean
Encode boolean
boolean value to encode
Encode an array of bytes
Encode an array of bytes
value to encode
Encode chunk
Encode chunk
to put into this Writer
Encode signed Int using VLQ with ZigZag.
Encode signed Int using VLQ with ZigZag. Both negative and positive values are supported, but due to ZigZag encoding positive values is done less efficiently than by putUInt. Use putUInt to encode values that are positive.
signed Int
Have to be decoded only with VLQReader.getInt The resulting varint uses ZigZag encoding, which is much more efficient at encoding negative values than pure VLQ.
Encode signed Long using VLQ with ZigZag.
Encode signed Long using VLQ with ZigZag. Both negative and positive values are supported, but due to ZigZag encoding positive values is done less efficiently than by putULong. Use putULong to encode values that are positive.
prefer signed Long
Have to be decoded only with VLQReader.getLong The resulting varint uses ZigZag encoding, which is much more efficient at encoding negative values than pure VLQ.
Encode optional value
Encode signed Short using ZigZag and then VLQ.
Encode signed Short using ZigZag and then VLQ. Both negative and positive values are supported, but due to ZigZag encoding positive values is done less efficiently than by putUShort. Use putUShort to encode values that are always positive.
signed Short
Have to be decoded only with VLQReader.getShort The resulting varint uses ZigZag encoding, which is much more efficient at encoding negative values than pure VLQ.
Encode String is shorter than 256 bytes
Encode integer as an unsigned byte asserting the range check
Encode integer as an unsigned byte asserting the range check
integer value to encode
AssertionError
if x is outside of the unsigned byte range
Encode unsigned Int value using VLQ.
Encode signed Long value using VLQ.
Encode signed Long value using VLQ. Both negative and positive values are supported, but only positive values are encoded efficiently, negative values are taking a toll and use six bytes. Use putLong to encode negative and positive values.
prefer unsigned Long (signed value will produce a significant overhead, see note above)
Don't use it for negative values, the resulting varint is always ten bytes long – it is, effectively, treated like a very large unsigned integer. If you use putLong, the resulting varint uses ZigZag encoding, which is much more efficient.
Encode unsigned Short value using VLQ.
Encode unsigned Short value using VLQ. Only positive values are supported, Use putShort to encode negative and positive values.
unsigned Short in a range 0 <= x <= 0xFFFF represented as Int
Returns encoded result
Returns encoded result
encoded result
Not thread safe