// This is the point of Bytes.
192120
func (bz *HexBytes) UnmarshalJSON(data []byte) error {
	if len(data) < 2 || data[0] != '"' || data[len(data)-1] != '"' {
		return fmt.Errorf("Invalid hex string: %s", data)
	}
	bz2, err := hex.DecodeString(string(data[1 : len(data)-1]))
	if err != nil {
		return err
	}
	*bz = bz2
	return nil
}
1319077
func (r *Request) Bytes() ([]byte, error) {
	if r.body != nil {
		return r.body, nil
	}
	resp, err := r.getResponse()
	if err != nil {
		return nil, err
	}
	if resp.Body == nil {
		return nil, nil
	}
	defer resp.Body.Close()
	data, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return nil, err
	}
	r.body = data
	return data, nil
}
30292
func Bytes(n int) []byte {
	b := make([]byte, n)
	_, err := rand.Read(b)
	if err != nil {
		panic(err)
	}
	return b
}
810733
func HumanBytes(bytes float64, si bool) string {
	var base = 1024
	pre := []string{"K", "M", "G", "T", "P", "E"}
	var post = "B"
	if si {
		base = 1000
		pre = []string{"k", "M", "G", "T", "P", "E"}
		post = "iB"
	}
	if bytes < float64(base) {
		return fmt.Sprintf("%.2f B", bytes)
	}
	exp := int(math.Log(bytes) / math.Log(float64(base)))
	index := exp - 1
	units := pre[index] + post
	return fmt.Sprintf("%.2f %s", bytes/math.Pow(float64(base), float64(exp)), units)
}
1052520
func Bytes(a, b []byte) []Change {
	return Diff(len(a), len(b), &bytes{a, b})
}
790561
func (f *FakeRNG) Bytes(bytes int) ([]byte, error) {
	// create bytes long array
	b := make([]byte, bytes)

	for i := 0; i < len(b); i++ {
		b[i] = byte(i)
	}

	return b, nil
}
877514
func Bytes(n int) []byte {
	b := make([]byte, n)
	Read(b)
	return b
}
443432
func (m *Message) Bytes() ([]byte, error) {
	buffer := &bytes.Buffer{}
	_, err := m.WriteTo(buffer)
	return buffer.Bytes(), err
}
970179
func (b *ByteBuffer) Bytes() []byte {
	b.Lock()
	defer b.Unlock()
	return b.b.Bytes()
}
1078985
func (b *WriteAtBuffer) Bytes() []byte {
	b.m.Lock()
	defer b.m.Unlock()
	return b.buf
}
929382
func (b *HttpRequest) Bytes() ([]byte, error) {
	if b.body != nil {
		return b.body, nil
	}
	resp, err := b.getResponse()
	if err != nil {
		return nil, err
	}
	if resp.Body == nil {
		return nil, nil
	}
	defer resp.Body.Close()
	if b.setting.Gzip && resp.Header.Get("Content-Encoding") == "gzip" {
		reader, err := gzip.NewReader(resp.Body)
		if err != nil {
			return nil, err
		}
		b.body, err = ioutil.ReadAll(reader)
	} else {
		b.body, err = ioutil.ReadAll(resp.Body)
	}
	return b.body, err
}
1273749
func (v *Variable) Bytes() []byte {
	if len(v.Data) > 0 && v.Data[len(v.Data)-1] == 0x00 {
		return v.Data
	}
	return append(v.Data, 0x00)
}
40548
func (fs *FileSet) bytes() int {
	var b int
	// 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
}
510022
func (s *SeriesLong) Bytes() []byte {
	s.Lock()
	defer s.Unlock()
	return s.bw.bytes()
}
1213391
func (r *Response) Bytes() []byte {
	if r.Error != nil {
		return nil
	}

	r.populateResponseByteBuffer()

	// Are we still empty?
	if r.buffer.Len() == 0 {
		return nil
	}
	return r.buffer.Bytes()
}
1278695
func (i Int) Bytes() []byte {
	return []byte{
		byte(int32(i) >> 24),
		byte(int32(i) >> 16),
		byte((int32(i) >> 8)),
		byte(i),
	}
}
296453
func (m *OutMessage) Bytes() []byte {
	l := m.Len()
	sh := reflect.SliceHeader{
		Data: uintptr(unsafe.Pointer(&m.header)),
		Len:  l,
		Cap:  l,
	}

	return *(*[]byte)(unsafe.Pointer(&sh))
}