-// bitReader needs to read bytes from an io.Reader. We attempt to convert the
-// given io.Reader to this interface and, if it doesn't already fit, we wrap in
-// a bufio.Reader.
-type byteReader interface {
- ReadByte() (byte, error)
-}
-
+// newBitReader returns a new bitReader reading from r. If r is not
+// already an io.ByteReader, it will be converted via a bufio.Reader.