Set the endianness of an entire type definition
Use the @BigEndian
decorator on top of a class
declaration to change the endianness of all its properties.
In the following example, the Protocol
type definition that
include two unsigned 32bits integer: foo
and bar
, will use big-endian
byte order.
@BigEndian
class Protocol {
@Uint32
foo: number
@Uint32
bar: number
}
@BigEndian
decorator set the endianness of a decorated class or property to big endian.