psync::detail Namespace Reference

Classes

class  BloomFilter
 
class  HashTableEntry
 
class  IBLT
 Invertible Bloom Lookup Table (Invertible Bloom Filter) More...
 
struct  IBLTDiff
 Represent the difference between two IBLTs,. More...
 
class  State
 

Functions

std::shared_ptr< ndn::Buffer > compress (CompressionScheme scheme, ndn::span< const uint8_t > buffer)
 
std::shared_ptr< ndn::Buffer > decompress (CompressionScheme scheme, ndn::span< const uint8_t > buffer)
 
uint32_t murmurHash3 (const void *key, size_t len, uint32_t seed)
 
uint32_t murmurHash3 (uint32_t seed, const ndn::Name &name)
 Compute 32-bit MurmurHash3 of Name TLV-VALUE. More...
 
uint32_t murmurHash3 (uint32_t seed, uint32_t value)
 
 NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS (State)
 
IBLTDiff operator- (const IBLT &lhs, const IBLT &rhs)
 Compute the difference between two IBLTs. More...
 
std::ostream & operator<< (std::ostream &os, const IBLT &iblt)
 
std::ostream & operator<< (std::ostream &os, const State &state)
 

Variables

constexpr size_t ENTRY_SIZE
 
constexpr size_t N_HASH = 3
 
constexpr size_t N_HASHCHECK = 11
 

Function Documentation

◆ compress()

std::shared_ptr< ndn::Buffer > psync::detail::compress ( CompressionScheme  scheme,
ndn::span< const uint8_t >  buffer 
)

Definition at line 124 of file util.cpp.

◆ decompress()

std::shared_ptr< ndn::Buffer > psync::detail::decompress ( CompressionScheme  scheme,
ndn::span< const uint8_t >  buffer 
)

Definition at line 183 of file util.cpp.

◆ murmurHash3() [1/3]

uint32_t psync::detail::murmurHash3 ( const void *  key,
size_t  len,
uint32_t  seed 
)

Definition at line 58 of file util.cpp.

◆ murmurHash3() [2/3]

uint32_t psync::detail::murmurHash3 ( uint32_t  seed,
const ndn::Name &  name 
)

Compute 32-bit MurmurHash3 of Name TLV-VALUE.

Definition at line 117 of file util.cpp.

◆ murmurHash3() [3/3]

uint32_t psync::detail::murmurHash3 ( uint32_t  seed,
uint32_t  value 
)
inline

Definition at line 40 of file util.hpp.

◆ NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS()

psync::detail::NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS ( State  )

◆ operator-()

IBLTDiff psync::detail::operator- ( const IBLT lhs,
const IBLT rhs 
)

Compute the difference between two IBLTs.

Parameters
lhsown IBLT.
rhsreceived IBLT. It must have same hashtable size lhs hashtable.
Returns
decoding result.

Definition at line 170 of file iblt.cpp.

◆ operator<<() [1/2]

std::ostream & psync::detail::operator<< ( std::ostream &  os,
const IBLT iblt 
)

Definition at line 157 of file iblt.cpp.

◆ operator<<() [2/2]

std::ostream & psync::detail::operator<< ( std::ostream &  os,
const State state 
)

Definition at line 96 of file state.cpp.

Variable Documentation

◆ ENTRY_SIZE

constexpr size_t psync::detail::ENTRY_SIZE
constexpr
Initial value:
= sizeof(HashTableEntry::count) + sizeof(HashTableEntry::keySum) +
sizeof(HashTableEntry::keyCheck)

Definition at line 55 of file iblt.cpp.

◆ N_HASH

constexpr size_t psync::detail::N_HASH = 3
inlineconstexpr

Definition at line 86 of file iblt.hpp.

◆ N_HASHCHECK

constexpr size_t psync::detail::N_HASHCHECK = 11
inlineconstexpr

Definition at line 87 of file iblt.hpp.