// NewReader returns a new multipart/related Reader reading from r using the
// given MIME boundary. It's a wrapper around multipart's Reader
424068
func NewReader(
	r io.Reader,
	params map[string]string,
) *Reader {
	return &Reader{
		r:         multipart.NewReader(r, params["boundary"]),
		mediaType: params["type"],
		start:     parseContentId(params["start"]),
		startInfo: params["start-info"],
		rootRead:  false,
	}
}
593976
func NewReader(charset string, r io.Reader) (io.Reader, error) {
	tr, err := TranslatorFrom(charset)
	if err != nil {
		return nil, err
	}
	return NewTranslatingReader(r, tr), nil
}
567488
func NewReader(r io.Reader) (*Reader, error) {
	cr := Reader{r: r}
	err := cr.d.readFrom(r)
	if err != nil {
		return nil, err
	}
	return &cr, nil
}
906105
func NewReader(rd io.Reader) *Reader {
	mr := new(Reader)
	mr.Reset(rd)
	return mr
}
330013
func NewReader(rd io.Reader) *Reader {
	return &Reader{
		rd:  bufio.NewReader(rd),
		buf: make([]byte, 4096),
	}
}
619970
func (s *Stdin) NewReader(id string) (io.ReadCloser, error) {
	return os.Stdin, nil
}
1337815
func NewReader(r io.Reader) *BitReader {
	b := new(BitReader)
	b.r = r
	return b
}
1015646
func NewReader(ctx context.Context, r io.Reader) *Reader {
	return &Reader{
		ctx:    ctx,
		reader: r,
	}
}
926742
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
}
1350694
func NewReader(r io.Reader) (io.Reader, error) {
	tr, err := fromCp949()
	if err != nil {
		return nil, err
	}

	return &cp949Reader{r: r, tr: tr}, nil
}
689902
func NewReader(r io.Reader) (*Reader, error) {
	ar := &Reader{r: r}
	arHeader := make([]byte, arHeaderSize)
	_, err := io.ReadFull(ar.r, arHeader)
	if err != nil {
		return nil, err
	}
	if string(arHeader) != ArFileHeader {
		return nil, errors.New("ar: Invalid ar file")
	}
	return ar, nil
}
331465
func NewReader(src io.Reader, buf Buffer) io.ReadCloser {
	r, w := Pipe(buf)

	go func() {
		_, err := io.Copy(w, src)
		w.CloseWithError(err)
	}()

	return r
}
653668
func NewReader(rda io.ReaderAt, size int64) (*zip.Reader, error) {
	handlers := []func(io.ReaderAt, int64) (*zip.Reader, error){
		zip.NewReader,
		zipExeReaderMacho,
		zipExeReaderElf,
		zipExeReaderPe,
	}

	for _, handler := range handlers {
		zfile, err := handler(rda, size)
		if err == nil {
			return zfile, nil
		}
	}
	return nil, errors.New("Couldn't Open As Executable")
}
687342
func newReader(ctx context.Context, d *dispatcher, r io.ReadCloser) *reader {
	return &reader{
		ctx: ctx,
		d:   d,
		r:   r,
	}
}
42827
func NewReader(r io.Reader) (*Reader, error) {
	if r == nil {
		return nil, errors.New("Reader must not be nil")
	}

	return &Reader{r: r}, nil
}
495818
func (l *LocalStore) NewReader(o string) (io.ReadCloser, error) {
	return l.NewReaderWithContext(context.Background(), o)
}
752520
func NewReader(rd io.ReadSeeker, size int64) (wav *Reader, err error) {
	if size > maxSize {
		return nil, ErrInputToLarge
	}

	wav = new(Reader)
	wav.input = rd
	wav.size = size

	err = wav.parseHeaders()
	if err != nil {
		return nil, err
	}

	wav.samplesRead = 0

	return wav, nil
}