code: 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
  }
docs: // Unmarshal deserializes a byte slice returned by Marshal back into an
  // HLLPP object.