code: func NewWriter(w io.Writer, opts *Options) *Writer {
  	// Write file magic and version
  	buf := make([]byte, 8)
  	copy(buf[:4], magic[:])
  	binary.LittleEndian.PutUint32(buf[4:], currentVersion)
  	if _, err := w.Write(buf); err != nil {
  		return &Writer{err: err}
  	}
  	pw := pio.NewWriter(w)
  	if opts == nil {
  		opts = &Options{}
  	}
  	// Write options header
  	_, err := pw.WriteMsg(&Header{
  		Full:      opts.Full,
  		NotStrict: !opts.Strict,
  	})
  	return &Writer{pw: pw, err: err, opts: *opts}
  }
docs: // NewWriter creates protobuf quads encoder.