Eyeshot Proprietary File Format

Was this article helpful?
1 out of 1 found this helpful


Date Votes
  • I currently use BinaryFormatter. This is very inefficient compared to Protobuffers. But BinaryFormatter is so easy to use since the class description is included in the file. I would like to switch to Protobuffers for so many reasons.

    In this post, it looks like it is required to make a surrogate class for each of my 'real' classes. This is painful because I have 100s of my classes. Is there some automated way to do this?

    https://github.com/mgravell/protobuf-net - In this project, they use attributes. Even this is time consuming. They also have a method of creating a .proto file from the C# source that contains the integer/property definitions. Then the C# code does not require any changes. Maybe this would not work for you since you are deciding what to serialize at runtime (ie: tessellation)

    Also, does this support reference map serialization? A great feature of BinaryFormatter is it contains a reference map. So if you serialize circular references, or the same object multiple times, it deserializes exactly the same. I'm sure protobuffers does not by default, but there maybe an options.

    I guess it is not possible to serialize Eyeshot objects with other protobuf libraries such as the protobuf-net library above? I would prefer to use your system directly.


  • Hi James,

    protobuf-net supports the attributes definition but we use the surrogates to keep a clear separation between the Eyeshot objects definition and the one used for the serialization purpose. In this way, we can better handle versioning and overcome some limits about unsupported types in protobuf-net, like object, enum, multi-dimensional array, etc. Moreover, as you wrote, we can decide what to serialize at runtime according to the content type.

    Regarding the serialization of circular references, you can search on the web, this is one of the first result: https://stackoverflow.com/questions/7185632/understanding-protobuf-net-asreference-with-recursive-referencing


Please sign in to leave a comment.

Articles in this section