Typeberry by Fluffy Labs - v0.5.0
    Preparing search index...

    Function bytesAsU48

    • A function to transform a bytes chunk (up to 6 bytes into U48 number)

      Note that it uses 3 additional bits to store length(value * 8 + len;), It is needed to distinguish shorter chunks that have 0s at the end, for example: [1, 2] and [1, 2, 0]

      Parameters

      • bytes: Uint8Array

      Returns number