func NewReaderDict(r io.Reader, dict []byte) (io.ReadCloser, error) {
	z := new(reader)
	err := z.Reset(r, dict)
	if err != nil {
		return nil, err
	}
	return z, nil
}
NewReaderDict is like NewReader but uses a preset dictionary.
NewReaderDict ignores the dictionary if the compressed data does not refer to it.
If the compressed data refers to a different dictionary, NewReaderDict returns ErrDictionary.

The ReadCloser returned by NewReaderDict also implements Resetter.
package zlib
import (
	"bufio"
	"errors"
	"hash"
	"hash/adler32"
	"io"
	"github.com/klauspost/compress/flate"
)
const zlibDeflate = 8
var (
	ErrChecksum = errors.New("zlib: invalid checksum")
	ErrDictionary = errors.New("zlib: invalid dictionary")
	ErrHeader = errors.New("zlib: invalid header")
)
type reader struct {
	r            flate.Reader
	decompressor io.ReadCloser
	digest       hash.Hash32
	err          error
	scratch      [4]byte
}
type Resetter interface {
	Reset(r io.Reader, dict []byte) error
}
func NewReader(r io.Reader) (io.ReadCloser, error) {
	return NewReaderDict(r, nil)
}