X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/cc7c4158bc9c584b91560e9bf3dff51a9316c9b3..4a14dbbac2eb6148c50212222beb2639ecbc8760:/src/intset.c diff --git a/src/intset.c b/src/intset.c index bfd3307d..13bd220e 100644 --- a/src/intset.c +++ b/src/intset.c @@ -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