WireBytes

annotation class WireBytes(val value: Int)

Overrides the wire width of a numeric field. The value specifies the number of bytes on the wire (1-8). Must not exceed the Kotlin type's natural size. Cannot be used on Float, Double, or Boolean.

@ProtocolMessage
data class CompactHeader(
@WireBytes(3) val length: Int, // 3 bytes on the wire, decoded into Int
@WireBytes(6) val offset: Long, // 6 bytes on the wire, decoded into Long
)

Parameters

value

Number of bytes on the wire (1-8).

Properties

Link copied to clipboard
val value: Int