package
0.12.0
Repository: https://github.com/consensys/gnark.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

AssertChecksumEquals takes a MiMC hash of e and asserts it is equal to checksum.
ChecksumPaddedBytes packs b into field elements, then hashes the field elements along with validLength (encoded into a field element of its own).
NewNumReader returns a new NumReader toRead is the slice of words to read from numNbBits defines the radix as r = 2ⁿᵘᵐᴺᵇᴮⁱᵗˢ (or rather numNbBits = log₂(r) ) wordNbBits defines the number of bits in each word such that n = numNbBits/wordNbBits it is the caller's responsibility to check 0 ≤ bᵢ < r ∀ i.
Pack packs the words as tightly as possible, and works Big Endian: i.e.
PackN packs the words wordsPerElem at a time into field elements, and works Big Endian: i.e.
ReadNum reads the slice c as a big endian number in base radix.
ShiftLeft erases shiftAmount many elements from the left of Slice and replaces them in the right with zeros it is the caller's responsibility to make sure that 0 \le shift < len(c).
UnpackIntoBytes construes every element in packed as consisting of bytesPerElem bytes, returning those bytes it DOES NOT prove that the elements in unpacked are actually bytes nbBytes is the number of "valid" bytes according to the padding scheme in https://github.com/Consensys/zkevm-monorepo/blob/main/prover/lib/compressor/blob/blob_maker.go#L299 TODO @tabaie @gbotrel move the padding/packing code to gnark or compress the very last non-zero byte in the unpacked stream is meant to encode the number of unused bytes in the last field element used.
No description provided by the author

# Structs

NumReader takes a sequence of words [ b₀ b₁ ..