IBR-DTNSuite
0.12
|
Namespaces | |
api | |
core | |
daemon | |
data | |
dht | |
net | |
routing | |
security | |
storage | |
streams | |
utils | |
Classes | |
class | InvalidDataException |
class | InvalidProtocolException |
class | SerializationFailedException |
class | PayloadReceptionInterrupted |
class | MissingObjectException |
class | ConnectionInterruptedException |
Class to handle parsing and formatting of self describing numeric values (SDNVs).
The basic idea is to enable a compact byte representation of numeric values that may widely vary in size. This encoding is based on the ASN.1 specification for encoding Object Identifier Arcs.
Conceptually, the integer value to be encoded is split into 7-bit segments. These are encoded into the output byte stream, such that the high order bit in each byte is set to one for all bytes except the last one.
Note that this implementation only handles values up to 64-bits in length (since the conversion is between a uint64_t and the encoded byte sequence).