uproot.deserialization.numbytes_check
Defined in uproot.deserialization on line 149.
- uproot.deserialization.numbytes_check(chunk, start_cursor, stop_cursor, num_bytes, classname, context, file_path)
- Parameters:
chunk (uproot.source.chunk.Chunk) – Buffer of contiguous data from the file uproot.source.chunk.Source.
start_cursor (uproot.Cursor) – Initial position in that
chunk
.stop_cursor (uproot.Cursor) – Current position in that
chunk
.num_bytes (int or None) – If an integer, the number of bytes to compare with the difference between
start_cursor
andstop_cursor
; if None, this function does nothing.classname (str) – C++ (decoded) name of the class for error messages.
context (dict) – Auxiliary data used in deserialization.
file_path (str) – Name of the file for error messages.
Verifies that the number of bytes matches the change in position of the cursor (if
num_bytes
is not None).Raises a uproot.DeserializationError on failure.