Module utils

Source
Expand description

Utility functions for binary operations used in TACT file formats

Functionsยง

jenkins3_hashpath
Perform a HashPath with hashlittle2 (aka: jenkins3).
read_cstring
Read a null-terminated C string from a byte slice
read_cstring_from
Read a C string from a reader
read_uint40
Read a 40-bit (5-byte) unsigned integer from a byte slice (little-endian)
read_uint40_be
Read a 40-bit (5-byte) unsigned integer from a byte slice (big-endian)
read_uint40_be_from
Read a 40-bit unsigned integer from a cursor (big-endian)
read_uint40_from
Read a 40-bit unsigned integer from a cursor (little-endian)
read_varint
Read a variable-length integer from a byte slice
write_uint40
Write a 40-bit (5-byte) unsigned integer to a byte array (little-endian)
write_uint40_be
Write a 40-bit (5-byte) unsigned integer to a byte array (big-endian)
write_varint
Write a variable-length integer to a byte vector