From 7509a17af931e7b29e3f82cb8368628d67857273 Mon Sep 17 00:00:00 2001 From: LTLA Date: Fri, 13 Sep 2024 09:53:05 -0700 Subject: [PATCH] Turn on preprocessing shuffle for better HDF5 compression. I noticed this when the alabaster-produced files are larger than those produced by our internal artificer packages. This change aligns with rhdf5's default approach when Zlib compression is enabled. --- DESCRIPTION | 4 ++-- R/hdf5.R | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 0510fc6..ae1ecdf 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: alabaster.base Title: Save Bioconductor Objects To File -Version: 1.5.7 -Date: 2024-09-10 +Version: 1.5.8 +Date: 2024-09-13 Authors@R: person("Aaron", "Lun", role=c("aut", "cre"), email="infinite.monkeys.with.keyboards@gmail.com") License: MIT + file LICENSE Description: diff --git a/R/hdf5.R b/R/hdf5.R index 97a4a0c..ed087b6 100644 --- a/R/hdf5.R +++ b/R/hdf5.R @@ -67,6 +67,7 @@ h5_create_vector <- function(handle, name, len, type, compress=6, chunks=NULL, s H5Pset_obj_track_times(phandle, FALSE) if (compress > 0 && len) { + H5Pset_shuffle(phandle) H5Pset_deflate(phandle, level=compress) if (is.null(chunks)) { chunks <- h5_guess_vector_chunks(len)