diff --git a/ChangeLog b/ChangeLog index c1d259a..f959aaf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Version 0.26.1 (2024-03-07) + * Add ALTREP serialization + * Minor bug fix (strict aliasing rules) + Version 0.25.7 (2023-12-05) * Minor fix for CRAN checks (see https://github.com/RcppCore/Rcpp/issues/1287) diff --git a/DESCRIPTION b/DESCRIPTION index 4abbe68..fc3e70c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: qs Type: Package Title: Quick Serialization of R Objects -Version: 0.26.0 -Date: 2023-12-13 +Version: 0.26.1 +Date: 2024-03-08 Authors@R: c( person("Travers", "Ching", email = "traversc@gmail.com", role = c("aut", "cre", "cph")), person("Yann", "Collet", role = c("ctb", "cph"), comment = "Yann Collet is the author of the bundled zstd, lz4 and xxHash code"), diff --git a/configure b/configure index 607a169..8c88085 100755 --- a/configure +++ b/configure @@ -1822,9 +1822,7 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -echo $R_HOME : ${R_HOME=`R RHOME`} -echo $R_HOME PATH_TO_CPP_COMPILER=`"${R_HOME}/bin/R" CMD config CXX` ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' diff --git a/configure.ac b/configure.ac index 767b679..0321741 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([qs],[0.25.6],[traversc@gmail.com]) +AC_INIT([qs],[0.26.1],[traversc@gmail.com]) AC_PATH_PROG([PKGCONF],[pkg-config],[],[$PATH:/usr/local/bin:ext/bin:ext:/sw/bin:/opt/bin:/opt/local/bin]) ######################################################## diff --git a/inst/extra_tests/benchmark_testing_between_versions.R b/inst/extra_tests/benchmark_testing_between_versions.R index 869f4ba..aa74da8 100644 --- a/inst/extra_tests/benchmark_testing_between_versions.R +++ b/inst/extra_tests/benchmark_testing_between_versions.R @@ -1,4 +1,4 @@ -library(qs253) +library(qs257) library(qs) @@ -33,8 +33,8 @@ for(i in 1:nrow(grid)) { x <- dataframeGen() } if(grid$ver[i] == "25") { - save <- function(...) qs253::qsave(..., check_hash = F) - read <- qs253::qread + save <- function(...) qs257::qsave(..., check_hash = F) + read <- qs257::qread } else if(grid$ver[i] == "26") { save <- function(...) qs::qsave(..., check_hash = F) read <- qs::qread diff --git a/inst/extra_tests/regression_testing.R b/inst/extra_tests/regression_testing.R index 6f0af4d..5e73058 100644 --- a/inst/extra_tests/regression_testing.R +++ b/inst/extra_tests/regression_testing.R @@ -55,9 +55,9 @@ if(F) { # install_as_name("https://cran.r-project.org/src/contrib/Archive/qs/qs_0.22.1.tar.gz", "qs221") # zstd, lz4, lz4hc block compress, zstd_stream compress # install_as_name("https://cran.r-project.org/src/contrib/Archive/qs/qs_0.23.6.tar.gz", "qs236") # zstd, lz4, lz4hc block compress, zstd_stream compress # install_as_name("https://cran.r-project.org/src/contrib/Archive/qs/qs_0.24.1.tar.gz", "qs241") # zstd, lz4, lz4hc block compress, zstd_stream compress - + # install_as_name("https://cran.r-project.org/src/contrib/qs_0.25.7.tar.gz", "qs257") # Only qs +0.25 can be installed on R 4.2 due to changes in C API - install_as_name(pkg = "https://cran.r-project.org/src/contrib/Archive/qs/qs_0.25.3.tar.gz", new_name = "qs253") # zstd, lz4, lz4hc block compress, zstd_stream compress + install_as_name(pkg = "https://cran.r-project.org/src/contrib/Archive/qs/qs_0.25.3.tar.gz", new_name = "qs257") # zstd, lz4, lz4hc block compress, zstd_stream compress # Earlier version cannot read zstd_stream from 0.17.1+ due to additional checksum at end of file # qs 0.18.1 -- header version 2 -- will not be readable by earlier versions @@ -77,8 +77,8 @@ if(F) { # library(qs236) } -library(qs253) -library(qs) # 0.26.0 +library(qs257) +library(qs) # 0.26.1 file <- tempfile() @@ -144,21 +144,21 @@ test_ext_compatability <- function(save_funs, read_funs) { } # restart from 25.3 -qs253_lz4_save <- function(x) qs253::qsave(x, file, preset = "custom", algorithm = "lz4") -qs253_zstd_save <- function(x) qs253::qsave(x, file, preset = "custom", algorithm = "zstd") -qs253_zstd_stream_save <- function(x) qs253::qsave(x, file, preset = "custom", algorithm = "zstd_stream") -qs253_zstd_stream_save_nohash <- function(x) qs::qsave(x, file, preset = "custom", algorithm = "zstd_stream", check_hash = F) -qs253_no_shuffle <- function(x) qs::qsave(x, file, preset = "custom", algorithm = "zstd", shuffle_control = 0) - -print("qs253 lz4 save"); test_compatability(qs253_lz4_save, list(qs::qread)) -print("qs253 zstd save"); test_compatability(qs253_zstd_save, list(qs::qread)) -print("qs253 zstd stream save"); test_compatability(qs253_zstd_stream_save, list(qs::qread)) -print("qs253 zstd stream save no hash"); test_compatability(qs253_zstd_stream_save_nohash, list(qs::qread)) -print("qs253 no shuffle save"); test_compatability(qs253_no_shuffle, list(qs::qread)) +qs257_lz4_save <- function(x) qs257::qsave(x, file, preset = "custom", algorithm = "lz4") +qs257_zstd_save <- function(x) qs257::qsave(x, file, preset = "custom", algorithm = "zstd") +qs257_zstd_stream_save <- function(x) qs257::qsave(x, file, preset = "custom", algorithm = "zstd_stream") +qs257_zstd_stream_save_nohash <- function(x) qs::qsave(x, file, preset = "custom", algorithm = "zstd_stream", check_hash = F) +qs257_no_shuffle <- function(x) qs::qsave(x, file, preset = "custom", algorithm = "zstd", shuffle_control = 0) + +print("qs257 lz4 save"); test_compatability(qs257_lz4_save, list(qs::qread)) +print("qs257 zstd save"); test_compatability(qs257_zstd_save, list(qs::qread)) +print("qs257 zstd stream save"); test_compatability(qs257_zstd_stream_save, list(qs::qread)) +print("qs257 zstd stream save no hash"); test_compatability(qs257_zstd_stream_save_nohash, list(qs::qread)) +print("qs257 no shuffle save"); test_compatability(qs257_no_shuffle, list(qs::qread)) # Test new environment saving using findVarInFrame -save_funs <- c(qs253_lz4_save, qs253_zstd_save, qs253_zstd_stream_save) -read_funs <- c(qs253::qread, qs::qread) +save_funs <- c(qs257_lz4_save, qs257_zstd_save, qs257_zstd_stream_save) +read_funs <- c(qs257::qread, qs::qread) print("Testing new environment saving"); test_ext_compatability(save_funs, read_funs) diff --git a/inst/extra_tests/revdep_check.R b/inst/extra_tests/revdep_check.R index 1f13d72..22ef6a2 100644 --- a/inst/extra_tests/revdep_check.R +++ b/inst/extra_tests/revdep_check.R @@ -16,4 +16,4 @@ library(usethis) use_revdep() library(revdepcheck) -revdep_check(num_workers=12) \ No newline at end of file +revdep_check(num_workers=12) diff --git a/src/qs_common.h b/src/qs_common.h index d848570..1bf34d8 100644 --- a/src/qs_common.h +++ b/src/qs_common.h @@ -613,16 +613,16 @@ inline void writeSize4(stream_writer & myFile, const uint64_t x) { template inline uint32_t readSize4(stream_writer & myFile) { - std::array a; - read_check(myFile, a.data(),4); - return *reinterpret_cast(a.data()); + uint32_t output = 0; + read_check(myFile, reinterpret_cast(&output),4); + return output; } template inline uint64_t readSize8(stream_writer & myFile) { - std::array a; - read_check(myFile, a.data(),8); - return *reinterpret_cast(a.data()); + uint64_t output = 0; + read_check(myFile, reinterpret_cast(&output),8); + return output; }