The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
charpack class: a compact ALTREP character vector
whose strings live in one R raw vector, for many short vectors. A
Reader reaches any element directly, without allocating.
as_charpack() converts to one and
is_charpack() tests for one. In C++,
charpack::from_store() copies a finished
charvec::Store into one, so a producer can build with the
charvec builders and choose the class at the end. Reading
an element through ordinary R access materializes the whole
charpack; a Reader keeps it packed, and so do
vector subsets such as x[i], which return a new
charpack.charvec::alloc_na(), charvec::get_store()
and charvec::Writer fill a charvec in place
after it is created.Reader now handles base
wrap_string ALTREP without materialization.charport_materialize() also materializes a
charpack.x[i] on a charvec returning
NA for a real index between length(x) and
length(x) + 1, instead of the last element.charpack serializes in its compact form, like
charvec, without materializing; on a little-endian host its
raw vector is written and read back without a copy. Both write
little-endian on every host; big-endian charvec states from
earlier versions still load.charvec or
charpack with native-encoded strings is saved in packed
form only in a UTF-8 locale; elsewhere it is saved as an ordinary
character vector, so R converts its strings on reading, and the source
stays packed. Native strings in a packed state read outside a UTF-8
locale are marked UTF-8. charvec states are now version 2;
version 1 states from 0.1 still load, with native strings read as the
current locale’s, as before.charport_native_is_utf8() (C++:
charport::native_is_utf8()) reports whether R currently
reads native strings as UTF-8, following
Sys.setlocale().Reader now calls a registered class’ init
first, and otherwise falls back to STRING_PTR_RO.These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.