// Use a more unique way to identify a set of bytes.
178288
func (ctx *Context) uniqueHash(v []byte) []byte {
	ctx.uniqueHasher.Reset()
	_, err := ctx.uniqueHasher.Write(v)
	if err != nil {
		// FIXME: libs shouldn't panic
		panic(err)
	}
	return ctx.uniqueHasher.Sum(nil)
}
166010
func (s *Secret) Bytes() ([]byte, error) {
	if s.d == nil {
		return []byte{}, nil
	}

	buf := &bytes.Buffer{}
	if pw, found := s.d[passwordKey]; found {
		if sv, ok := pw.(string); ok {
			_, _ = buf.WriteString(sv)
		}
	}
	_, _ = buf.WriteString("\n")
	keys := make([]string, 0, len(s.d))
	for k := range s.d {
		keys = append(keys, k)
	}
	sort.Strings(keys)
	for _, k := range keys {
		v := s.d[k]
		if k == passwordKey {
			continue
		}
		_, _ = buf.WriteString(k)
		_, _ = buf.WriteString(": ")
		if sv, ok := v.(string); ok {
			_, _ = buf.WriteString(sv)
		}
		_, _ = buf.WriteString("\n")
	}
	return buf.Bytes(), nil
}
1234486
func (t *fileTracker) SetBytes(bytes map[int]uint64) {
	total := uint64(0)
	labels := t.Labels()
	for k, v := range bytes {
		labels["level"] = fmt.Sprintf("%d", k)
		t.metrics.DiskSize.With(labels).Set(float64(v))
	}
	atomic.StoreUint64(&t.diskBytes, total)
}
551325
func (r *Reply) Bytes() ([]byte, error) {
	if r.Type() == ReplyNil {
		return nil, ErrNil
	}
	if r.Type() != ReplyString && r.Type() != ReplyStatus {
		return nil, ErrType
	}
	return r.stringValue, nil
}
702542
func bytesIndexByte(s []byte, c byte) int {
	for i, b := range s {
		if b == c {
			return i
		}
	}
	return -1
}
408262
func ParseBytes(b []byte) (UUID, error) {
	gu, err := guuid.ParseBytes(b)
	if err == nil {
		return gu[:], nil
	}
	return nil, err
}
1293055
func (t *fileTracker) AddBytes(bytes uint64) {
	atomic.AddUint64(&t.diskBytes, bytes)

	labels := t.Labels()
	t.metrics.DiskSize.With(labels).Add(float64(bytes))
}
917819
func CountBytes(b []byte) (int, error) {
	var count int
	for len(b) >= 8 {
		v := binary.BigEndian.Uint64(b[:8])
		b = b[8:]

		sel := v >> 60
		if sel >= 16 {
			return 0, fmt.Errorf("invalid selector value: %v", sel)
		}
		count += selector[sel].n
	}

	if len(b) > 0 {
		return 0, fmt.Errorf("invalid slice len remaining: %v", len(b))
	}
	return count, nil
}
981235
func (s *CatAllocationService) Bytes(bytes string) *CatAllocationService {
	s.bytes = bytes
	return s
}
510022
func (s *SeriesLong) Bytes() []byte {
	s.Lock()
	defer s.Unlock()
	return s.bw.bytes()
}
228160
func (oid OID) Bytes() []byte {
	var l C.OM_uint32
	var p *C.char

	C.helper_gss_OID_desc_get_elements(oid.C_gss_OID, &l, &p)

	return C.GoBytes(unsafe.Pointer(p), C.int(l))
}
137387
func (fs *FileSet) bytes() int {
	var b int
	for _, level := range fs.levels {
		b += int(unsafe.Sizeof(level))
	}
	// Do not count SeriesFile because it belongs to the code that constructed this FileSet.
	for _, file := range fs.files {
		b += file.bytes()
	}
	b += int(unsafe.Sizeof(*fs))
	return b
}
567806
func (h Hash) Bytes(key string) []byte {
	if value, ok := h[key]; ok {
		return value.Bytes()
	}
	return []byte{}
}
251368
func (r *Reply) Bytes() ([]byte, error) {
	if r.Type == ErrorReply {
		return nil, r.Err
	}
	if !(r.Type == StatusReply || r.Type == BulkReply) {
		return nil, errors.New("string value is not available for this reply type")
	}

	return r.buf, nil
}
474701
func Bytes(in []byte) []byte {
	for b, esc := range Codes {
		in = bytes.Replace(in, []byte{b}, esc, -1)
	}
	return in
}
1360181
func (res *MCResponse) Bytes() []byte {
	data := make([]byte, res.Size())

	pos := res.fillHeaderBytes(data)

	copy(data[pos:pos+len(res.Body)], res.Body)

	return data
}
225095
func (u UUID) Bytes() ([]byte, error) {
	id, err := uuid.FromString(string(u))
	if err != nil {
		return nil, errors.Wrap(err, "invalid uuid string")
	}
	return id.Bytes(), nil
}