// getTotalBytes is a thread-safe getter for retrieving the total byte status.
327405
func (d *downloader) getTotalBytes() int64 {
	d.m.Lock()
	defer d.m.Unlock()

	return d.totalBytes
}
169742
func (p *imageProgress) totalBytes() int64 {
	var b int64
	for _, l := range p.layers {
		b += l.totalBytes
	}
	return b
}
226680
func (r *Service) GetBytes(key string) ([]byte, error) {
	c := r.pool.Get()
	defer c.Close()
	if err := c.Err(); err != nil {
		return nil, err
	}

	redisVal, err := c.Do("GET", r.Config.Prefix+key)

	if err != nil {
		return nil, err
	}
	if redisVal == nil {
		return nil, ErrKeyNotFound.Format(key)
	}

	return redis.Bytes(redisVal, err)
}
1131455
func BigToBytes(big *FP256BN.BIG) []byte {
	ret := make([]byte, FieldBytes)
	big.ToBytes(ret)
	return ret
}
908036
func (t *Collection) GetTotals() (numItems uint64, numBytes uint64, err error) {
	rnl := t.rootAddRef()
	defer t.rootDecRef(rnl)
	n := rnl.root
	nNode, err := n.read(t.store)
	if err != nil || n.isEmpty() || nNode == nil {
		return 0, 0, err
	}
	return nNode.numNodes, nNode.numBytes, nil
}
1265048
func GetManyBytes(json []byte, path ...string) []Result {
	res := make([]Result, len(path))
	for i, path := range path {
		res[i] = GetBytes(json, path)
	}
	return res
}
638308
func (l *LabelsSearchResult) GetTotal() int {
	if l == nil || l.Total == nil {
		return 0
	}
	return *l.Total
}
487234
func (u *FakeVolumeUtil) GetBlockCapacityByte(fullPath string) (int64, error) {
	return u.getDirEntryCapacity(fullPath, FakeEntryBlock)
}
1250896
func (o *OrgStats) GetTotalTeamMembers() int {
	if o == nil || o.TotalTeamMembers == nil {
		return 0
	}
	return *o.TotalTeamMembers
}
864207
func (sh *Helper) GetBytes(key string) ([]byte, error) {
	if i, ok := sh.IndexMap[key]; ok {
		if i <= len(sh.submatch) {
			return sh.submatch[i], nil
		}
		return []byte{}, ErrIndexOutOfRange
	}
	return []byte{}, ErrNoSuchKey
}
51480
func JSONToBytes(m map[string]interface{}) (*[]byte, error) {
	b, err := json.Marshal(m)
	if err != nil {
		return nil, err
	}

	return &b, nil
}
998526
func (s *DataTransfer) SetTotalBytes(v int64) *DataTransfer {
	s.TotalBytes = &v
	return s
}
661559
func ReaderToBytes(ior io.Reader) []byte {
	buf := new(bytes.Buffer)
	buf.ReadFrom(ior)
	return buf.Bytes()
}
761271
func (s *TableRestoreStatus) SetTotalDataInMegaBytes(v int64) *TableRestoreStatus {
	s.TotalDataInMegaBytes = &v
	return s
}
1001614
func GetResponseAndBytes(url string) (*http.Response, []byte, error) {
	resp, err := http.Get(url)
	if err != nil {
		return resp, []byte{}, err
	}
	bytes, err := ResponseBody(resp)
	return resp, bytes, err
}
130422
func GetTimeBytes(buf []byte, hour int, min int, sec int) []byte {
	p := hour << 1
	buf[0] = digit2[p]
	buf[1] = digit2[p+1]
	p = min << 1
	buf[2] = digit2[p]
	buf[3] = digit2[p+1]
	p = sec << 1
	buf[4] = digit2[p]
	buf[5] = digit2[p+1]
	return buf[:6]
}
532117
func stringToBytes(s string) []byte {
	// The serialized format is:
	//   <size><string>
	//
	// 4 bytes string size + string
	size := len(s)
	buf := make([]byte, 4+size)
	copy(buf[0:4], uint32ToBytes(uint32(size)))
	copy(buf[4:4+size], s)
	return buf
}