// Decode accepts a packed byte array and populates the fields of the HilState
175862
func (m *HilState) Decode(buf []byte) {
	data := bytes.NewBuffer(buf)
	binary.Read(data, binary.LittleEndian, &m.TIME_USEC)
	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)
	binary.Read(data, binary.LittleEndian, &m.LAT)
	binary.Read(data, binary.LittleEndian, &m.LON)
	binary.Read(data, binary.LittleEndian, &m.ALT)
	binary.Read(data, binary.LittleEndian, &m.VX)
	binary.Read(data, binary.LittleEndian, &m.VY)
	binary.Read(data, binary.LittleEndian, &m.VZ)
	binary.Read(data, binary.LittleEndian, &m.XACC)
	binary.Read(data, binary.LittleEndian, &m.YACC)
	binary.Read(data, binary.LittleEndian, &m.ZACC)
}
796170
func (i *ID) Decode(b []byte) error {
	if len(b) != IDLength {
		return ErrInvalidIDLength
	}

	res, err := strconv.ParseUint(unsafeBytesToString(b), 16, 64)
	if err != nil {
		return err
	}

	if *i = ID(res); !i.Valid() {
		return ErrInvalidID
	}
	return nil
}
132841
func (decoder StringDecoder) Decode(in *goetty.ByteBuf) (bool, interface{}, error) {
	_, data, err := in.ReadMarkedBytes()

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

	return true, string(data), nil
}
37541
func (m *EncapsulatedData) Decode(buf []byte) {
	data := bytes.NewBuffer(buf)
	binary.Read(data, binary.LittleEndian, &m.SEQNR)
	binary.Read(data, binary.LittleEndian, &m.DATA)
}
1005189
func (d *YAMLToJSONDecoder) Decode(into interface{}) error {
	if d.scanner.Scan() {
		data, err := yaml.YAMLToJSON(d.scanner.Bytes())
		if err != nil {
			return err
		}
		return json.Unmarshal(data, into)
	}
	err := d.scanner.Err()
	if err == nil {
		err = io.EOF
	}
	return err
}
88846
func (d *Decoder) Decode(v interface{}) error {
	b, err := ioutil.ReadAll(d.r)
	if err != nil {
		return err
	}
	return d.cfg.Unmarshal(b, v)
}
298189
func (c *Cap) Decode(r io.Reader) error {
	d := &decoder{r: asByteReader(r)}
	c.decode(d)
	return d.err
}
252226
func (u *NumberDecoder) Decode(data []byte, v interface{}) error {
	dec := json.NewDecoder(bytes.NewReader(data))
	dec.UseNumber()
	return dec.Decode(v)
}
432757
func (up *Unsubscribe) Decode(src []byte) (int, error) {
	total := 0

	// decode header
	hl, _, rl, err := headerDecode(src[total:], UNSUBSCRIBE)
	total += hl
	if err != nil {
		return total, err
	}

	// check buffer length
	if len(src) < total+2 {
		return total, makeError(up.Type(), "insufficient buffer size, expected %d, got %d", total+2, len(src))
	}

	// read packet id
	up.ID = ID(binary.BigEndian.Uint16(src[total:]))
	total += 2

	// check packet id
	if !up.ID.Valid() {
		return total, makeError(up.Type(), "packet id must be grater than zero")
	}

	// prepare counter
	tl := int(rl) - 2

	// reset topics
	up.Topics = up.Topics[:0]

	for tl > 0 {
		// read topic
		t, n, err := readLPString(src[total:], up.Type())
		total += n
		if err != nil {
			return total, err
		}

		// append to list
		up.Topics = append(up.Topics, t)

		// decrement counter
		tl = tl - n - 1
	}

	// check for empty list
	if len(up.Topics) == 0 {
		return total, makeError(up.Type(), "empty topic list")
	}

	return total, nil
}
1243069
func (j JSONStateSerializer) Deserialize(serialized string, state interface{}) error {
	err := json.NewDecoder(strings.NewReader(serialized)).Decode(state)
	return err
}
225559
func (jd *JSONDecoder) Decode(byteSet []byte) ([]*FileDataEntry, error) {
	if len(byteSet) == 0 {
		return []*FileDataEntry{}, nil
	}
	// Decode to type-specific structure
	jsonFile := jsonFile{}
	err := json.Unmarshal(byteSet, &jsonFile)
	if err != nil {
		return nil, fmt.Errorf("failed to decode json file: %v", err)
	}
	// Convert to common file data entry list structure
	var dataEntries []*FileDataEntry
	for _, dataEntry := range jsonFile.Data {
		dataEntries = append(dataEntries, &FileDataEntry{Key: dataEntry.Key, Value: dataEntry.Value})
	}
	return dataEntries, nil
}
387055
func (m *SimState) Decode(buf []byte) {
	data := bytes.NewBuffer(buf)
	binary.Read(data, binary.LittleEndian, &m.Q1)
	binary.Read(data, binary.LittleEndian, &m.Q2)
	binary.Read(data, binary.LittleEndian, &m.Q3)
	binary.Read(data, binary.LittleEndian, &m.Q4)
	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.XACC)
	binary.Read(data, binary.LittleEndian, &m.YACC)
	binary.Read(data, binary.LittleEndian, &m.ZACC)
	binary.Read(data, binary.LittleEndian, &m.XGYRO)
	binary.Read(data, binary.LittleEndian, &m.YGYRO)
	binary.Read(data, binary.LittleEndian, &m.ZGYRO)
	binary.Read(data, binary.LittleEndian, &m.LAT)
	binary.Read(data, binary.LittleEndian, &m.LON)
	binary.Read(data, binary.LittleEndian, &m.ALT)
	binary.Read(data, binary.LittleEndian, &m.STD_DEV_HORZ)
	binary.Read(data, binary.LittleEndian, &m.STD_DEV_VERT)
	binary.Read(data, binary.LittleEndian, &m.VN)
	binary.Read(data, binary.LittleEndian, &m.VE)
	binary.Read(data, binary.LittleEndian, &m.VD)
}
154331
func (l *LogUpdate) Decode(r io.Reader) error {
	return ReadElements(r, &l.LogIndex, &l.UpdateMsg)
}
1328694
func (mr *MockPacketDecoderMockRecorder) Decode(data interface{}) *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Decode", reflect.TypeOf((*MockPacketDecoder)(nil).Decode), data)
}
219314
func (codec *StringCodec) Decode(in *ByteBuf) (bool, interface{}, error) {
	value := string(in.GetMarkedRemindData())
	in.MarkedBytesReaded()
	return true, value, nil
}
1319591
func Decode(in string) ([]byte, error) {
	o, err := b64.StdEncoding.DecodeString(in)
	if err != nil {
		// maybe it's in the URL variant?
		o, err = b64.URLEncoding.DecodeString(in)
		if err != nil {
			// ok, just give up...
			return nil, err
		}
	}
	return o, nil
}
871369
func (c *consulClient) Decode(in string) ([]byte, error) {
	return base64.URLEncoding.DecodeString(in)
}