Repeatedly decodes values of type A
and returns a collection of the specified type.
Repeatedly decodes values of type A
and returns a collection of the specified type.
Uses deMux
repeatedly to obtain the stream of vectors to decode to a value of type A
.
Terminates when the next stream to decode is empty or upon first decoding error.
Note: For large sequences, it may be necessary to compact bits in deMux
.
element decoder
returns (next, rest)
tuples where next
is input to dec
yielding (value, remainder)
and remainder ++ rest
is the next input to deMux
input bits
Encodes all elements of the specified sequence and combines the results using mux
, or returns the first encountered error.
Encodes all elements of the specified sequence and combines the results using mux
, or returns the first encountered error.
element encoder
multiplexing function
elements to encode
A trait that enables custom handling for encoding/decoding sequences.