// Unmarshal deserializes a byte slice returned by Marshal back into an
// HLLPP object.
765406
func Unmarshal(data []byte) (*HLLPP, error) {
	if len(data) < marshalHeaderSize {
		return nil, fmt.Errorf("data too short (%d bytes)", len(data))
	}

	offset := 0

	version := binary.BigEndian.Uint16(data[offset:])
	offset += 2

	if version != marshalVersion {
		return nil, fmt.Errorf("unknown version: %d", version)
	}

	length := binary.BigEndian.Uint32(data[offset:])
	offset += 4

	if int(length) != len(data) {
		return nil, fmt.Errorf("length mismatch: header says %d, was %d", length, len(data))
	}

	flags := binary.BigEndian.Uint16(data[offset:])
	offset += 2

	p := data[offset]
	offset++

	pp := data[offset]
	offset++

	h, err := NewWithConfig(Config{
		Precision:       p,
		SparsePrecision: pp,
	})
	if err != nil {
		return nil, err
	}

	h.sparse = flags&marshalFlagSparse > 0

	h.sparseLength = binary.BigEndian.Uint32(data[offset:])
	offset += 4

	h.bitsPerRegister = uint32(data[offset])
	offset++

	if len(data) > offset {
		h.data = make([]byte, len(data)-offset)
		copy(h.data, data[offset:])
	}

	return h, nil
}
134716
func (bm *BlockMeta) Unmarshal(bs []byte) error {
	return cdc.UnmarshalBinaryBare(bs, bm)
}
403940
func (n *AppNonce) Unmarshal(data []byte) error {
	*n = [3]byte{} // Reset the receiver
	return n.UnmarshalBinary(data)
}
188672
func (key *AppKey) Unmarshal(data []byte) error {
	*key = [16]byte{} // Reset the receiver
	return key.UnmarshalBinary(data)
}
617055
func (m *Time) Unmarshal(data []byte) error {
	p := ProtoTime{}
	if err := p.Unmarshal(data); err != nil {
		return err
	}
	m.Time = time.Unix(p.Timestamp.Seconds, int64(p.Timestamp.Nanos))
	return nil
}
1053258
func (s *Size) Unmarshal(i interface{}) (err error) {
	if value, ok := i.(string); ok {
		*s, err = Parse(value)
		return
	}
	return fmt.Errorf("unable to unmarshal %#v to Size", i)
}
783512
func (p ProtobufImpl) Unmarshal(marshaled []byte, msg proto.Message) error {
	return errors.WithStack(proto.Unmarshal(marshaled, msg))
}
351789
func (r *Redis) Unmarshal(key string, object interface{}) error {
	value, err := r.Get(key)
	if err == nil {
		err = json.Unmarshal([]byte(value), object)
	}
	return err
}
913216
func Unmarshal(r io.Reader, pb proto.Message) error {
	inputValue := json.RawMessage{}
	if err := json.NewDecoder(r).Decode(&inputValue); err != nil {
		return err
	}
	return unmarshalValue(reflect.ValueOf(pb).Elem(), inputValue)
}
1356283
func Unmarshal(in io.Reader, out interface{}) error {
	return readTo(newDecoder(in), out)
}
148233
func (BitCurve *BitCurve) Unmarshal(data []byte) (x, y *big.Int) {
	byteLen := (BitCurve.BitSize + 7) >> 3
	if len(data) != 1+2*byteLen {
		return
	}
	if data[0] != 4 { // uncompressed form
		return
	}
	x = new(big.Int).SetBytes(data[1 : 1+byteLen])
	y = new(big.Int).SetBytes(data[1+byteLen:])
	return
}
668659
func (c canonicalJSON) Unmarshal(from []byte, to interface{}) error {
	return json.Unmarshal(from, to)
}
113238
func Unmarshal(data url.Values, v interface{}) error {
	var d decoder
	d.init(data)
	return d.unmarshal(v)
}
1287578
func (h *HTMLElement) Unmarshal(v interface{}) error {
	return UnmarshalHTML(v, h.DOM, nil)
}
489524
func (u UnmarshalerFunc) Unmarshal(data []byte, v interface{}) error {
	return u(data, v)
}
443336
func (b *BoolOption) Unmarshal(data []byte) error {
	protoValue := &BoolValue{}
	err := proto.Unmarshal(data, protoValue)
	if err != nil {
		return err
	}
	b.Value = protoValue.Value
	return nil
}
809969
func Unmarshal(b []byte) (orb.Geometry, error) {
	g, err := NewDecoder(bytes.NewReader(b)).Decode()
	if err == io.EOF || err == io.ErrUnexpectedEOF {
		return nil, ErrNotWKB
	}

	return g, err
}