Not sure if this is a common use-case but I've found myself patching redis to change the padding character (used by memset in sdsgrowzero) to pad strings with a value other than \0 when they're extended.

Would this warrant adding an optional 'padchar' parameter to the SETRANGE/bitops commands (0-255, defaulting to 0)?

For background: We're packing doubles to redis and generally want to pad with FF (NaN) instead of 00.

Comment From: yoav-steinberg

The idea is interesting and might be useful but I'm not sure... Closing since it's very old. If you're willing to submit a PR we'll retake the discussion from there...