Skip to main content

Module archive

Module archive 

Source
Expand description

Store archive: a whole links store in binary links notation.

An archive is two LinksPackets, one after the other:

  1. Links, without external references: the store link (a: s t) is the doublet s t at address a. Addresses the store does not use are holes, so every link keeps its address.
  2. Names, with external references: one link per named store link, in address order, holding the external values address code-point….

Both packets use packed widths, so a store of small addresses costs about two bytes per link. import_store writes every link back at its own address and restores the names, so exporting the imported store gives the same bytes again.

Functions§

export_store
Writes every link and name of storage to writer.
export_store_file
Writes the archive of storage to the file at path.
import_store
Reads an archive from reader into storage: each link is written at its own address, then every name is set.
import_store_file
Reads the archive in the file at path into storage.