Class StoreArchive
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
- Links, without external references: the store link
(a: s t)is the doublets tat addressa. Addresses the store does not use are holes, so every link keeps its address. - 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
Export(INamedTypesLinks<uint>, Stream)
Writes every link and name of links to output.
public static void Export(INamedTypesLinks<uint> links, Stream output)
Parameters
linksINamedTypesLinks<uint>outputStream
ExportToFile(INamedTypesLinks<uint>, string)
Writes the archive of links to the file at path.
public static void ExportToFile(INamedTypesLinks<uint> links, string path)
Parameters
linksINamedTypesLinks<uint>pathstring
Import(INamedTypesLinks<uint>, Stream)
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
linksINamedTypesLinks<uint>inputStream
ImportFromFile(INamedTypesLinks<uint>, string)
Reads the archive in the file at path into links.
public static void ImportFromFile(INamedTypesLinks<uint> links, string path)
Parameters
linksINamedTypesLinks<uint>pathstring