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

Method verify

projects/Python/proto/enums.py:4822–4831  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4820
4821 # Check if the struct value is valid
4822 def verify(self):
4823 if (self.buffer.offset + self._model.fbe_offset) > self.buffer.size:
4824 return False
4825
4826 fbe_struct_size = self.read_uint32(self._model.fbe_offset - 8)
4827 fbe_struct_type = self.read_uint32(self._model.fbe_offset - 4)
4828 if (fbe_struct_size <= 0) or (fbe_struct_type != self.fbe_type):
4829 return False
4830
4831 return (8 + self._model.verify()) == fbe_struct_size
4832
4833 # Serialize the struct value
4834 def serialize(self, value):

Callers 1

Calls 2

read_uint32Method · 0.45
verifyMethod · 0.45

Tested by 1