Skip to main content

Module archive

Module archive 

Source

Modules§

archive_options
exporter
Archive writing. export writes the version and the starting nonce in the clear, then one zstd stream of length-prefixed AES-GCM frames: the metadata, then every element of one database snapshot. Frames are written as rows are read, so memory does not grow with the history.
importer
pre8
Consent records written before 8.0. Before 8.0, a DM’s consent was its group’s record, and inbox records decided no DM. A pre-8.0 time is the time a row was first inserted, not the time of its latest state, so it cannot say which of a peer’s rows is newer.

Structs§

ArchiveImporter
BackupMetadata

Enums§

ArchiveError
Archive export or import failure.
UnreadableGroup
Why an eligible group could not be exported.

Constants§

BACKUP_VERSION
ENC_KEY_SIZE
MAX_FRAME_BYTES
Holds a legacy converter row at its 64 MiB budget plus what that budget does not count: about 2 MiB of decoded group metadata, protobuf field overhead, and the tag.
NONCE_SIZE
TAG_SIZE
ZSTD_WINDOW_LOG_MAX
16 MiB. Exporters use zstd’s default level, whose window is 2 MiB.

Functions§

check_key
Rejects a key that is not ENC_KEY_SIZE bytes. Export and import call it first; callers holding a large input may call it before copying that input.
insert_archive
Import an archive. first reads it once for its deletion messages; reopen then reads it again for the import, so a pre-8.0 self-deletion is restored whichever comes first, it or its target.