// SetBytes sets a json value for the specified path.
// If working with bytes, this method preferred over
// Set(string(data), path, value)
347135
func SetBytes(json []byte, path string, value interface{}) ([]byte, error) {
	return SetBytesOptions(json, path, value, nil)
}
484213
func (bi *BigInt) SetBytes(buf []byte) {
	bi.bigint.SetBytes(common.CopyBytes(buf))
}
832926
func (s *SourceTableDetails) SetTableSizeBytes(v int64) *SourceTableDetails {
	s.TableSizeBytes = &v
	return s
}
921495
func (s *Stats) SetBytesReturned(v int64) *Stats {
	s.BytesReturned = &v
	return s
}
1269383
func (t *Torrent) setInfoBytes(b []byte) error {
	if metainfo.HashBytes(b) != t.infoHash {
		return errors.New("info bytes have wrong hash")
	}
	var info metainfo.Info
	if err := bencode.Unmarshal(b, &info); err != nil {
		return fmt.Errorf("error unmarshalling info bytes: %s", err)
	}
	if err := t.setInfo(&info); err != nil {
		return err
	}
	t.metadataBytes = b
	t.metadataCompletedChunks = nil
	t.onSetInfo()
	return nil
}
1360972
func (e *StringDecoder) SetBytes(b []byte) error {
	// First byte stores the encoding type, only have snappy format
	// currently so ignore for now.
	var data []byte
	if len(b) > 0 {
		var err error
		data, err = snappy.Decode(nil, b[1:])
		if err != nil {
			return fmt.Errorf("failed to decode string block: %v", err.Error())
		}
	}

	e.b = data
	e.l = 0
	e.i = 0
	e.err = nil

	return nil
}
675686
func (s *Progress) SetBytesReturned(v int64) *Progress {
	s.BytesReturned = &v
	return s
}
1027687
func (h *Hash) SetBytes(b []byte) {
	if len(b) > len(h) {
		b = b[len(b)-HashLength:]
	}

	copy(h[HashLength-len(b):], b)
}
17475
func (s *ParquetSerDe) SetPageSizeBytes(v int64) *ParquetSerDe {
	s.PageSizeBytes = &v
	return s
}
105950
func (s *GenerateRandomInput) SetNumberOfBytes(v int64) *GenerateRandomInput {
	s.NumberOfBytes = &v
	return s
}
61595
func (f *ServiceFlags) SetBytes(x []byte) {
	var b [4]byte
	copy(b[:], x)
	*f = ServiceFlags(*(*uint32)(unsafe.Pointer(&b)))
}
1244981
func (f *Filter) PBytes() ([]byte, error) {
	filterData := make([]byte, len(f.filterData)+1)
	filterData[0] = f.p
	copy(filterData[1:], f.filterData)
	return filterData, nil
}
675606
func (s *LocalSecondaryIndexDescription) SetIndexSizeBytes(v int64) *LocalSecondaryIndexDescription {
	s.IndexSizeBytes = &v
	return s
}
63769
func (z *ZkPlus) Set(path string, data []byte, version int32) (*zk.Stat, error) {
	z.forPath(path).Log(logkey.ZkMethod, "Set")
	return z.blockOnConn().Set(z.realPath(path), data, version)
}
911571
func (b *Bloom) SetBytes(d []byte) {
	if len(b) < len(d) {
		panic(fmt.Sprintf("bloom bytes too big %d %d", len(b), len(d)))
	}
	copy(b[BloomByteLength-len(d):], d)
}
673611
func CopyBytes(b []byte) (copiedBytes []byte) {
	if b == nil {
		return nil
	}
	copiedBytes = make([]byte, len(b))
	copy(copiedBytes, b)

	return
}
1281613
func Set(path, name string, value []byte) error {
	return syscall.Setxattr(path, name, value, 0)
}