Get or set a global qs2 option.
Value
If value is NULL, returns the current value of the specified option.
Otherwise, sets the option and returns the new value invisibly.
Details
This function provides an interface to retrieve or update internal qs2 options such as compression level, shuffle flag, number of threads, checksum validation, warning for unsupported types, and requested ALTREP usage. It directly calls the underlying C-level functions.
The default settings are:
compress_level: 3Lshuffle: TRUEnthreads: 1Lvalidate_checksum: FALSEwarn_unsupported_types: TRUE (used only inqd_save)use_alt_rep: FALSE (accepted byqd_readandqd_deserialize, but temporarily disabled)
When parameter = "use_alt_rep" is set to TRUE, qdata reads currently
warn and fall back to ordinary character vectors.
When value is NULL, the current value of the specified option is returned.
Otherwise, the option is set to value and the new value is returned invisibly.
Examples
# Get the current compression level:
qopt("compress_level")
#> [1] 3
# Set the compression level to 5:
qopt("compress_level", value = 5)
# Get the current shuffle setting:
qopt("shuffle")
#> [1] TRUE
# Get the current setting for warn_unsupported_types (used in qd_save):
qopt("warn_unsupported_types")
#> [1] TRUE
# Get the current setting for use_alt_rep:
qopt("use_alt_rep")
#> [1] FALSE