// SkipBytes works like ReadBytes but skips all read data.
540703
func (c *Conn) SkipBytes(delim byte) error {
	for {
		b, err := c.ReadByte()
		if err != nil {
			return err
		}
		if b == delim {
			break
		}
	}
	return nil
}
1346617
func (r *reader) readBytes(n uint32) []byte {
	// Fast path if we're byte aligned
	if r.bitCount == 0 {
		r.pos += n
		if r.pos > r.size {
			_panicf("readBytes: insufficient buffer (%d of %d)", r.pos, r.size)
		}
		return r.buf[r.pos-n : r.pos]
	}

	buf := make([]byte, n)
	for i := uint32(0); i < n; i++ {
		buf[i] = byte(r.readBits(8))
	}
	return buf
}
118773
func (b *ByteBuf) ReadBytes(n int) (int, []byte, error) {
	data := make([]byte, n)
	n, err := b.Read(data)
	return n, data, err
}
818569
func (r *Reader) ReadByte() (byte, error) {
	for r.buffered() < 1 && r.state == nil {
		r.more()
	}
	if r.buffered() < 1 {
		return 0, r.err()
	}
	b := r.data[r.n]
	r.n++
	return b, nil
}
358544
func (r *buffer) ReadByte() (byte, error) {
	if r.off == r.size {
		return 0, io.EOF
	}
	b := r.data[r.off]
	r.off++
	return b, nil
}
346012
func (bd *BinaryDecoder) ReadBytes() ([]byte, error) {
	//TODO make something with these if's!!
	if err := checkEOF(bd.buf, bd.pos, 1); err != nil {
		return nil, EOF
	}
	length, err := bd.ReadLong()
	if err != nil {
		return nil, err
	}
	if length < 0 {
		return nil, NegativeBytesLength
	}
	if err = checkEOF(bd.buf, bd.pos, int(length)); err != nil {
		return nil, EOF
	}

	bytes := make([]byte, length)
	copy(bytes[:], bd.buf[bd.pos:bd.pos+length])
	bd.pos += length
	return bytes, err
}
946942
func skipSpace(r *bufio.Reader) int {
	n := 0
	for {
		c, err := r.ReadByte()
		if err != nil {
			// bufio will keep err until next read.
			break
		}
		if !isSpace(c) {
			r.UnreadByte()
			break
		}
		n++
	}
	return n
}
971352
func (r *importReader) peekByte(skipSpace bool) byte {
	if r.err != nil {
		if r.nerr++; r.nerr > 10000 {
			panic("go/build: import reader looping")
		}
		return 0
	}

	// Use r.peek as first input byte.
	// Don't just return r.peek here: it might have been left by peekByte(false)
	// and this might be peekByte(true).
	c := r.peek
	if c == 0 {
		c = r.readByte()
	}
	for r.err == nil && !r.eof {
		if skipSpace {
			// For the purposes of this reader, semicolons are never necessary to
			// understand the input and are treated as spaces.
			switch c {
			case ' ', '\f', '\t', '\r', '\n', ';':
				c = r.readByte()
				continue

			case '/':
				c = r.readByte()
				if c == '/' {
					for c != '\n' && r.err == nil && !r.eof {
						c = r.readByte()
					}
				} else if c == '*' {
					var c1 byte
					for (c != '*' || c1 != '/') && r.err == nil {
						if r.eof {
							r.syntaxError()
						}
						c, c1 = c1, r.readByte()
					}
				} else {
					r.syntaxError()
				}
				c = r.readByte()
				continue
			}
		}
		break
	}
	r.peek = c
	return r.peek
}
28618
func (b *ByteBuf) ReadByte() (byte, error) {
	if b.Readable() == 0 {
		return 0, nil
	}

	v := b.buf[b.readerIndex]
	b.readerIndex++
	return v, nil
}
411018
func (in *DataInputImpl) SkipBytes(numBytes int64) (err error) {
	assert2(numBytes >= 0, "numBytes must be >= 0, got %v", numBytes)
	if in.skipBuffer == nil {
		in.skipBuffer = make([]byte, SKIP_BUFFER_SIZE)
	}
	assert(len(in.skipBuffer) == SKIP_BUFFER_SIZE)
	var step int
	for skipped := int64(0); skipped < numBytes; {
		step = int(numBytes - skipped)
		if SKIP_BUFFER_SIZE < step {
			step = SKIP_BUFFER_SIZE
		}
		if err = in.ReadBytesBuffered(in.skipBuffer[:step], false); err != nil {
			return
		}
		skipped += int64(step)
	}
	return nil
}
1121232
func (l *Loader) LoadBytes(in []byte) (*config.Values, error) {
	return l.LoadReader(bytes.NewReader(in))
}
439603
func (r *ByteSliceReader) ReadByte() (byte, error) {
	d := []byte{0}
	_, err := r.Read(d)
	return d[0], err
}
770091
func (tr *Reader) RawBytes() []byte {
	if !tr.RawAccounting {
		return nil
	}
	if tr.rawBytes == nil {
		tr.rawBytes = bytes.NewBuffer(nil)
	}
	defer tr.rawBytes.Reset() // if we've read them, then flush them.

	return tr.rawBytes.Bytes()

}
516038
func (d *Decoder) ResetBytes(in []byte) {
	if in == nil {
		return
	}
	d.bytes = true
	d.bufio = false
	// d.typ = entryTypeBytes
	d.rb.reset(in)
	// d.r = &d.rb
	d.resetCommon()
}
1343629
func readBytes(conn *bufio.Reader, bytes *[]byte, length int) (b byte, err error) {
	newbytes := make([]byte, length)
	n, err := conn.Read(newbytes)
	if n != length {
		fmt.Errorf("%d bytes read instead of %d", n, length)
	} else if err != nil {
		return
	}
	*bytes = append(*bytes, newbytes...)
	b = (*bytes)[len(*bytes)-1]
	return
}
947128
func (v Version) DataBytes(l Level) int {
	vt := &vtab[v]
	lev := &vt.level[l]
	return vt.bytes - lev.nblock*lev.check
}
176022
func (s *Slice) ReadByte() (c byte, err error) {
	if len(*s) < 1 {
		return 0, io.EOF
	}

	c = (*s)[0]
	if len(*s) > 1 {
		*s = (*s)[1:]
	} else {
		*s = nil
	}
	return c, nil
}