Class Sofab
- Namespace
- sofab
- Assembly
- SofaBuffers.dll
Library-level constants for the SofaBuffers (sofab) core.
public static class Sofab
- Inheritance
-
Sofab
- Inherited Members
Remarks
Public symbols live under the sofab namespace, as CORELIB_PLAN §6 and
its §13 checklist require; this type collects library-level constants such as
the API version, reachable as sofab.Sofab.*.
Fields
ApiVersion
The SofaBuffers API version (currently 1). Callers and the schema
generator use this to verify compatibility at build or run time. Mirrors
the C SOFAB_API_VERSION and the C++ sofab::API_VERSION.
public const int ApiVersion = 1
Field Value
MinOutputBuffer
The smallest output buffer this port accepts for streaming — i.e.
for a buffer installed together with a FlushSink. This
encoder splits every atomic unit across a flush, so the value is
1: a message of any size streams through a one-byte buffer and
produces bytes identical to the one-shot path. Mirrors the C
SOFAB_MIN_OUTPUT_BUFFER.
public const int MinOutputBuffer = 1
Field Value
Remarks
CORELIB_PLAN §5.1. A buffer installed with a sink must satisfy
buffer.Length - offset >= MinOutputBuffer, at construction and
at every mid-stream BufferSet(byte[], int); it is rejected
there, with an ArgumentOutOfRangeException, never
partway through a message. A buffer installed without a sink is
subject to no minimum at all — no flush can occur, so a message that
encodes to two bytes may be encoded into a two-byte buffer.