Open-source qs2 0.5.0 updates R serialization compression and file write checks
The package release on November 28 bundles Zstandard 1.6.0. The qs2 and qdata save paths check that writing and closing the output file completed.
The published source reaches CRAN
Version 0.5.0 of the open-source qs2 package reached CRAN on November 28. The archive records 09:30:02 UTC, or 12:30:02 in Istanbul. Its changelog carries a separate November 27 date. CRANberries compared the new archive with version 0.4.0 from November 2. We checked the bundled Zstandard header in both downloads and confirmed that it moved from 1.5.7 to 1.6.0. The release also changes how qdata reads short character vectors and how the package detects failures while saving or loading an object.
Two representations for stored objects
The package offers qs2 and qdata. The first uses R serialization and applies its own compression and file I/O. The second uses a separate serialization implementation. The documentation also describes converting qs2 output into standard RDS. A reporting pipeline could save an expensive intermediate R object and load it in the next scheduled job. Its choice of representation depends on which software the readers have, how long the output is kept, and what the team needs to reproduce. The release uses Homebrew's Zstandard by default on macOS. The bundled library and the one selected in a particular build can therefore differ.
How short character vectors are read
With use_alt_rep enabled, qdata can read vectors of up to 256 strings as charport charpack vectors. Longer vectors continue to use charvec. The source archive contains the new qd_charpack.h implementation. The changelog describes the change as removing much of the overhead introduced in the previous release for objects with many small character vectors. The impact depends on the shape of a workload. The new code also checks the native character encoding when writing an object. This matters when an R process changes its locale after loading the package.
Save failures surface at the file boundary
The qs_save and qd_save functions check whether the output was fully written and closed. A file can exist even if storage fills before the write completes. The changelog says the package now names the file when reporting a save failure. A multithreaded read also reports a corrupt block found after the object. Worker allocation and decompression failures receive distinct messages. Together these changes make it easier to identify the stage where an output or input failed. A pipeline can still reopen an important artifact and verify its contents before treating it as the finished result.
Measuring a workflow after upgrading
The distribution and independent file comparison establish what shipped. An application can compare elapsed write and read times, output sizes, and object equality under its own data and thread settings. Workloads made of many short strings may behave differently from workloads dominated by large arrays. At review time, some CRAN binary channels for Windows and macOS still displayed the earlier release. The installed package version determines whether the new save and read behavior is available. Recording it alongside the stored artifact makes a later change in timing or error output easier to trace.
Archive photo · epSos.de / Wikimedia Commons ↗ · CC BY 2.0 · Illustrative archive photograph for file storage, resized and converted to WebP.
Sources and verification
- Primary sourceCRAN ↗
- Technical documentCRAN kaynak arşivi ↗
- Technical documentqs2 sürüm notları ↗
- Reporting / cross-checkCRANberries ↗
- BackgroundR biçim belgeleri ↗
Reader discussion
How would you measure this development's real-world impact?
No comments yet. Be the first to contribute.
Write a comment