MCPcopy Create free account
hub / github.com/apache/fory / writeHeader

Function writeHeader

go/fory/fory.go:803–812  ·  view source on GitHub ↗

============================================================================ Protocol Header ============================================================================ writeHeader writes the Fory protocol header

(ctx *WriteContext, config Config)

Source from the content-addressed store, hash-verified

801
802// writeHeader writes the Fory protocol header
803func writeHeader(ctx *WriteContext, config Config) {
804 var bitmap byte = 0
805 if config.IsXlang {
806 bitmap |= XLangFlag
807 }
808 if ctx.outOfBand {
809 bitmap |= OutOfBandFlag
810 }
811 ctx.buffer.WriteByte_(bitmap)
812}
813
814// readHeader reads and validates the Fory protocol header
815// Sets error on ctx if header is invalid (use ctx.HasError() to check)

Callers 6

writeMethod · 0.85
writeMethod · 0.85
SerializeMethod · 0.85
SerializeToMethod · 0.85
SerializeWithCallbackMethod · 0.85
SerializeFunction · 0.85

Calls 1

WriteByte_Method · 0.80

Tested by

no test coverage detected