// newBinaryEqualsFunc - returns new BinaryEquals function.
552581
func newBinaryEqualsFunc(key Key, values ValueSet) (Function, error) {
	valueStrings, err := valuesToStringSlice(binaryEquals, values)
	if err != nil {
		return nil, err
	}

	return NewBinaryEqualsFunc(key, valueStrings...)
}
1152986
func NewBinance(client *http.Client, channels *BotChannels) (binance Exchange, err error) {
	reqs := newRequests()
	reqs.price, err = http.NewRequest(http.MethodGet, BinanceURLs.Price, nil)
	if err != nil {
		return
	}

	reqs.depth, err = http.NewRequest(http.MethodGet, BinanceURLs.Depth, nil)
	if err != nil {
		return
	}

	for dur, url := range BinanceURLs.Candlesticks {
		reqs.candlesticks[dur], err = http.NewRequest(http.MethodGet, url, nil)
		if err != nil {
			return
		}
	}
	binance = &BinanceExchange{
		CommonExchange: newCommonExchange(Binance, client, reqs, channels),
	}
	return
}
61723
func (br *BytesRef) bytesEquals(other []byte) bool {
	if br.Length != len(other) {
		return false
	}
	for i, v := range br.ToBytes() {
		if v != other[i] {
			return false
		}
	}
	return true
}
1039321
func (s Slice) GetBinary() ([]byte, error) {
	if !s.IsBinary() {
		return nil, InvalidTypeError{"Expecting type Binary"}
	}

	h := s.head()
	vpackAssert(h >= 0xc0 && h <= 0xc7)

	lengthSize := uint(h - 0xbf)
	length := readIntegerNonEmpty(s[1:], lengthSize)
	checkOverflow(ValueLength(length))
	return s[1+lengthSize : 1+uint64(lengthSize)+length], nil
}
686674
func doubleNativeFromBinary(buf []byte) (interface{}, []byte, error) {
	if len(buf) < doubleEncodedLength {
		return nil, nil, fmt.Errorf("cannot decode binary double: %s", io.ErrShortBuffer)
	}
	return math.Float64frombits(binary.LittleEndian.Uint64(buf[:doubleEncodedLength])), buf[doubleEncodedLength:], nil
}
1275134
func (p PackageVersionAnsPayload) MarshalBinary() ([]byte, error) {
	return []byte{
		p.PackageIdentifier,
		p.PackageVersion,
	}, nil
}
184540
func (p NewChannelAnsPayload) MarshalBinary() ([]byte, error) {
	var b byte
	if p.ChannelFrequencyOK {
		b = (1 << 0)
	}
	if p.DataRateRangeOK {
		b = b ^ (1 << 1)
	}
	return []byte{b}, nil
}
973004
func bytesEqual(x, y []byte) bool {
	if len(x) != len(y) {
		return false
	}
	for i, b := range x {
		if b != y[i] {
			return false
		}
	}
	return true
}
441299
func (o Options) MarshalBinary() ([]byte, error) {
	b := buffer.New(nil)
	for _, code := range o.sortedCodes() {
		for _, data := range o[code] {
			// 2 bytes: option code
			b.Write16(uint16(code))

			// 2 bytes: option length
			b.Write16(uint16(len(data)))

			// N bytes: option data
			b.WriteBytes(data)
		}
	}
	return b.Data(), nil
}
1218588
func (c ColumnElem) DoesNotEqual(i interface{}) BinaryClause {
	return BinaryClause{
		Pre:  c,
		Post: &Parameter{i},
		Sep:  " != ",
	}
}
397037
func bytesNativeFromBinary(buf []byte) (interface{}, []byte, error) {
	if len(buf) < 1 {
		return nil, nil, fmt.Errorf("cannot decode binary bytes: %s", io.ErrShortBuffer)
	}
	var decoded interface{}
	var err error
	if decoded, buf, err = longNativeFromBinary(buf); err != nil {
		return nil, nil, fmt.Errorf("cannot decode binary bytes: %s", err)
	}
	size := decoded.(int64) // always returns int64
	if size < 0 {
		return nil, nil, fmt.Errorf("cannot decode binary bytes: negative size: %d", size)
	}
	if size > int64(len(buf)) {
		return nil, nil, fmt.Errorf("cannot decode binary bytes: %s", io.ErrShortBuffer)
	}
	return buf[:size], buf[size:], nil
}
609870
func NewBinaryInfo(goos, goarch string) *BinaryInfo {
	r := &BinaryInfo{GOOS: goos, nameOfRuntimeType: make(map[uintptr]nameOfRuntimeTypeEntry), typeCache: make(map[dwarf.Offset]godwarf.Type)}

	// TODO: find better way to determine proc arch (perhaps use executable file info).
	switch goarch {
	case "amd64":
		r.Arch = AMD64Arch(goos)
	}

	return r
}
1112855
func (m *EndpointConfigurationSpec) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
311173
func (r *SystemBootOptionsResponse) MarshalBinary() ([]byte, error) {
	buf := make([]byte, 3+len(r.Data))
	buf[0] = byte(r.CompletionCode)
	buf[1] = r.Version
	buf[2] = r.Param
	copy(buf[3:], r.Data)
	return buf, nil
}
319596
func (m *GenericError) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
810344
func CreateBinary(in interface{}) BinaryJSON {
	typeCode, buf, err := appendBinary(nil, in)
	if err != nil {
		panic(err)
	}
	return BinaryJSON{TypeCode: typeCode, Value: buf}
}
1188369
func (m *SwaggerOAuthIntrospectionRequest) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}