interface Parameters {
    contentCompression: Compression;
    decodeBloom: (
        Bloom: typeof BloomFilter,
        comps: readonly Component[],
    ) => Promise<BloomFilter>;
    decodeState: (payload: Uint8Array<ArrayBufferLike>) => State;
    encodeBloom: (bf: BloomFilter) => Component[];
    encodeBloomLength: number;
    encodeState: (state: State) => Uint8Array<ArrayBufferLike>;
    iblt: IBLT.Parameters;
    ibltCompression: Compression;
    joinPrefixSeqNum: (ps: PrefixSeqNum) => PrefixSeqNumEncoded;
    syncInterestNameCumulativeNElements?: boolean;
    threshold: number;
    toBloomKey: (prefix: Name) => string | Uint8Array<ArrayBufferLike>;
}

Hierarchy

  • Parameters
  • Parameters
    • Parameters

Properties

contentCompression: Compression

Compression method for State in segmented object.

decodeBloom: (
    Bloom: typeof BloomFilter,
    comps: readonly Component[],
) => Promise<BloomFilter>

Decode a Bloom filter.

decodeState: (payload: Uint8Array<ArrayBufferLike>) => State

Decode State from buffer (without decompression).

encodeBloom: (bf: BloomFilter) => Component[]

Encode a Bloom filter.

encodeBloomLength: number

Number of name components in an encoded Bloom filter.

encodeState: (state: State) => Uint8Array<ArrayBufferLike>

Encode State to buffer (without compression).

ibltCompression: Compression

Compression method for IBLT in name component.

joinPrefixSeqNum: (ps: PrefixSeqNum) => PrefixSeqNumEncoded

Encode prefix and sequence number to byte array.

syncInterestNameCumulativeNElements?: boolean

If true, sync Interest name contains cumulative number of elements in IBLT.

true

PSync C++ library commit d83af5255db9c4a557264542647f7ccb281e6840 (2024-04-09) introduced an algorithm change that involves a breaking change in sync Interest encoding. To interact with PSync since this commit, set to true. To interact with PSync before this commit, set to false.

threshold: number

If IBLT diff has at least this number of entries, respond with SyncData right away.

toBloomKey: (prefix: Name) => string | Uint8Array<ArrayBufferLike>

Convert a name prefix to a Bloom filter key.