Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesFromStruct ¶
BytesFromStruct serializes the fields of a struct to an array of bytes in the order in which the fields are declared and returns total number of bytes converted. Panics if data is not a struct or pointer to struct, or if there was an error writing a field.
func ConvertToUtf16 ¶
ConvertToUtf16 converts a UTF-8 string to UTF-16 LE and return it as an array of bytes.
func StripPadding ¶
StripPadding returns a slice of b without the trailing 0s.
func StructFromBytes ¶
func StructFromBytes(data []byte, targetStruct interface{})
StructFromBytes populates the struct pointed to by targetStruct by reading in a stream of bytes and filling the values in sequential order.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.