A fast R package for serializing and deserializing R objects to/from disk, designed as a drop-in replacement for saveRDS/readRDS.
qs is an R package for quick serialization and deserialization of R objects to and from disk. It solves the performance limitations of R's native saveRDS/readRDS functions by providing dramatically faster read/write speeds while maintaining full compatibility with all R object types. The package uses advanced compression algorithms and multi-threading to optimize both speed and compression ratios.
R developers and data scientists who need to frequently save and load R objects, particularly those working with large datasets where serialization performance is critical. Researchers and analysts dealing with data persistence in R workflows will benefit most.
Developers choose qs because it combines the generality of saveRDS (works with any R object) with the speed of specialized packages like fst, while offering superior compression ratios through byte shuffling and multiple compression algorithms. Its drop-in replacement design makes adoption straightforward.
Quick serialization of R objects
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses multi-threaded compression with lz4 or zstd libraries, achieving speeds significantly faster than saveRDS, as demonstrated in benchmarks with data frames up to 5 million rows.
Serializes any R object type including data frames, lists, S4 objects, and environments, maintaining full compatibility unlike fst, which only handles data frames and certain columns.
Implements byte shuffling and compression presets (fast, balanced, high, archive), with examples showing compression ratios over 1000:1 for integer data using custom settings.
Leverages R's ALTREP system via the stringfish package for rapid reading of character vectors, with benchmarks indicating substantial speedups when use_alt_rep=TRUE is set.
The README explicitly states that qs is deprecated and recommends using qs2, meaning no future updates, bug fixes, or active support, which poses a risk for production use.
Unlike fst, qs cannot access specific rows or columns without deserializing the entire file, limiting its utility for large datasets where partial loading is needed.
For best performance, installation requires compiling from source with specific SIMD instructions like AVX2, which can be cumbersome and platform-dependent compared to binary installations.