// ResetBytes resets the Decoder with a new []byte to decode from,
// clearing all state from last run(s).
516038
func (d *Decoder) ResetBytes(in []byte) {
	if in == nil {
		return
	}
	d.bytes = true
	d.bufio = false
	// d.typ = entryTypeBytes
	d.rb.reset(in)
	// d.r = &d.rb
	d.resetCommon()
}
113256
func (c *Cache) SetBytes(key string, value []byte) {
	c.Set(key, value, int64(len(value)))
}
346012
func (bd *BinaryDecoder) ReadBytes() ([]byte, error) {
	//TODO make something with these if's!!
	if err := checkEOF(bd.buf, bd.pos, 1); err != nil {
		return nil, EOF
	}
	length, err := bd.ReadLong()
	if err != nil {
		return nil, err
	}
	if length < 0 {
		return nil, NegativeBytesLength
	}
	if err = checkEOF(bd.buf, bd.pos, int(length)); err != nil {
		return nil, EOF
	}

	bytes := make([]byte, length)
	copy(bytes[:], bd.buf[bd.pos:bd.pos+length])
	bd.pos += length
	return bytes, err
}
406387
func (enc *ProtoEncoder) Reset(w io.Writer) {
	enc.pBuf.Reset()
	enc.w = w
}
66860
func readBytes(dst []byte, r io.Reader) error {
	offset := 0
	remaining := len(dst)
	if remaining == 0 {
		// Nothing left to read
		return nil
	}
	for {
		n, err := r.Read(dst[offset:])
		offset += n
		remaining -= n
		if remaining == 0 {
			return nil
		}
		if err != nil {
			return err
		}
	}
}
1053468
func (a *Address) SetBytes(b []byte) {
	if len(b) > len(a) {
		b = b[len(b)-AddressLength:]
	}
	copy(a[AddressLength-len(b):], b)
}
602427
func (m *MockBytes) Reset(arg0 []byte) {
	m.ctrl.Call(m, "Reset", arg0)
}
770091
func (tr *Reader) RawBytes() []byte {
	if !tr.RawAccounting {
		return nil
	}
	if tr.rawBytes == nil {
		tr.rawBytes = bytes.NewBuffer(nil)
	}
	defer tr.rawBytes.Reset() // if we've read them, then flush them.

	return tr.rawBytes.Bytes()

}
1189729
func (s *TerminologyProperties) SetSizeBytes(v int64) *TerminologyProperties {
	s.SizeBytes = &v
	return s
}
953225
func (b *Buckets) Reset() *Buckets {
	b.data = make([]byte, (b.count*uint(b.bucketSize)+7)/8)
	return b
}
61595
func (f *ServiceFlags) SetBytes(x []byte) {
	var b [4]byte
	copy(b[:], x)
	*f = ServiceFlags(*(*uint32)(unsafe.Pointer(&b)))
}
485386
func (g *Gnostic) errorBytes(err error) []byte {
	return []byte("Errors reading " + g.sourceName + "\n" + err.Error())
}
1137587
func (c *CipherReader) Reset(r io.Reader, mask [4]byte) {
	c.r = r
	c.mask = mask
	c.pos = 0
}
103131
func DeleteBytes(json []byte, path string) ([]byte, error) {
	return SetBytes(json, path, dtype{})
}
238688
func (stream *Stream) Reset(out io.Writer) {
	stream.out = out
	stream.buf = stream.buf[:0]
}
1202154
func DecodeBytes(buf []byte) (Store, error) {
	s := Store{}
	err := Decode(s, buf)
	if err != nil {
		return nil, err
	}

	return s, nil
}
437101
func (p *Parser) ParseBytes(b []byte, v interface{}) error {
	return p.Parse(bytes.NewReader(b), v)
}