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

Method verify

projects/Python/proto/proto.py:1600–1609  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1598
1599 # Check if the struct value is valid
1600 def verify(self):
1601 if (self.buffer.offset + self._model.fbe_offset) > self.buffer.size:
1602 return False
1603
1604 fbe_struct_size = self.read_uint32(self._model.fbe_offset - 8)
1605 fbe_struct_type = self.read_uint32(self._model.fbe_offset - 4)
1606 if (fbe_struct_size <= 0) or (fbe_struct_type != self.fbe_type):
1607 return False
1608
1609 return (8 + self._model.verify()) == fbe_struct_size
1610
1611 # Serialize the struct value
1612 def serialize(self, value):

Callers

nothing calls this directly

Calls 2

read_uint32Method · 0.45
verifyMethod · 0.45

Tested by

no test coverage detected