BinarySerializer

A declarative serialization framework for controlling formatting of data at the byte level.  Jump to docs for more info and a walkthrough.

Features

  • Field lengths/offset
  • Collections (implicit/explicit termination)
  • Bindings
  • Conditionals
  • Subtypes
  • Converters
  • Enum Support (string or value) 
  • Member Streams
  • MemberSerialized/MemberDeserialized events
  • Member-level Big/Little Endian Support
  • Non-seekable stream support
  • IBinarySerializable
  • Nullable types

Attributes

  Bindable Non-seek Support
Ignore   Yes
SerializeAs   Yes
SerializeAsEnum   Yes
FieldOffset Yes  
FieldLength Yes Yes
FieldCount Yes Yes
Subtype Yes Yes
SerializeWhen Yes Yes
SerializeUntil Yes  
ItemLength Yes Yes
ItemSerializeUntil Item Bindable Yes

Notes

This framework was developed largely to enable interoperability with legacy systems.  While it could be used for data storage or hibernation, that was not the intention and there are likely better frameworks (and approaches, frankly) for that sort of thing.

See the iso9660 project or the unit tests for example usages.

Last edited Nov 10 at 10:34 PM by jefffhaynes, version 61