Skip to main content

Crate rd_helpdb

Crate rd_helpdb 

Source
Expand description

Reader for installed R package help databases (aliases, .rdx/.rdb, and Meta/hsearch.rds), built on top of rd-rds.

An installed package directory looks like:

<pkg_dir>/help/<pkg>.rdx       # RDS file: index
<pkg_dir>/help/<pkg>.rdb       # concatenated binary records
<pkg_dir>/help/aliases.rds     # RDS: named character vector alias -> topic
<pkg_dir>/Meta/hsearch.rds     # RDS: help-search index

rd-helpdb does not discover installed packages (R’s .libPaths() logic is out of scope): PackageHelpDb::open takes an explicit package directory.

Structs§

PackageHelpDb
A reader over an installed R package’s compiled help database: help/<pkg>.rdx + help/<pkg>.rdb, plus the sibling help/aliases.rds and Meta/hsearch.rds files.

Enums§

Error
Errors produced by rd-helpdb.

Functions§

decode_rdb_record
Decodes a single .rdb record: bytes is the exact (offset, length) slice a .rdx index entry points at, i.e. a 4-byte big-endian uncompressed-size prefix followed by a raw zlib deflate stream. The decompressed size is checked against the prefix before parsing.
read_rds_file
Reads a standalone (possibly compressed) .rds file into an rd_rds::RObject.