// Decode accepts a packed byte array and populates the fields of the TerrainCheck
771386
func (m *TerrainCheck) Decode(buf []byte) {
	data := bytes.NewBuffer(buf)
	binary.Read(data, binary.LittleEndian, &m.LAT)
	binary.Read(data, binary.LittleEndian, &m.LON)
}
8326
func Decode(src []byte, mode int) (inst Inst, err error) {
	return decode1(src, mode, false)
}
336970
func (d *Decoder) Decode(v interface{}) (int, error) {
	if v == nil {
		msg := "can't unmarshal to nil interface"
		return 0, unmarshalError("Unmarshal", ErrNilInterface, msg, nil,
			nil)
	}

	vv := reflect.ValueOf(v)
	if vv.Kind() != reflect.Ptr {
		msg := fmt.Sprintf("can't unmarshal to non-pointer '%v' - use "+
			"& operator", vv.Type().String())
		err := unmarshalError("Unmarshal", ErrBadArguments, msg, nil, nil)
		return 0, err
	}
	if vv.IsNil() && !vv.CanSet() {
		msg := fmt.Sprintf("can't unmarshal to unsettable '%v' - use "+
			"& operator", vv.Type().String())
		err := unmarshalError("Unmarshal", ErrNotSettable, msg, nil, nil)
		return 0, err
	}

	return d.decode(vv)
}
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)
}
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
}
251202
func Decode(in string) ([]byte, error) {
	out, err := Client().Decode(in)
	Trace("Decode", err, logrus.Fields{"in": in, "out": out})
	return out, err
}
1237510
func (m AttributeMap) Decode(dst interface{}, opts ...mapdecode.Option) error {
	return DecodeInto(dst, m, opts...)
}
438674
func (s ISO88595) Decode() []byte {
	e := charmap.ISO8859_5.NewDecoder()
	es, _, err := transform.Bytes(e, s)
	if err != nil {
		return s
	}
	return es
}
871759
func (t *StateUpdateReply) Decode(r io.Reader, pver uint32) error {
	return ReadElements(r,
		&t.Code,
		&t.LastApplied,
	)
}
219314
func (codec *StringCodec) Decode(in *ByteBuf) (bool, interface{}, error) {
	value := string(in.GetMarkedRemindData())
	in.MarkedBytesReaded()
	return true, value, nil
}
992885
func (l *zapLevel) Decode(into mapdecode.Into) error {
	var s string
	if err := into(&s); err != nil {
		return fmt.Errorf("could not decode Zap log level: %v", err)
	}

	err := (*zapcore.Level)(l).UnmarshalText([]byte(s))
	if err != nil {
		return fmt.Errorf("could not decode Zap log level: %v", err)
	}
	return err
}
120891
func (pp *Pingreq) Decode(src []byte) (int, error) {
	return nakedDecode(src, PINGREQ)
}
43740
func (d *YAMLOrJSONDecoder) Decode(into interface{}) error {
	if d.decoder == nil {
		buffer, isJSON := guessJSONStream(d.r, d.bufferSize)
		if isJSON {
			glog.V(4).Infof("decoding stream as JSON")
			d.decoder = json.NewDecoder(buffer)
		} else {
			glog.V(4).Infof("decoding stream as YAML")
			d.decoder = NewYAMLToJSONDecoder(buffer)
		}
	}
	return d.decoder.Decode(into)
}
682759
func (decoder *Decoder) Decode(v interface{}) error {
	node, err := Read(decoder.r, decoder.opt.clone)
	if err != nil {
		return err
	}
	var buf bytes.Buffer
	if err := Write(&buf, node); err != nil {
		return err
	}
	return json.Unmarshal(buf.Bytes(), v)
}
818356
func (m *GpsGlobalOrigin) Decode(buf []byte) {
	data := bytes.NewBuffer(buf)
	binary.Read(data, binary.LittleEndian, &m.LATITUDE)
	binary.Read(data, binary.LittleEndian, &m.LONGITUDE)
	binary.Read(data, binary.LittleEndian, &m.ALTITUDE)
}
9984
func (m *TerrainReport) Decode(buf []byte) {
	data := bytes.NewBuffer(buf)
	binary.Read(data, binary.LittleEndian, &m.LAT)
	binary.Read(data, binary.LittleEndian, &m.LON)
	binary.Read(data, binary.LittleEndian, &m.TERRAIN_HEIGHT)
	binary.Read(data, binary.LittleEndian, &m.CURRENT_HEIGHT)
	binary.Read(data, binary.LittleEndian, &m.SPACING)
	binary.Read(data, binary.LittleEndian, &m.PENDING)
	binary.Read(data, binary.LittleEndian, &m.LOADED)
}
451056
func (d *wktDecoder) decode(wkt string) (*Geometry, error) {
	cstr := C.CString(wkt)
	defer C.free(unsafe.Pointer(cstr))
	g := cGEOSWKTReader_read(d.r, cstr)
	if g == nil {
		return nil, Error()
	}
	return geomFromPtr(g), nil
}