Table of Contents

Class StoreArchive

Namespace
Foundation.Data.Doublets.Cli.Protocol
Assembly
Foundation.Data.Doublets.Cli.dll

A whole links store in binary links notation: two Link.Foundation.Links.Notation.Binary.LinksPackets, one after the other.

public static class StoreArchive
Inheritance
StoreArchive
Inherited Members

Remarks

  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(INamedTypesLinks<uint>, Stream) writes every link back at its own address and restores the names, so exporting the imported store gives the same bytes again. The Rust protocol::archive module writes the same bytes.

Methods

Writes every link and name of links to output.

public static void Export(INamedTypesLinks<uint> links, Stream output)

Parameters

links INamedTypesLinks<uint>
output Stream

Writes the archive of links to the file at path.

public static void ExportToFile(INamedTypesLinks<uint> links, string path)

Parameters

links INamedTypesLinks<uint>
path string

Reads an archive from input into links: each link is written at its own address, then every name is set.

public static void Import(INamedTypesLinks<uint> links, Stream input)

Parameters

links INamedTypesLinks<uint>
input Stream

Reads the archive in the file at path into links.

public static void ImportFromFile(INamedTypesLinks<uint> links, string path)

Parameters

links INamedTypesLinks<uint>
path string