Skip to content
grammophone edited this page Mar 24, 2016 · 12 revisions

This library, also available via Nuget, provides the FastBinaryFormatter class, an IFormatter implementation as a replacement for the standard BinaryFormatter for serialization purposes. It has the following features:

  1. It has a higher upper limit for the number of objects being serialized. The standard BinaryFormatter has a limit of ~13.2 million objects. The FastBinaryFormatter limits 2^31 reference-type instances and poses no limits to value-type instances.
  2. It runs faster and is less memory-demanding, especially during deserialization.
  3. Serialization streams typically have smaller size compared to the ones produced by BinaryFormatter and they are not compatible.
  4. Serialization streams are portable between 32 bit and 64 bit applications.
  5. Relies on the standards. As a consequence, existing serializable classes, like those in the .NET base class library, need no change. Specifically, it supports:
  • SerializableAttribute
  • NonSerializedAttribute
  • OptionalFieldAttribute
  • OnSerializingAttribute
  • OnSerializedAttribute
  • OnDeserializingAttribute
  • OnDeserializedAttribute
  • ISerializable
  • IDeserializationCallback
  • IObjectReference
  • ISerializationSurrogate
Clone this wiki locally