Decode the encoded length pointed by 'p' */
| 103 | |
| 104 | /* Decode the encoded length pointed by 'p' */ |
| 105 | static 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 | |
| 114 | static unsigned int zipmapGetEncodedLengthSize(unsigned char *p) { |
| 115 | return (*p < ZIPMAP_BIGLEN) ? 1: 5; |
no outgoing calls
no test coverage detected