MCPcopy Create free account
hub / github.com/argotorg/solidity / varintEncoding

Function varintEncoding

libsolutil/IpfsHash.cpp:31–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29namespace
30{
31bytes varintEncoding(size_t _n)
32{
33 bytes encoded;
34 while (_n > 0x7f)
35 {
36 encoded.emplace_back(uint8_t(0x80 | (_n & 0x7f)));
37 _n >>= 7;
38 }
39 encoded.emplace_back(_n);
40 return encoded;
41}
42
43bytes encodeByteArray(bytes const& _data)
44{

Callers 4

encodeByteArrayFunction · 0.85
encodeLinkDataFunction · 0.85
combineLinksFunction · 0.85
ipfsHashMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected