// Decode accepts a packed byte array and populates the fields of the Attitude
500287
func (m *Attitude) Decode(buf []byte) {
	data := bytes.NewBuffer(buf)
	binary.Read(data, binary.LittleEndian, &m.TIME_BOOT_MS)
	binary.Read(data, binary.LittleEndian, &m.ROLL)
	binary.Read(data, binary.LittleEndian, &m.PITCH)
	binary.Read(data, binary.LittleEndian, &m.YAW)
	binary.Read(data, binary.LittleEndian, &m.ROLLSPEED)
	binary.Read(data, binary.LittleEndian, &m.PITCHSPEED)
	binary.Read(data, binary.LittleEndian, &m.YAWSPEED)
}
230228
func (a *AcceptChannel) Decode(r io.Reader, pver uint32) error {
	return ReadElements(r,
		a.PendingChannelID[:],
		&a.DustLimit,
		&a.MaxValueInFlight,
		&a.ChannelReserve,
		&a.HtlcMinimum,
		&a.MinAcceptDepth,
		&a.CsvDelay,
		&a.MaxAcceptedHTLCs,
		&a.FundingKey,
		&a.RevocationPoint,
		&a.PaymentPoint,
		&a.DelayedPaymentPoint,
		&a.HtlcPoint,
		&a.FirstCommitmentPoint,
	)
}
59143
func (f *FundingSigned) Decode(r io.Reader, pver uint32) error {
	return ReadElements(r, &f.ChanID, &f.CommitSig)
}
360072
func (message *Message) decode(decoder *gob.Decoder) {
	err := decoder.Decode(&message)
	if err != nil {
		Logln("Can't encode", err)
	}
}
1069301
func Decode(m []byte) (context.Context, error) {
	if len(m) == 0 {
		// TODO maybe return an error
		return nil, nil
	}
	mp := make(map[string]interface{}, 0)
	err := json.Unmarshal(m, &mp)
	if err != nil {
		return nil, err
	}
	return FromMap(mp), nil
}
1169574
func Decode(input string) ([]byte, error) {
	if len(input) == 0 {
		return nil, ErrEmptyString
	}
	if !has0xPrefix(input) {
		return nil, ErrMissingPrefix
	}
	b, err := hex.DecodeString(input[2:])
	if err != nil {
		err = mapError(err)
	}
	return b, err
}
360732
func (jsonEncoderDecoder) Decode(data []byte, v interface{}) error {
	return json.Unmarshal(data, v)
}
1208694
func (m *GpsStatus) Decode(buf []byte) {
	data := bytes.NewBuffer(buf)
	binary.Read(data, binary.LittleEndian, &m.SATELLITES_VISIBLE)
	binary.Read(data, binary.LittleEndian, &m.SATELLITE_PRN)
	binary.Read(data, binary.LittleEndian, &m.SATELLITE_USED)
	binary.Read(data, binary.LittleEndian, &m.SATELLITE_ELEVATION)
	binary.Read(data, binary.LittleEndian, &m.SATELLITE_AZIMUTH)
	binary.Read(data, binary.LittleEndian, &m.SATELLITE_SNR)
}
315683
func (j *jsonEncoder) Decode(data []byte, v interface{}) error {
	return json.Unmarshal(data, v)
}
871759
func (t *StateUpdateReply) Decode(r io.Reader, pver uint32) error {
	return ReadElements(r,
		&t.Code,
		&t.LastApplied,
	)
}
8326
func Decode(src []byte, mode int) (inst Inst, err error) {
	return decode1(src, mode, false)
}
1309879
func (m *Unmarshaller) Decode(r io.Reader, obj interface{}) error {
	m.reader.r = r
	err := m.unmarshal.Unmarshal(obj)
	m.reader.r = nil
	return err
}
794602
func Decode(dst, src []byte) ([]byte, error) {
	dLen, _, err := decodedLen(src)
	if err != nil {
		return nil, err
	}
	if len(dst) < dLen {
		dst = make([]byte, dLen)
	}
	if dLen == 0 {
		return dst[:0], nil
	}

	tLen := C.size_t(dLen)
	status := C.snappy_uncompress((*C.char)(unsafe.Pointer(&src[0])), C.size_t(len(src)),
		(*C.char)(unsafe.Pointer(&dst[0])), &tLen)
	if status != C.SNAPPY_OK {
		return nil, ErrCorrupt
	}
	return dst[:tLen], nil
}
881337
func (d *Decoder) Decode(v interface{}) error {
	var err error
	d.tval, err = LoadReader(d.r)
	if err != nil {
		return err
	}
	return d.unmarshal(v)
}
298907
func (decoder *RawDecoder) Decode(in *ByteBuf) (bool, interface{}, error) {
	_, data, err := in.ReadMarkedBytes()

	if err != nil {
		return true, data, err
	}

	return true, data, nil
}
1084435
func (mock *Mock) Decode(data []byte) ([]*FileDataEntry, error) {
	items := mock.getReturnValues("Decode")
	if len(items) == 1 {
		switch typed := items[0].(type) {
		case []*FileDataEntry:
			return typed, nil
		case error:
			return []*FileDataEntry{}, typed
		}
	} else if len(items) == 2 {
		return items[0].([]*FileDataEntry), items[1].(error)
	}
	return []*FileDataEntry{}, nil
}
209720
func (d *Decoder) Decode(raw interface{}) error {
	return d.decode("", raw, reflect.ValueOf(d.config.Result).Elem())
}