About c# struct memory/serialization overhead
<p>My code is like this:</p>

<pre><code>[Serializable]
[StructLayout(LayoutKind.Sequential,Pack=1)]
struct Foo
{
    public byte Bar;            
    public Foo(byte b){Bar=b;}
}
public static void Main (string[] args)
{
    Foo[] arr = new Foo[1000];
    for (int i = 0; i &lt; 1000; i++) {
        arr[i]=new Foo(42);            
    }
    var fmt = new BinaryFormatter();
    using(FileStream f= File.Create("test.bin")){
        fmt.Serialize(f,arr);
    }
    Console.WriteLine (new FileInfo("test.bin").Length);
}
</code></pre>

<h2>The result bin file is 10095 bytes big. Why do my <code>Foo</code> structs eat so many bytes? What's the 9 bytes per struct overhead all about?</h2>

<p>PS:
 I'm writing a lookup library for Chinese characters (it's about infos for circa 70,000 characters), for which db4o or other embeddable databases (like sqlite) are kind of bloat. I thought to store all information in pure string format,which is most memory friendly, but less flexible. I'd like to keep infos in lists and store them as binary serialization into an archive, I've chosen the DotNetZip for the archiving. But the serialization overhead is an unexpected obstacle. A better serialization solution would be good, otherwise I've to save infos in plain string format and parse it by hard-coding.</p>
