Skip to content
Newer
Older
100644 17 lines (15 sloc) 1005 Bytes
11ac6ff @pietern implementation for a ziplist with push and pop support
pietern authored
1 #define ZIPLIST_HEAD 0
2 #define ZIPLIST_TAIL 1
c7019f7 @pietern added header ziplist.h
pietern authored
3
4 unsigned char *ziplistNew(void);
b6eb970 @pietern fixed signedness and disambiguate variable names
pietern authored
5 unsigned char *ziplistPush(unsigned char *zl, unsigned char *s, unsigned int slen, int where);
c03206f @pietern ziplistIndex now accepts negative indices
pietern authored
6 unsigned char *ziplistIndex(unsigned char *zl, int index);
8632fb3 @pietern ziplistPrev should return the tail when the argument is ZIP_END
pietern authored
7 unsigned char *ziplistNext(unsigned char *zl, unsigned char *p);
8 unsigned char *ziplistPrev(unsigned char *zl, unsigned char *p);
b6eb970 @pietern fixed signedness and disambiguate variable names
pietern authored
9 unsigned int ziplistGet(unsigned char *p, unsigned char **sval, unsigned int *slen, long long *lval);
10 unsigned char *ziplistInsert(unsigned char *zl, unsigned char *p, unsigned char *s, unsigned int slen);
6a8e35a @pietern ziplistDelete no longer needs a direction now ziplistPrev is fixed
pietern authored
11 unsigned char *ziplistDelete(unsigned char *zl, unsigned char **p);
c7019f7 @pietern added header ziplist.h
pietern authored
12 unsigned char *ziplistDeleteRange(unsigned char *zl, unsigned int index, unsigned int num);
b6eb970 @pietern fixed signedness and disambiguate variable names
pietern authored
13 unsigned int ziplistCompare(unsigned char *p, unsigned char *s, unsigned int slen);
fe45840 @pietern Implements ziplistFind
pietern authored
14 unsigned char *ziplistFind(unsigned char *p, unsigned char *vstr, unsigned int vlen, unsigned int skip);
4812cf2 @pietern add function to retrieve ziplist size in bytes
pietern authored
15 unsigned int ziplistLen(unsigned char *zl);
d4fb9f4 @antirez encoded types API to get blob length
authored
16 size_t ziplistBlobLen(unsigned char *zl);
Something went wrong with that request. Please try again.