initial commit

This commit is contained in:
i2p
2026-08-27 10:56:38 -06:00
commit 2e2fbbdb3c
4538 changed files with 820183 additions and 0 deletions
@@ -0,0 +1,39 @@
using System;
namespace PureCrack.Wire;
public sealed class ProtoValue
{
public ProtoWire Wire { get; }
public byte[] Bytes { get; }
public ulong Number { get; }
private ProtoValue(ProtoWire wire, byte[] bytes, ulong number)
{
Wire = wire;
Bytes = bytes;
Number = number;
}
public static ProtoValue OfVarint(ulong v)
{
return new ProtoValue(ProtoWire.Varint, Array.Empty<byte>(), v);
}
public static ProtoValue OfBytes(byte[] b)
{
return new ProtoValue(ProtoWire.Bytes, b, 0uL);
}
public static ProtoValue OfFixed64(ulong v)
{
return new ProtoValue(ProtoWire.Fixed64, Array.Empty<byte>(), v);
}
public static ProtoValue OfFixed32(uint v)
{
return new ProtoValue(ProtoWire.Fixed32, Array.Empty<byte>(), v);
}
}