]> git.saurik.com Git - redis.git/blob - ziplist.h
15153fea5548ee479f37aeb7dfa24ad760e8c0a4
[redis.git] / ziplist.h
1 #define ZIPLIST_HEAD 0
2 #define ZIPLIST_TAIL 1
3
4 unsigned char *ziplistNew(void);
5 unsigned char *ziplistPush(unsigned char *zl, char *s, unsigned int slen, int where);
6 unsigned char *ziplistPop(unsigned char *zl, sds *target, int where);
7 unsigned char *ziplistIndex(unsigned char *zl, int index);
8 unsigned char *ziplistNext(unsigned char *zl, unsigned char *p);
9 unsigned char *ziplistPrev(unsigned char *zl, unsigned char *p);
10 unsigned int ziplistGet(unsigned char *p, char **sstr, unsigned int *slen, long long *sval);
11 unsigned char *ziplistInsert(unsigned char *zl, unsigned char *p, char *s, unsigned int slen);
12 unsigned char *ziplistDelete(unsigned char *zl, unsigned char **p, int direction);
13 unsigned char *ziplistDeleteRange(unsigned char *zl, unsigned int index, unsigned int num);
14 unsigned int ziplistCompare(unsigned char *p, char *entry, unsigned int elen);
15 unsigned int ziplistLen(unsigned char *zl);
16 unsigned int ziplistSize(unsigned char *zl);