mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2026-11-29 18:37:18 +08:00
Co-authored-by: nilbuild <4921183+nilbuild@users.noreply.github.com>
7 lines
602 B
Markdown
7 lines
602 B
Markdown
# GETBIT
|
|
|
|
The `GETBIT` command in Redis retrieves the value of a specific bit at a given offset in a string key. It returns either 0 or 1, depending on the state of the bit at that position. If the key does not exist, the command returns 0, as it treats non-existing keys as empty strings. This command is particularly useful for working with bitmap data structures, allowing you to check the status of individual bits in a more efficient manner compared to retrieving the entire string.
|
|
|
|
Visit the following resources to learn more:
|
|
|
|
- [@official@GETBIT](https://redis.io/docs/latest/commands/getbit/) |