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

Function readHeaderSlow

go/fory/fory.go:829–842  ·  view source on GitHub ↗

go:noinline

(ctx *ReadContext, bitmap byte)

Source from the content-addressed store, hash-verified

827
828//go:noinline
829func readHeaderSlow(ctx *ReadContext, bitmap byte) {
830 if bitmap&^headerFlagMask != 0 {
831 ctx.SetError(DeserializationErrorf("unsupported root header bitmap 0x%02x", bitmap))
832 return
833 }
834 if ((bitmap & XLangFlag) != 0) != ctx.xlang {
835 ctx.SetError(DeserializationErrorf("header bitmap mismatch at xlang bit"))
836 return
837 }
838 if (bitmap&OutOfBandFlag) != 0 && ctx.outOfBandBuffers == nil {
839 ctx.SetError(DeserializationErrorf("out-of-band buffers are required by root header"))
840 return
841 }
842}
843
844// ============================================================================
845// Generic Serialization API

Callers 1

readHeaderFunction · 0.85

Calls 2

DeserializationErrorfFunction · 0.85
SetErrorMethod · 0.45

Tested by

no test coverage detected