Requires that the buffer be a GrowableBuffer or AppendableStream
The value to assert is an AppendableBuffer
Determines whether the input is a Type with the same class
A value, usually a Type instance
whether this
and otherType
are instances of the same Type class
Appends value bytes to an AppendableBuffer according to the type
Example:
//Takes 4 bytes
type.writeValue(buffer, 2113664) //or '2113664'
The buffer to which to append
The value to write
Generated using TypeDoc
A type storing any unsigned integer that can be represented precisely in a double (from
0
to9007199254740991
(2 ** 53 - 1
)). Rather than having a fixed-length value representation, more bytes are needed to represent larger values. This is inspired by the UTF-8 format: large values can be stored, but since most values are small, fewer bytes are used in the typical case. If values are uniformly distributed rather than concentrated among smaller values, you will likely get more efficient serializations from a fixed-width integer. For example, when writing outputs of a 32-bit hash function, you should use UnsignedIntType instead.The number of bytes required for numbers are as follows:
Example: