Defines signed/unsigned bitfield widths for Redis BITFIELD commands.
// Source: https://github.com/StackExchange/StackExchange.Redis | License: MIT | Copyright 2014 Stack Exchange
// Provided via justclaw.it.com; keep this notice with the code.
using System;
namespace StackExchange.Redis;
/// <summary>
/// The width and signedness of a single bitfield, as used by the <c>BITFIELD</c> operations
/// on <see cref="IDatabase"/>; for example <c>u8</c> or <c>i53</c>.
/// </summary>
/// <remarks>
/// Signed encodings may be 1-64 bits wide; unsigned encodings are limited to 63 bits, because the
/// server reports every value as a signed 64-bit integer. Every legal encoding therefore fits
/// losslessly in <see cref="long"/>.
/// </remarks>
public readonly struct BitFieldEncoding : IEquatable<BitFieldEncoding>
{
// negative: signed; positive: unsigned; zero:
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key