// GetBinary returns the OGDL object at the position given and the position of the
// next object, or an error. The object returned is in binary form, exactly
// as it is stored in the log.
331884
func (log *Log) GetBinary(i int64) ([]byte, int64, error) {

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

	/* Read until EOS of binary OGDL.

	   There should be a Header first.
	*/
	p := newBinParser(log.f)

	if !p.header() {
		return nil, 0, err
	}
	for {
		lev, _, _ /* typ, b*/ := p.line(false)
		if lev == 0 {
			break
		}
	}

	n := p.n

	// Read bytes
	b := make([]byte, n)
	_, err = log.f.ReadAt(b, i)

	return b, int64(n), err
}
254839
func (d *indirectIndex) MarshalBinary() ([]byte, error) {
	d.mu.RLock()
	defer d.mu.RUnlock()

	return d.b.b, nil
}
995239
func (m *Swaggeroauth2TokenParameters) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
1373930
func (u UUID) MarshalBinary() (data []byte, err error) {
	data = u.Bytes()
	return
}
51382
func (pl *Payload) EncodeBinary(enc *gob.Encoder) error {
	return enc.Encode(pl)
}
23582
func (h TLFReaderKeyBundleID) MarshalBinary() (data []byte, err error) {
	return h.h.MarshalBinary()
}
158620
func (bf *BitField) MarshalBinary() ([]byte, error) {
	ret := make([]byte, binary.MaxVarintLen32+len(bf.data))
	n := binary.PutUvarint(ret, uint64(bf.size))
	n += copy(ret[n:], bf.data)
	return ret[:n], nil
}
1272660
func (m *DaemonConfiguration) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
199537
func (hmac HMAC) MarshalBinary() (data []byte, err error) {
	return hmac.h.MarshalBinary()
}
595870
func (m *DaemonConfigurationSpec) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
715105
func isBinary(h http.Header) bool {
	switch {
	case !isTextMime(h.Get("Content-Type")):
		return true
	case h.Get("Content-Encoding") == "gzip":
		return true
	default:
		return false
	}
}
1042175
func (m *Identity) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
1182124
func (u URL) MarshalBinary() ([]byte, error) {
	uu := url.URL(u)
	return []byte(uu.String()), nil
}
1122835
func (meta *Meta) ReadBinary(r io.Reader) error {
	return binary.Read(r, byteorder.Native, meta)
}
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
}
1012071
func (m *SwaggerNotReadyStatus) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
353611
func (r *ReplyGetattrV2) MarshalBinary() ([]byte, error) {
	return MarshalBinary(&r.Reply, &r.Attr, &r.SymlinkTarget)
}