Skip to content

Commit 6766088

Browse files
authored
fix description about ziplist, the code is ok (redis#6318)
* fix description about ZIP_BIG_PREVLEN(the code is ok), it's similar to antirez#4705 * fix description about ziplist entry encoding field (the code is ok), the max length should be 2^32 - 1 when encoding is 5 bytes
1 parent e9aba28 commit 6766088

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/ziplist.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
* |10000000|qqqqqqqq|rrrrrrrr|ssssssss|tttttttt| - 5 bytes
8787
* String value with length greater than or equal to 16384 bytes.
8888
* Only the 4 bytes following the first byte represents the length
89-
* up to 32^2-1. The 6 lower bits of the first byte are not used and
89+
* up to 2^32-1. The 6 lower bits of the first byte are not used and
9090
* are set to zero.
9191
* IMPORTANT: The 32 bit number is stored in big endian.
9292
* |11000000| - 3 bytes
@@ -194,7 +194,7 @@
194194
#define ZIP_BIG_PREVLEN 254 /* Max number of bytes of the previous entry, for
195195
the "prevlen" field prefixing each entry, to be
196196
represented with just a single byte. Otherwise
197-
it is represented as FF AA BB CC DD, where
197+
it is represented as FE AA BB CC DD, where
198198
AA BB CC DD are a 4 bytes unsigned integer
199199
representing the previous entry len. */
200200

0 commit comments

Comments
 (0)