Module sp_trie::nibble_ops

source ·
Expand description

Various re-exports from the trie-db crate. Utility methods to work on radix 16 nibble.

Constants

Functions

  • Get u8 nibble value at a given index in a NibbleSlice.
  • Get u8 nibble value at a given index of a byte.
  • Count the biggest common depth between two left aligned packed nibble slice.
  • Calculate the number of common nibble between two left aligned bytes.
  • Get u8 nibble value at a given index in a left aligned array.
  • Calculate the number of needed padding a array of nibble length i.
  • Mask a byte, keeping left nibble.
  • Mask a byte, keeping right byte.
  • Push u8 nibble value at a given index into an existing byte.
  • Shifts right aligned key to add a given left offset. Resulting in possibly padding at both left and right (example usage when combining two keys).