code: func NewReader(reader io.Reader) (*Reader, error) {
  	r := &Reader{
  		buf:          reader,
  		fourBytes:    make([]byte, 4),
  		twoBytes:     make([]byte, 2),
  		sixteenBytes: make([]byte, 16),
  	}
  	switch magic := r.readUint32(); magic {
  	case 0xa1b2c3d4:
  		r.flip = false
  	case 0xd4c3b2a1:
  		r.flip = true
  	default:
  		return nil, fmt.Errorf("pcap: bad magic number: %0x", magic)
  	}
  	r.Header = FileHeader{
  		MagicNumber:  0xa1b2c3d4,
  		VersionMajor: r.readUint16(),
  		VersionMinor: r.readUint16(),
  		TimeZone:     r.readInt32(),
  		SigFigs:      r.readUint32(),
  		SnapLen:      r.readUint32(),
  		Network:      r.readUint32(),
  	}
  	return r, nil
  }
docs: // NewReader reads pcap data from an io.Reader.