Beispiel #1
0
// EncodeBinary encodes a []byte as binary.
func EncodeBinary(buf *bytes2.ChunkedWriter, key string, val []byte) {
	EncodePrefix(buf, Binary, key)
	putUint32(buf, uint32(len(val)))
	buf.WriteByte(0)
	buf.Write(val)
}
Beispiel #2
0
func EncodeBinary(buf *bytes2.ChunkedWriter, val []byte) {
	putUint32(buf, uint32(len(val)))
	buf.WriteByte(0)
	buf.Write(val)
}