BinarySerialization This is a utility function for serializing stuff. You can also use .NET's own BinaryReader/Writer combo, but this works on a Byte array, not a Stream. This is licensed under the MIT license.