MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / zipmapDecodeLength

Function zipmapDecodeLength

src/zipmap.c:105–112  ·  view source on GitHub ↗

Decode the encoded length pointed by 'p' */

Source from the content-addressed store, hash-verified

103
104/* Decode the encoded length pointed by 'p' */
105static unsigned int zipmapDecodeLength(unsigned char *p) {
106 unsigned int len = *p;
107
108 if (len < ZIPMAP_BIGLEN) return len;
109 memcpy(&len,p+1,sizeof(unsigned int));
110 memrev32ifbe(&len);
111 return len;
112}
113
114static unsigned int zipmapGetEncodedLengthSize(unsigned char *p) {
115 return (*p < ZIPMAP_BIGLEN) ? 1: 5;

Callers 7

zipmapLookupRawFunction · 0.85
zipmapRawKeyLengthFunction · 0.85
zipmapRawValueLengthFunction · 0.85
zipmapNextFunction · 0.85
zipmapGetFunction · 0.85
zipmapValidateIntegrityFunction · 0.85
zipmapReprFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected