implement h_with_endianness combinator

fixed a bug in `h_read_bits` along the way.