The two bit readers zstd needs (RFC 8878, conventions derived first-hand).
Forward— FSE table descriptions: bytes consumed first→last, the first-consumed bit is the LSB of a multi-bit value.Reverse— Huffman-coded streams and sequence bitstreams: bytes walked last→first, bits MSB→LSB within each byte, after skipping the zero padding and the final1bit in the stream's last byte; the FIRST bit read is the MSB of a multi-bit value.
Both track remaining usable bits so FSE weight decoding can detect the overflow condition ("extra bits are zero") and stop.