title: Use python to serialize/deserialize .Net Objects that use BinaryFormatter
body: <p>Not sure how to ask this question because I may not have the concepts down. I'm also not a C# or .Net person at all.</p>
  
  <p>For a test app, cookie value is base64 wrapped binary data that is using BinaryFormatter for .Net. I'm trying to figure out how to replicate this in python so that I can deserialize, modify data and serialize to finally be sent via HTTP cookie header. I can manage the HTTP request. It looks like a dictionary of value that is then converted to a BitArray. I've looked at pickle, marshal, BitArray and so on. Lots of examples out there but, nothing close to what I'm trying do to AFAIK.</p>
  
  <p>But again, I barely know how to ask the question. Here's an example of the data</p>
  
  <blockquote>
    <p>AAEAAAD/////AQAAAAAAAAAEAQAAAOIBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuRGljdGlvbmFyeWAyW1tTeXN0ZW0uU3RyaW5nLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldLFtTeXN0ZW0uT2JqZWN0LCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXQMAAAAHVmVyc2lvbghDb21wYXJlcghIYXNoU2l6ZQADAAgWU3lzdGVtLk9yZGluYWxDb21wYXJlcggAAAAACQIAAAAAAAAABAIAAAAWU3lzdGVtLk9yZGluYWxDb21wYXJlcgEAAAALX2lnbm9yZUNhc2UAAQEL</p>
  </blockquote>