code: func NewReader(r io.Reader, maxSize int) *Reader {
  	if maxSize <= 0 {
  		maxSize = DefaultMaxSize
  	}
  	qr := &Reader{}
  	buf := make([]byte, 8)
  	if _, err := io.ReadFull(r, buf); err != nil {
  		qr.err = err
  		return qr
  	} else if bytes.Compare(magic[:], buf[:4]) != 0 {
  		qr.err = fmt.Errorf("not a pquads file")
  		return qr
  	}
  	vers := binary.LittleEndian.Uint32(buf[4:])
  	if vers != currentVersion {
  		qr.err = fmt.Errorf("unsupported pquads version: %d", vers)
  		return qr
  	}
  
  	qr.pr = pio.NewReader(r, maxSize)
  	var h Header
  	if err := qr.pr.ReadMsg(&h); err != nil {
  		qr.err = err
  	}
  	qr.opts = Options{
  		Full:   h.Full,
  		Strict: !h.NotStrict,
  	}
  	return qr
  }
docs: // NewReader creates protobuf quads decoder.
  //
  // MaxSize argument limits maximal size of the buffer used to read quads.