Skip to content

Commit

Permalink
Merge pull request #268 from codecrafters-io/update-instructions-comm…
Browse files Browse the repository at this point in the history
…ents-jz6

CC-1450: Update the existing comments to reference key names and be a bit more clear
  • Loading branch information
andy1li authored Oct 14, 2024
2 parents 13f827f + bfd4903 commit 320b724
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions course-definition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -602,22 +602,28 @@ stages:
Here, the total key-value hash table size is 3. */
02 /* The size of the hash table that stores the expires of the keys (size encoded).
Here, the number of keys with an expiry is 2. */
```
```
00 /* The 1-byte flag that specifies the value’s type and encoding.
Here, the flag is 0, which means "string." */
06 66 6F 6F 62 61 72 // The name of the key (string encoded). Here, it's "foobar".
06 62 61 7A 71 75 78 // The value (string encoded). Here, it's "bazqux".
```
FC /* Indicates that this key has an expire,
```
FC /* Indicates that this key ("foo") has an expire,
and that the expire timestamp is expressed in milliseconds. */
15 72 E7 07 8F 01 00 00 /* The expire timestamp, expressed in Unix time,
stored as an 8-byte unsigned long, in little-endian (read right-to-left).
Here, the expire timestamp is 1713824559637. */
00 // Value type is string.
03 66 6F 6F // Key name is "foo".
03 62 61 72 // Value is "bar".
```
FD /* Indicates that this key has an expire,
```
FD /* Indicates that this key ("baz") has an expire,
and that the expire timestamp is expressed in seconds. */
52 ED 2A 66 /* The expire timestamp, expressed in Unix time,
stored as an 4-byte unsigned integer, in little-endian (read right-to-left).
Expand Down

0 comments on commit 320b724

Please sign in to comment.