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

Method read

python/pyfory/serializer.py:761–770  ·  view source on GitHub ↗
(self, buffer)

Source from the content-addressed store, hash-verified

759 buffer.write_buffer(swapped)
760
761 def read(self, buffer):
762 type_id = buffer.read_uint8()
763 typecode = typeid_code[type_id]
764 itemsize = typecode_dict[typecode][0]
765 data = buffer.read_bytes_and_size()
766 arr = array.array(typecode, [])
767 arr.frombytes(data)
768 if not is_little_endian and itemsize > 1:
769 arr.byteswap()
770 return arr
771
772
773if np:

Callers

nothing calls this directly

Calls 2

read_uint8Method · 0.45
arrayMethod · 0.45

Tested by

no test coverage detected