Documentation ¶
Overview ¶
Byte level message field sizes
Byte level message field serialization.
Index ¶
- Constants
- func AllZeroes(b []byte) bool
- func DeserializeBool(bytes []byte) bool
- func DeserializeInt16(bytes []byte) int16
- func DeserializeInt32(bytes []byte) int32
- func DeserializeInt64(bytes []byte) int64
- func DeserializeString(bytes []byte) (string, int)
- func IP4BytesToString(bytes []byte) string
- func IP4StringToBytes(ip string) []byte
- func ReadBool(r io.Reader) (bool, error)
- func ReadByte(r io.Reader) (byte, error)
- func ReadBytes(r io.Reader, length int64) ([]byte, error)
- func ReadHash(r io.Reader) ([]byte, error)
- func ReadInt16(r io.Reader) (int16, error)
- func ReadInt32(r io.Reader) (int32, error)
- func ReadInt64(r io.Reader) (int64, error)
- func ReadNodeId(r io.Reader) ([]byte, error)
- func ReadSignature(r io.Reader) ([]byte, error)
- func ReadString(r io.Reader) (string, error)
- func SerializeBool(b bool) []byte
- func SerializeInt16(number int16) []byte
- func SerializeInt32(number int32) []byte
- func SerializeInt64(number int64) []byte
- func SerializeString(s string, maxLength int) []byte
- func SerializedStringLength(s string, maxLength int) int
- func Skip(r io.ReadSeeker, length int64) error
Constants ¶
View Source
const ( SizeNodeIdentifier = 32 SizeSignature = 64 SizeIPAddress = 4 SizePort = 4 SizeTimestamp = 8 SizeNodeListLength = 4 SizeMessageLength = 4 SizeMessageType = 2 SizeStringLength = 2 SizeVoteListLength = 1 SizeHash = 32 SizeSeed = 32 SizeBlockHeight = 8 SizeTransactionType = 1 SizeTransactionAmount = 8 SizeBlocksUntilFee = 2 SizeRolloverTransactionFee = 1 SizeBalanceListLength = 4 SizeUnnamedByte = 1 SizeUnnamedInt16 = 2 SizeUnnamedInt32 = 4 SizeUnnamedInt64 = 8 SizeShlong = 8 SizeFrozenBlockListLength = 2 SizeBool = 1 )
Variables ¶
This section is empty.
Functions ¶
func DeserializeBool ¶
func DeserializeInt16 ¶
func DeserializeInt32 ¶
func DeserializeInt64 ¶
func DeserializeString ¶
func IP4BytesToString ¶
func IP4StringToBytes ¶
func SerializeBool ¶
func SerializeInt16 ¶
func SerializeInt32 ¶
func SerializeInt64 ¶
func SerializeString ¶
func SerializedStringLength ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.