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

Properties

contentCompression?: Compression

Whether to use zlib compression on Data payload.

Default Value

no compression

Remarks

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.

Default Value

80

Remarks

This is irrelevant to PartialSync consumer.

expectedSubscriptions?: number

Estimated number of subscriptions in PartialSync consumer.

Default Value

16
ibltCompression?: Compression

Whether to use zlib compression on IBLT.

Default Value

no compression

Remarks

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.

Default Value

true

Remarks

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.