MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / verify

Method verify

projects/Python/proto/protoex.py:2469–2478  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2467
2468 # Check if the struct value is valid
2469 def verify(self):
2470 if (self.buffer.offset + self._model.fbe_offset) > self.buffer.size:
2471 return False
2472
2473 fbe_struct_size = self.read_uint32(self._model.fbe_offset - 8)
2474 fbe_struct_type = self.read_uint32(self._model.fbe_offset - 4)
2475 if (fbe_struct_size <= 0) or (fbe_struct_type != self.fbe_type):
2476 return False
2477
2478 return (8 + self._model.verify()) == fbe_struct_size
2479
2480 # Serialize the struct value
2481 def serialize(self, value):

Callers

nothing calls this directly

Calls 2

read_uint32Method · 0.45
verifyMethod · 0.45

Tested by

no test coverage detected