interface Options {
    contentCompression?: Compression;
    expectedEntries?: number;
    expectedSubscriptions?: number;
    ibltCompression?: Compression;
    keyToBufferLittleEndian?: boolean;
}

Properties

contentCompression?: Compression

Whether to use zlib compression on Data payload.

no compression

Use PSyncZlib to set zlib compression.

In PSync C++ library, default for FullSync depends on whether zlib is available at compile time. For PartialSync, it is always no compression. This must be set to match other peers.

expectedEntries?: number

Expected number of IBLT entries, i.e. expected number of updates in a sync cycle.

80

This is irrelevant to PartialSync consumer.

expectedSubscriptions?: number

Estimated number of subscriptions in PartialSync consumer.

16

ibltCompression?: Compression

Whether to use zlib compression on IBLT.

no compression

Use PSyncZlib to set zlib compression.

In PSync C++ library, default for FullSync depends on whether zlib is available at compile time, and default for PartialSync is no compression. This must be set to match other peers.

keyToBufferLittleEndian?: boolean

Whether to use little endian when converting uint32 key to Uint8Array.

true

PSync C++ library behaves differently on big endian and little endian machines, https://github.com/named-data/PSync/blob/b60398c5fc216a1b577b9dbcf61d48a21cb409a4/PSync/detail/util.cpp#L126 This must be set to match other peers.