Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Commit

Permalink
Use fast compression for rxode2 model variables
Browse files Browse the repository at this point in the history
  • Loading branch information
mattfidler committed Jan 17, 2024
1 parent a43d725 commit f1dd786
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/qs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,15 @@ Rcpp::CharacterVector rxQs(SEXP const x) {
loadQs();
Rcpp::Function base91_encode = Rcpp::as<Rcpp::Function>(qsNs["base91_encode"]);
Rcpp::Function qserialize = Rcpp::as<Rcpp::Function>(qsNs["qserialize"]);
return base91_encode(qserialize(x, Rcpp::CharacterVector::create("high"), Rcpp::CharacterVector::create("zstd"),
Rcpp::IntegerVector::create(22),
Rcpp::IntegerVector::create(15), Rcpp::LogicalVector::create(true)));
return base91_encode(qserialize(x, Rcpp::CharacterVector::create("fast")));
}

//[[Rcpp::export]]
SEXP rxQr(const std::string& encoded_string) {
loadQs();
Rcpp::Function base91_decode = Rcpp::as<Rcpp::Function>(qsNs["base91_decode"]);
Rcpp::Function qdeserialize = Rcpp::as<Rcpp::Function>(qsNs["qdeserialize"]);
return qdeserialize(base91_decode(Rcpp::wrap(encoded_string)), false, false);
return qdeserialize(base91_decode(Rcpp::wrap(encoded_string)));
}


Expand Down

0 comments on commit f1dd786

Please sign in to comment.