code: func ReadBytes(buf io.ByteReader) (ret []byte, n int, err error) {
  	tmpBuf := bytes.Buffer{}
  	acc := byte(0)
  	for i := 0; i < ReadByteLimit; i++ {
  		o := byte(0)
  		if o, err = buf.ReadByte(); err != nil {
  			return
  		}
  		n++
  
  		b := o & 0xfe // user data
  		m := uint(i % 8)
  
  		if m == 0 {
  			acc = b
  		} else {
  			// ignore err since bytes.Buffer.WriteByte can never return one.
  			_ = tmpBuf.WriteByte(acc | (b >> (8 - m)))
  			acc = (b << m)
  		}
  
  		if o&1 == 0 { // stop bit is 0
  			ret = tmpBuf.Bytes()
  			return
  		}
  	}
  	err = ErrByteLimitExceeded
  	return
  }
docs: // ReadBytes reads an encoded []byte from buf, returning the number of bytes
  // read, and any read error encountered.