encoded types API to get blob length

This commit is contained in:
antirez
2011-02-28 14:48:49 +01:00
parent 2cc993655f
commit d4fb9f4144
5 changed files with 14 additions and 11 deletions

View File

@ -222,6 +222,11 @@ uint32_t intsetLen(intset *is) {
return is->length;
}
/* Return intset blob size in bytes. */
size_t intsetBlobLen(intset *is) {
return sizeof(intset)+is->length*is->encoding;
}
#ifdef INTSET_TEST_MAIN
#include <sys/time.h>