uproot.deserialization.numbytes_version

Defined in uproot.deserialization on line 103.

uproot.deserialization.numbytes_version(chunk, cursor, context, move=True)
Parameters:
  • chunk (uproot.source.chunk.Chunk) – Buffer of contiguous data from the file uproot.source.chunk.Source.

  • cursor (uproot.Cursor) – Current position in that chunk.

  • context (dict) – Auxiliary data used in deserialization.

  • move (bool) – If True, move the cursor to a position just past the bytes that were read. If False, don’t move the cursor at all.

Deserialize a number of bytes and version number, which is usually 6 bytes but may be 2 bytes if the number of bytes isn’t given.

Returns a 3-tuple of

  • number of bytes (int or None if unknown)

  • instance version (int)

  • is memberwise (bool): True if the memberwise bit is set in the version number; False otherwise.