Sia - Binary serialisation and deserialisation with built-in compression. You can consider Sia a strongly typed, statically typed domain specific binary language for constructing data. Sia preserves data types and supports custom ones.
go get github.com/pouya-eghbali/go-sia
To serialize multiple values, first create a sia object and then you can add values in order. Note that the order of adding values should be considered when you want to read them again.
Serializing:
rawByte := sia.New().
AddUInt16(1234).
AddString64("think simple, do simple!").
Bytes()
Deserializing:
deserialized := sia.NewFromBytes(rawByte)
gotSampleUint16 := deserialized.ReadUInt16() // 1234
gotSampleString := deserialized.ReadString64() // think simple, do simple!
Note that sia can't handle serializing of arrays, so it will fall back to JSON marshal about them.