How can I combine nom parsers to get a more bit-oriented interface to the data?
问题 I'm working on decoding AIS messages in Rust using nom. AIS messages are made up of a bit vector; the various fields in each message are an arbitrary number of bits long, and they don't always align on byte boundaries. This bit vector is then ASCII encoded, and embedded in an NMEA sentence. From http://catb.org/gpsd/AIVDM.html: The data payload is an ASCII-encoded bit vector. Each character represents six bits of data. To recover the six bits, subtract 48 from the ASCII character value; if