MCPcopy Create free account
hub / github.com/ZettaScaleLabs/hiroz / SerializeCDR

Method SerializeCDR

crates/hiroz-go/testdata/string_msg.go:32–36  ·  view source on GitHub ↗

SerializeCDR serializes the message to CDR format

()

Source from the content-addressed store, hash-verified

30
31// SerializeCDR serializes the message to CDR format
32func (m *String) SerializeCDR() ([]byte, error) {
33 // CDR serialization is performed directly in Go
34 // The packToRaw method produces CDR-compatible little-endian bytes
35 return m.packToRaw(), nil
36}
37
38func (m *String) packToRaw() []byte {
39 buf := make([]byte, 0, 256)

Callers 4

BenchmarkStringSerializeFunction · 0.95

Calls 1

packToRawMethod · 0.95

Tested by 4

BenchmarkStringSerializeFunction · 0.76