INNER CODE UNIT · C#

UserIdKey

ZoneTree/ZoneTree · benchmarks/zonetree-scan-lab/Program.cs:956

  static byte[] UserIdKey(long userId) =>
      UserIdValue(userId);

  static byte[] UserIdValue(long userId)
  {
    var bytes = new byte[sizeof(long)];
    BinaryPrimitives.WriteInt64BigEndian(bytes, userId);
    return bytes;
  }

  static long ParseUserId(byte[] value)
  {
    if (value.Length != sizeof(long))
      throw new FormatException($"Expected an 8-byte Int64 value, but received {value.Length} bytes.");
    return BinaryPrimitives.ReadInt64BigEndian(value);
  }

  static bool HasPersistedFiles(string path) =>

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…