cunla / fakeredis-py

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

Implement BITFIELD #247

Closed fcr-- closed 1 year ago

fcr-- commented 1 year 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).