// reset the state of the compressor.
324579
func (d *compressor) reset(w io.Writer) {
	d.w.reset(w)
	d.sync = false
	d.err = nil
	// We only need to reset a few things for Snappy.
	if d.snap != nil {
		d.snap.Reset()
		d.windowEnd = 0
		d.tokens.n = 0
		return
	}
	switch d.compressionLevel.chain {
	case 0:
		// level was NoCompression or ConstantCompresssion.
		d.windowEnd = 0
	default:
		d.chainHead = -1
		for i := range d.hashHead {
			d.hashHead[i] = 0
		}
		for i := range d.hashPrev {
			d.hashPrev[i] = 0
		}
		d.hashOffset = 1
		d.index, d.windowEnd = 0, 0
		d.blockStart, d.byteAvailable = 0, false
		d.tokens.n = 0
		d.length = minMatchLength - 1
		d.offset = 0
		d.hash = 0
		d.ii = 0
		d.maxInsertIndex = 0
	}
}
598111
func (c *chunkedIntCoder) Reset() {
	c.final = c.final[:0]
	c.chunkBuf.Reset()
	c.currChunk = 0
	for i := range c.chunkLens {
		c.chunkLens[i] = 0
	}
}
169321
func (s *SSD1306Driver) Reset() (err error) {
	s.rstDriver.DigitalWrite(1)
	time.Sleep(10 * time.Millisecond)
	s.rstDriver.DigitalWrite(0)
	time.Sleep(10 * time.Millisecond)
	s.rstDriver.DigitalWrite(1)
	return nil
}
1146357
func (w *ResponseRecorder) Reset() {
	w.ClearHeaders()
	w.WriteHeader(defaultStatusCode)
	w.ResetBody()
}
351033
func (o *Once) Reset() {
	o.m.Lock()
	defer o.m.Unlock()
	atomic.StoreUint32(&o.done, 0)
}
1323205
func Reset() {
	fMu.Lock()
	defer fMu.Unlock()
	for k, v := range initial {
		features[k] = v
	}
}
1071326
func (s *Storage) Reset() {
	redisClient.Set(storage.TotalCountKey, strconv.Itoa(0), 0)
	redisClient.Set(storage.IosSuccessKey, strconv.Itoa(0), 0)
	redisClient.Set(storage.IosErrorKey, strconv.Itoa(0), 0)
	redisClient.Set(storage.AndroidSuccessKey, strconv.Itoa(0), 0)
	redisClient.Set(storage.AndroidErrorKey, strconv.Itoa(0), 0)
}
2862
func (b *Buffer) Reset() {
	b.Line = b.Line[:0]
	b.Val = b.Val[:0]
}
41298
func (b *Batch) Reset() {
	b.data = b.data[:0]
	b.index = b.index[:0]
	b.internalLen = 0
}
526690
func (s *State232) Reset() {
	s.seed = 0
	s.clen = 0
	s.tail = nil
}
219212
func (m *metricMap) Reset() {
	m.mtx.Lock()
	defer m.mtx.Unlock()

	for h := range m.metrics {
		delete(m.metrics, h)
	}
}
1145542
func (p *partition) reset() {
	p.mu.RLock()
	sz := len(p.store)
	p.mu.RUnlock()

	newStore := make(map[string]*entry, sz)
	p.mu.Lock()
	p.store = newStore
	p.mu.Unlock()
}
65826
func (r *realTimer) Reset(d time.Duration) bool {
	return r.timer.Reset(d)
}
803595
func (m *Mock) Reset() *Mock {
	defer m.mutex.Unlock()
	m.mutex.Lock()

	m.Functions = nil
	m.order = 0
	return m
}
406387
func (enc *ProtoEncoder) Reset(w io.Writer) {
	enc.pBuf.Reset()
	enc.w = w
}
579235
func (iter *ProductIterator) Reset() {
	iter.iters = 0

	iter.indices = make([]int, iter.n, iter.n)
	iter.res = make([]interface{}, iter.n, iter.n)
}
767441
func (s *Store) Reset() {
	s.mu.Lock()
	s.metrics = make(map[string][]time.Duration)
	s.mu.Unlock()
	s.diffmu.Lock()
	s.diffs = make(map[string]*diff)
	s.diffmu.Unlock()
}