title: c# binary serialization to file line by line or how to seperate
body: <p>I have a collection of objects at runtime, which is already serializable, I need to persist the state of the object to a file. I did a quick coding using BinaryFormatter and saved A serialized object to a file.</p>
  
  <p>I was thinking that I can save object per line. but when i open the file in a notepad, it was longer than a line. It wasnt scrolling. How can i store an binary serialized object per line?</p>
  
  <p>I am aware that i can use a separator after each object so while reading them back to the application, i can know the end of the object. Well, according to information theory, this increases the size of the data(Sipser book). </p>
  
  <p>What s the best algorithm to come up with a separator that woudldnt break the information?</p>
  
  <p>Instead of binary serialization? Do you think JSon format is more feasible? can i store the entity in a json format, line by line?</p>
  
  <p>Also, serialization/deserialization introduces overhead, hits the performance. Would Json be faster?</p>
  
  <p>ideas?</p>
  
  <p>Thanks.</p>
  
  <p>Thanks.</p>