// Bytes implements the Data interface.
496600
func (us *UnSme) Bytes() []byte {
	var ret []byte
	ret = append(ret, us.Ton.Bytes()...)
	ret = append(ret, us.Npi.Bytes()...)
	ret = append(ret, us.DestAddr.Bytes()...)
	ret = append(ret, us.ErrCode.Bytes()...)
	return ret
}
80731
func (c Context) Bytes(key string, val []byte) Context {
	c.l.context = enc.AppendBytes(enc.AppendKey(c.l.context, key), val)
	return c
}
551325
func (r *Reply) Bytes() ([]byte, error) {
	if r.Type() == ReplyNil {
		return nil, ErrNil
	}
	if r.Type() != ReplyString && r.Type() != ReplyStatus {
		return nil, ErrType
	}
	return r.stringValue, nil
}
621125
func (r *Rx) Bytes() (tx, rx []byte) {
	return r.tx.Bytes(), r.rx.Bytes()
}
877946
func (dsl *DestSmeList) Bytes() []byte {
	var ret []byte
	for i := range dsl.Data {
		ret = append(ret, dsl.Data[i].Bytes()...)
	}
	return ret
}
196497
func (b *Block) Bytes() ([]byte, error) {
	// Return the cached serialized bytes if it has already been generated.
	if len(b.serializedBlock) != 0 {
		return b.serializedBlock, nil
	}

	// Serialize the MsgBlock.
	w := bytes.NewBuffer(make([]byte, 0, b.msgBlock.SerializeSize()))
	err := b.msgBlock.Serialize(w)
	if err != nil {
		return nil, err
	}
	serializedBlock := w.Bytes()

	// Cache the serialized bytes and return them.
	b.serializedBlock = serializedBlock
	return serializedBlock, nil
}
885735
func Bytes() ([]byte, error) {
	gr, err := gzip.NewReader(bytes.NewBuffer(gzipped))
	if err != nil {
		return nil, err
	}
	return ioutil.ReadAll(gr)
}
1089667
func (p Ping) Bytes() []byte {
	data, _ := json2.Marshal(p)
	return data
}
1213391
func (r *Response) Bytes() []byte {
	if r.Error != nil {
		return nil
	}

	r.populateResponseByteBuffer()

	// Are we still empty?
	if r.buffer.Len() == 0 {
		return nil
	}
	return r.buffer.Bytes()
}
1239868
func (f *FAT) Bytes() []byte {
	result := make([]byte, f.bs.SectorsPerFat*uint32(f.bs.BytesPerSector))

	for i, entry := range f.entries {
		switch f.bs.FATType() {
		case FAT12:
			f.writeEntry12(result, i, entry)
		case FAT16:
			f.writeEntry16(result, i, entry)
		default:
			f.writeEntry32(result, i, entry)
		}
	}

	return result
}
628348
func (ds *DestSme) Bytes() []byte {
	var ret []byte
	ret = append(ret, ds.Flag.Bytes()...)
	ret = append(ret, ds.Ton.Bytes()...)
	ret = append(ret, ds.Npi.Bytes()...)
	ret = append(ret, ds.DestAddr.Bytes()...)
	return ret
}
469301
func Bytes(b []byte, method crypto.Hash) (string, error) {
	h, err := createHash(method)
	if err != nil {
		return "", err
	}
	io.WriteString(h, string(b))
	return fmt.Sprintf("%x", h.Sum(nil)), nil
}
349354
func (w *singleWriterReader) Bytes() []byte {
	w.mu.Lock()
	defer w.mu.Unlock()

	return append(w.b2.Bytes(), w.b.Bytes()...)
}
702210
func (f *Filter) Bytes() ([]byte, error) {
	filterData := make([]byte, len(f.filterData))
	copy(filterData, f.filterData)
	return filterData, nil
}
283146
func (m *Message) Bytes() io.Reader {
	var b = new(bytes.Buffer)

	for k, vs := range m.Content.Headers {
		for _, v := range vs {
			b.WriteString(k + ": " + v + "\r\n")
		}
	}

	b.WriteString("\r\n")
	b.WriteString(m.Content.Body)

	return b
}
1079594
func (ae *AttributeEncoder) Bytes(typ uint16, b []byte) {
	if ae.err != nil {
		return
	}

	ae.attrs = append(ae.attrs, Attribute{
		Type: typ,
		Data: b,
	})
}
1025221
func (h Headers) Bytes() []byte {
	b := make([]byte, 0, 1024)
	for i := 0; i < len(h); i += 2 {
		b = append(b, h[i]+":"+h[i+1]+"\n"...)
	}
	return b
}