// Bytes wraps a mutex around the underlying bytes.Buffer function call.
970179
func (b *ByteBuffer) Bytes() []byte {
	b.Lock()
	defer b.Unlock()
	return b.b.Bytes()
}
640466
func Bytes(b0, b1 []byte) int {
	d := 0
	for i, x := range b0 {
		d += Byte(x, b1[i])
	}
	return d
}
368197
func (f File) Bytes() []byte {
	b, err := ioutil.ReadFile(f.Path)
	must(f.Case.T, err)
	return b
}
803971
func (udh *UDH) Bytes() []byte {
	var ret []byte
	ret = append(ret, udh.IEI.Bytes()...)
	ret = append(ret, udh.IELength.Bytes()...)
	ret = append(ret, udh.IEData.Bytes()...)
	return ret
}
693438
func (c *client) Bytes(key string, fallback []byte) []byte {
	if v := c.Getenv(key); v != "" {
		return []byte(v)
	}

	return fallback
}
649308
func (b *BlockHeader) Bytes() []byte {
	asn1Header := asn1Header{
		PreviousHash: b.PreviousHash,
		DataHash:     b.DataHash,
	}
	if b.Number > uint64(math.MaxInt64) {
		panic(fmt.Errorf("Golang does not currently support encoding uint64 to asn1"))
	} else {
		asn1Header.Number = int64(b.Number)
	}
	result, err := asn1.Marshal(asn1Header)
	if err != nil {
		// Errors should only arise for types which cannot be encoded, since the
		// BlockHeader type is known a-priori to contain only encodable types, an
		// error here is fatal and should not be propogated
		panic(err)
	}
	return result
}
1106204
func (r *Lexer) Bytes() []byte {
	if r.token.kind == tokenUndef && r.Ok() {
		r.FetchToken()
	}
	if !r.Ok() || r.token.kind != tokenString {
		r.errInvalidToken("string")
		return nil
	}
	ret := make([]byte, base64.StdEncoding.DecodedLen(len(r.token.byteValue)))
	n, err := base64.StdEncoding.Decode(ret, r.token.byteValue)
	if err != nil {
		r.fatalError = &LexerError{
			Reason: err.Error(),
		}
		return nil
	}

	r.consume()
	return ret[:n]
}
1157780
func Bytes(l int, dev string) ([]byte, error) {
	if l <= 0 {
		return nil, e.New(ErrInvalidLength)
	}
	switch dev {
	case "go":
		b := make([]byte, l)
		for i := 0; i < l; i++ {
			b[i] = byte(rand.Intn(255))
		}
		return b, nil
	case "go-crypto":
		b := make([]byte, l)
		n, err := io.ReadFull(crypto.Reader, b)
		if n != len(b) || err != nil {
			return nil, e.Forward(err)
		}
		return b, nil
	default:
		f, err := os.Open(dev)
		if err != nil {
			return nil, e.Forward(err)
		}
		b := make([]byte, l)
		f.Read(b)
		f.Close()
		return b, nil
	}
	panic("don't get here")
}
79414
func (b *Buffer) Bytes() []byte {
	if b.Len() == 0 {
		return nil
	}

	m := make([]byte, 0, b.Len())
	idx := b.fidx
	for cur := b.first; cur != nil; cur = cur.next {
		m = append(m, cur.Bytes()[idx:]...)
		idx = 0
	}
	return m
}
227165
func (x FixInt) Bytes() []byte {
	b := []byte{0, 0, 0, 0, 0, 0, 0, 0}
	y := int64(x)
	b[0] = byte((y >> 56) & 0xFF)
	b[1] = byte((y >> 48) & 0xFF)
	b[2] = byte((y >> 40) & 0xFF)
	b[3] = byte((y >> 32) & 0xFF)
	b[4] = byte((y >> 24) & 0xFF)
	b[5] = byte((y >> 16) & 0xFF)
	b[6] = byte((y >> 8) & 0xFF)
	b[7] = byte(y & 0xFF)
	return b
}
201788
func (htmlDoc *htmlDocument) bytes() []byte {
	bf := &bytes.Buffer{}
	for _, e := range htmlDoc.elements {
		e.write(bf, startIndent)
	}
	return bf.Bytes()
}
1052520
func Bytes(a, b []byte) []Change {
	return Diff(len(a), len(b), &bytes{a, b})
}
346242
func (buf *Buffer) Bytes() []byte {
	if buf.buf == nil {
		return nil
	}

	p := make([]byte, buf.Len())
	buf.Read(p)
	buf.Close()
	return p
}
1105990
func (f *Buffer) Bytes() []byte {
	if f.isClosed || f.Index >= int64(f.Buff.Len()) {
		return []byte{}
	}
	return f.Buff.Bytes()[f.Index:]
}
978991
func (x VarInt) Bytes() []byte {
	b := []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0} // 9.14 bytes are needed
	ux := uint64(x) << 1
	if x < 0 {
		ux = ^ux
	}
	pos := 0
	for {
		b[pos] = byte((ux & 0x7F) | 0x80)
		pos++
		if ux >= 128 {
			ux >>= 7
		} else {
			break
		}
	}
	b[pos-1] &= 0x7F
	return b[0:pos]
}
840568
func Bytes(s string) []byte {
	if !Enable {
		return []byte(s)
	}
	pstring := (*reflect.StringHeader)(unsafe.Pointer(&s))
	return BytesFromPtr(pstring.Data, pstring.Len)
}
877514
func Bytes(n int) []byte {
	b := make([]byte, n)
	Read(b)
	return b
}