[This is preliminary documentation and is subject to change.]
Provides various IO-related functions like error correction and efficient binary streamers
Classes
Class | Description | |
---|---|---|
![]() | BufferSegmentReadingStream |
Implements a read-only stream wrapper around a segment of byte[].
Unlike MemoryStream, this class allows for use of long indexes and reuse the same stream instance with different byte[].
|
![]() | ConsoleUtils |
Provides various console-helper utilities
|
![]() | LEB128 |
Facilitates int64/uint64 LEB128 encode/decode
See https://en.wikipedia.org/wiki/LEB128
See http://llvm.org/docs/doxygen/html/LEB128_8h_source.html
|
![]() | NFXIOException |
Base exception thrown by the IO-related classes
|
![]() | NonClosingStreamWrap |
Implements a stream wrapper that does not close/get disposed.
This stream is needed for TextWriter defect that always closes stream in its destructor
|
![]() | ReadingStreamer |
Reads primitives from stream
|
![]() | SlimFormat |
A format that writes into binary files in an efficient way using variable-length integers, strings and meta handles.
Developers may derive new formats that support custom serialization of their business-related types. This may increase performance dramatically.
For example, in a drawing application a new format may derive from SlimFormat to natively serialize Point and PolarPoint structs to yield faster serialization times.
NFX.Serialization.Slim.SlimSlimSerializer is capable of SlimFormat-derived format injection, in which case it will automatically discover new types that are directly supported
by the format.
|
![]() | SlimReader |
Reads primitives and other supported types from Slim-format stream. Use factory method of SlimFormat instance to create a new instance of SlimReader class
|
![]() | SlimWriter |
Writes primitives and other supported types to Slim-format stream. Use factory method of SlimFormat instance to create a new instance of SlimWriter class
|
![]() | Streamer |
Represents a base for stream readers and writers.
Streamer object instances ARE NOT THREAD-safe
|
![]() | StreamerFormat |
Describes a format - apair of readers/writers along with their capabilities - what types format supports natively
|
![]() | StreamerFormat TReader, TWriter |
Describes a format - apair of readers/writers along with their capabilities.
Developers may derive new formats that support custom serialization schemes
|
![]() | WritingStreamer |
Writes primitives to stream
|
Structures
Structure | Description | |
---|---|---|
![]() | MetaHandle |
Represents a tuple of an unsigned integer with optional int or string metadata. If metadata is null then integer is stored by itself in an efficient way.
The type is useful for storage of handles/indexes (such as pointer surrogates) with optional description of pointed-to data (such as type information).
A special case is reserved for strings which are immutable yet reference types, in which case a special handle INLINED_STRING_HANDLE is set to indicate that
"Metadata" really contains string data that this handle should resolve into. Check "IsInlinedString" property to see if string was inlined.
Check "IsInlinedValueType" is set to true when a struct/valuetype is inlined and "Metadata" contains type spec
|
![]() | VarIntStr |
Holds either an integer or a string value.
This is useful for metadata, i.e. types, if type is known an integer is sent, otherwise a full type name is sent
|