uproot.serialization.numbytes_version

Defined in uproot.serialization on line 45.

uproot.serialization.numbytes_version(num_bytes, version)
Parameters:
  • num_bytes (int) – The first value to include in the header.

  • version (int) – The second value to include in the header.

Returns a 6-byte bytes object consisting of num_bytes and version, with the appropriate offset (+2) and uproot.const.kByteCountMask applied to num_bytes.

This function is the opposite of uproot.deserialization.numbytes_version, but only generates one case (whereas the deserializer must handle special flags in the num_bytes).