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

Function zipmapRequiredLength

src/zipmap.c:172–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172static unsigned long zipmapRequiredLength(unsigned int klen, unsigned int vlen) {
173 unsigned int l;
174
175 l = klen+vlen+3;
176 if (klen >= ZIPMAP_BIGLEN) l += 4;
177 if (vlen >= ZIPMAP_BIGLEN) l += 4;
178 return l;
179}
180
181/* Return the total amount used by a key (encoded length + payload) */
182static unsigned int zipmapRawKeyLength(unsigned char *p) {

Callers 1

zipmapSetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected