import "./unpack_unchecked.zok"; from "field" import FIELD_SIZE_IN_BITS; from "EMBED" import bit_array_le; // Unpack a field element as N big endian bits def main(field i) -> bool[N] { bool[N] res = unpack_unchecked(i); assert(N >= FIELD_SIZE_IN_BITS \ ? bit_array_le(res, [...[false; N - FIELD_SIZE_IN_BITS], ...unpack_unchecked::(-1)]) \ : true); return res; }