package
1.2.0
Repository: https://github.com/qitmeer/qng.git
Documentation: pkg.go.dev

# Functions

DeserializeUint64 deserializes bytes to uint64.
DeserializeVLQ deserializes the provided variable-length quantity according to the format described above.
PutVLQ serializes the provided number to a variable-length quantity according to the format described above and returns the number of bytes of the encoded value.
RandomUint64 returns a cryptographically random uint64 value.
ReadElements reads multiple items from r.
ReadVarBytes reads a variable length byte array.
ReadVarInt reads a variable length integer from r and returns it as a uint64.
ReadVarString reads a variable length string from r and returns it as a Go string.
SerializeSizeVLQ returns the number of bytes it would take to serialize the passed number as a variable-length quantity according to the format described above.
SerializeUint64 serializes a uint64.
VarIntSerializeSize returns the number of bytes it would take to serialize val as a variable length integer.
WriteElements writes multiple items to w.
WriteVarBytes serializes a variable length byte array to w as a varInt containing the number of bytes, followed by the bytes themselves.
WriteVarInt serializes val to w using a variable number of bytes depending on its value.
WriteVarString serializes str to w as a variable length integer containing the length of the string followed by the bytes that represent the string itself.

# Constants

currentCompressionVersion is the current script compression version of the database.
32MB.
MaxVarIntPayload is the maximum payload size for a variable length integer.

# Variables

binarySerializer provides a free list of buffers to use for serializing and deserializing primitive integer values to and from io.Readers and io.Writers.
maxUint32VLQSerializeSize is the maximum number of bytes a max uint32 takes to serialize as a VLQ.

# Interfaces

No description provided by the author

# Type aliases

TODO fix time ambiguous int64Time represents a unix timestamp encoded with an int64.
TODO fix time ambiguous uint32Time represents a unix timestamp encoded with a uint32.