Documentation ¶
Index ¶
Constants ¶
const NumberValueMagic uint32 = 0x6E6D6276
NumberValueMagic is vbmn in little endian ascii ==> nmbv
Variables ¶
This section is empty.
Functions ¶
func ParseLengthAndMagic ¶
ParseLengthAndMagic checks if if the given byte array is longer or equal the uint32 in the first 4 bytes, and if the magic value in the second 4 bytes equals the supplied magic and returns the length, a slice of the bytes without length and magic or an error.
func WriteLengthAndMagic ¶
WriteLengthAndMagic just writes length and magic as uint32 4 byte values into the given array.
Types ¶
type NSNumber ¶
type NSNumber struct { //not certain if these are really unsigned IntValue uint32 LongValue uint64 FloatValue float64 // contains filtered or unexported fields }
NSNumber represents a type in the binary protocol used. Type 6 seems to be a float64, type 4 a int64, type 3 a int32. I am not sure whether signed or unsigned. They are all in LittleEndian
func NewNSNumber ¶
NewNSNumber reads a NSNumber from bytes.
func NewNSNumberFromUFloat64 ¶
NewNSNumberFromUFloat64 create NSNumber of type 0x06 with a 8 byte int as value
func NewNSNumberFromUInt32 ¶
NewNSNumberFromUInt32 create NSNumber of type 0x03 with a 4 byte int as value
func NewNSNumberFromUInt64 ¶
NewNSNumberFromUInt64 create NSNumber of type 0x04 with a 8 byte int as value