Module util

Types

RAContainer = concept c
    c.low is SomeInteger
    c.high is SomeInteger
    c.len is SomeInteger
Random access container   Source

Procs

proc divCeil[SomeInteger](a, b: SomeInteger): SomeInteger {.inline.}
Returns ceil(a / b) (only works on positive numbers)   Source
proc log2pow2(x: uint64): int {.inline, raises: [], tags: [].}
Returns log2(x), but x must be a power of 2. Also undefined for 0.   Source
proc log2pow21(x: uint64): int {.inline, raises: [], tags: [].}
Returns log2(x+1), but x must be a power of 2 minus 1.   Source
proc bitSize(x: uint64): int {.raises: [], tags: [].}
Returns floor(log2(x))+1. Undefined for 0.   Source
proc bytesToWords[T](bytes: openArray[uint8]): seq[T]
  Source
proc bytesToWordsN[T, R](bytes: openArray[uint8]): R
  Source