// GetBytes returns the result of applying a path to the given Graph.
// The result is returned as a byte slice.
967469
func (g *Graph) GetBytes(path string) ([]byte, error) {

	if len(path) == 0 {
		return g.Bytes(), nil
	}

	i := g.Get(path)
	if i == nil {
		return nil, errors.New("not found")
	}
	if i.Len() == 0 {
		return nil, errors.New("Get() design error: not subnodes")
	}
	return _bytes(i.Out[0].This), nil
}
1184087
func Get(out interface{}, path string) interface{} {
	result := get(reflect.ValueOf(out), path)

	if result.Kind() != reflect.Invalid {
		return result.Interface()
	}

	return nil
}
34992
func getBytes(f *flag.Flag) (int64, error) {
	var res map[string]interface{}
	// Use NATS parser to do the conversion for us.
	res, err := conf.Parse(fmt.Sprintf("bytes: %v", f.Value.String()))
	if err != nil {
		return 0, err
	}
	resVal := res["bytes"]
	if resVal == nil || reflect.TypeOf(resVal).Kind() != reflect.Int64 {
		return 0, fmt.Errorf("%v should be a size, got '%v'", f.Name, resVal)
	}
	return resVal.(int64), nil
}
1260579
func (r Row) GetBytes(colIdx int) []byte {
	col := r.c.columns[colIdx]
	start, end := col.offsets[r.idx], col.offsets[r.idx+1]
	return col.data[start:end]
}
1001392
func (r *reader) readByte() byte {
	// Fast path if we're byte aligned
	if r.bitCount == 0 {
		return r.nextByte()
	}

	return byte(r.readBits(8))
}
652507
func getBytes(json []byte, path string) Result {
	var result Result
	if json != nil {
		// unsafe cast to string
		result = Get(*(*string)(unsafe.Pointer(&json)), path)
		// safely get the string headers
		rawhi := *(*reflect.StringHeader)(unsafe.Pointer(&result.Raw))
		strhi := *(*reflect.StringHeader)(unsafe.Pointer(&result.Str))
		// create byte slice headers
		rawh := reflect.SliceHeader{Data: rawhi.Data, Len: rawhi.Len}
		strh := reflect.SliceHeader{Data: strhi.Data, Len: strhi.Len}
		if strh.Data == 0 {
			// str is nil
			if rawh.Data == 0 {
				// raw is nil
				result.Raw = ""
			} else {
				// raw has data, safely copy the slice header to a string
				result.Raw = string(*(*[]byte)(unsafe.Pointer(&rawh)))
			}
			result.Str = ""
		} else if rawh.Data == 0 {
			// raw is nil
			result.Raw = ""
			// str has data, safely copy the slice header to a string
			result.Str = string(*(*[]byte)(unsafe.Pointer(&strh)))
		} else if strh.Data >= rawh.Data &&
			int(strh.Data)+strh.Len <= int(rawh.Data)+rawh.Len {
			// Str is a substring of Raw.
			start := int(strh.Data - rawh.Data)
			// safely copy the raw slice header
			result.Raw = string(*(*[]byte)(unsafe.Pointer(&rawh)))
			// substring the raw
			result.Str = result.Raw[start : start+strh.Len]
		} else {
			// safely copy both the raw and str slice headers to strings
			result.Raw = string(*(*[]byte)(unsafe.Pointer(&rawh)))
			result.Str = string(*(*[]byte)(unsafe.Pointer(&strh)))
		}
	}
	return result
}
347135
func SetBytes(json []byte, path string, value interface{}) ([]byte, error) {
	return SetBytesOptions(json, path, value, nil)
}
420441
func HTTPGetBytes(client *http.Client, url string, header http.Header) ([]byte, error) {
	rc, err := HTTPGet(client, url, header)
	if err != nil {
		return nil, err
	}
	defer rc.Close()
	return ioutil.ReadAll(rc)
}
388156
func (log *Log) Get(i int64) (*Graph, int64, error) {

	/* Position in file */
	_, err := log.f.Seek(i, 0)
	if err != nil {
		return nil, -1, err
	}

	p := newBinParser(log.f)
	g := p.parse()

	if p.n == 0 {
		return g, -1, nil
	}

	return g, i + int64(p.n), err
}
7491
func DecodePathBytes(path []byte) []byte {
	var expression = regexp.MustCompile(`\\[0-9]{3}`)
	var buffer bytes.Buffer

	// strip quotes if any
	if len(path) > 2 && path[0] == '"' && path[len(path)-1] == '"' {
		path = path[1 : len(path)-1]
	}

	base := 0
	for _, submatches := range expression.FindAllSubmatchIndex(path, -1) {
		buffer.Write(path[base:submatches[0]])

		match := string(path[submatches[0]+1 : submatches[0]+4])

		k, err := strconv.ParseUint(match, 8, 64)
		if err != nil {
			return path
		} // abort on error

		buffer.Write([]byte{byte(k)})
		base = submatches[1]
	}

	buffer.Write(path[base:len(path)])

	return buffer.Bytes()
}
927093
func (r *AnalyticsResults) NextBytes() []byte {
	if r.streamResult.Closed() {
		return nil
	}

	raw, err := r.streamResult.NextBytes()
	if err != nil {
		r.err = err
		return nil
	}

	return raw
}
947128
func (v Version) DataBytes(l Level) int {
	vt := &vtab[v]
	lev := &vt.level[l]
	return vt.bytes - lev.nblock*lev.check
}
461316
func GetIntBytes(buf []byte, i int64) []byte {
	if i == 0 {
		return []byte{'0'}
	}
	if i == math.MinInt64 {
		return minInt64Buf[:]
	}
	var sign byte
	if i < 0 {
		sign = '-'
		i = -i
	}
	off := len(buf)
	var q, p int64
	for i >= 100 {
		q = i / 1000
		p = (i - (q * 1000)) * 3
		i = q
		off -= 3
		buf[off] = digit3[p]
		buf[off+1] = digit3[p+1]
		buf[off+2] = digit3[p+2]
	}
	if i >= 10 {
		q = i / 100
		p = (i - (q * 100)) * 2
		i = q
		off -= 2
		buf[off] = digit2[p]
		buf[off+1] = digit2[p+1]
	}
	if i > 0 {
		off--
		buf[off] = digits[i]
	}
	if sign == '-' {
		off--
		buf[off] = sign
	}
	return buf[off:]
}
981551
func (r *ByteReader) ReadByte() (byte, error) {
	if r.off >= len(r.buf) {
		return 0, io.EOF
	}
	return r.readByte(), nil
}
1184223
func (gp *GoPdf) GetBytesPdf() []byte {
	b, err := gp.GetBytesPdfReturnErr()
	if err != nil {
		log.Fatalf("%s", err.Error())
	}
	return b
}
20770
func (f *GFile) GetPath() string {
	return gostring(gstring(C.g_file_get_path(f.GFile)))
}
327405
func (d *downloader) getTotalBytes() int64 {
	d.m.Lock()
	defer d.m.Unlock()

	return d.totalBytes
}