func (b *Buffer) Bytes() []byte {
	return b.buf
}
Bytes returns the internal buffer.
package proto
import (
	"errors"
	"fmt"
	"google.golang.org/protobuf/encoding/prototext"
	"google.golang.org/protobuf/encoding/protowire"
	"google.golang.org/protobuf/runtime/protoimpl"
)
const (
	WireVarint     = 0
	WireFixed32    = 5
	WireFixed64    = 1
	WireBytes      = 2
	WireStartGroup = 3
	WireEndGroup   = 4
)
func EncodeVarint(v uint64) []byte {
	return protowire.AppendVarint(nil, v)
}
func SizeVarint(v uint64) int {
	return protowire.SizeVarint(v)
}
func DecodeVarint(b []byte) (uint64, int) {
	v, n := protowire.ConsumeVarint(b)
	if n < 0 {
		return 0, 0
	}
	return v, n
}
type Buffer struct {
	buf           []byte
	idx           int
	deterministic bool
}
func NewBuffer(buf []byte) *Buffer {
	return &Buffer{buf: buf}
}
func (b *Buffer) SetDeterministic(deterministic bool) {
	b.deterministic = deterministic
}
func (b *Buffer) SetBuf(buf []byte) {
	b.buf = buf
	b.idx = 0
}
func (b *Buffer) Reset() {
	b.buf = b.buf[:0]
	b.idx = 0
}