Retained lookup and prefix copying on raw bit words #
Both compilers first convert the raw input into a framed list of Booleans.
bitsGetDNatCompiler looks up a binary index and returns the supplied fallback if necessary.
takeBits copies a unary-bounded prefix and unframes it. Its certified time and workspace
are linear in the input length and requested count, including the full initial scan.
Binary-indexed access to a raw bit word, with an explicit out-of-range fallback. The compiler retains the framing conversion and the complete framed-list scan.
Canonical retained raw-bit prefix compiler. The executed machine first frames every raw bit, uses the direct unary encoded-list prefix machine, then removes the frames.
Fully expanded exact workspace in the raw-word length, unary count and emitted-prefix length.