code: func (d *Decoder) skipToNextFrame() (fh FrameHeader, readN int, err error) {
  	if d == nil {
  		return nil, readN, errors.New("nil decoder")
  	}
  	buf := make([]byte, 1)
  	lookAheadBuf := make([]byte, 1)
  	var n int
  	for {
  		n, err = d.r.Read(buf)
  		readN += n
  		if err != nil {
  			return nil, readN, err
  		}
  		readN++
  		if buf[0] == 0xFF {
  			if _, err := d.r.Read(lookAheadBuf); err != nil {
  				return nil, readN, err
  			}
  			readN++
  			if lookAheadBuf[0]&0xE0 == 0xE0 {
  				buf = []byte{0xff, lookAheadBuf[0], 0, 0}
  				n, err := d.r.Read(buf[2:])
  				if err != nil {
  					return nil, readN + n, err
  				}
  				if n != 2 {
  					return nil, readN + n, io.ErrUnexpectedEOF
  				}
  				readN += 2
  			}
  			return buf, readN, err
  		}
  	}
  }
docs: // skipToSyncWord reads until it finds a frame header