cunla / fakeredis-py

Implementation of Redis in python without having a Redis server running. Fully compatible with using redis-py.
https://fakeredis.moransoftware.ca/
BSD 3-Clause "New" or "Revised" License
281 stars 47 forks source link

Implement BITFIELD #247

Closed fcr-- closed 11 months ago

fcr-- commented 11 months ago

One less command missing 😁

Note: this is not the most optional implementation, as writes are written bit by bit, needing up to 64 writes. However this was done in the name of simplicity, specially considering how messed up is the overflow detection on the original REDIS codebase: https://github.com/redis/redis/blob/unstable/src/bitops.c#L288 (which here is contains a ton of modular arithmetic manipulation in order to make it compatible).