There are a few problems with what you are suggesting:
1) Binary serialization I found to be more efficient than XML one
That depends on how you serialize.
2) Serializing XML and compressing imposes even larger performance
penalty
Your original question made no mention of a time-cost performance issue.
Only a data-size-cost performance issue. That said, the fact is that a
simple GzipStream compression is an inconsequential cost in comparison to
actually moving data around, especially where a network is involved. If
you are just storing the data in-memory, maybe that's less of a concern to
you. But it doesn't mean that the cost of compression is actually a
problem.
3) if you want to pass object between two machines Serialization is
necessary
"Serialization" with a capital "S"? Absolutely not. Sure, you need to
convert your data into some format readable at the other end. But there's
definitely no requirement that you use the built-in .NET serialization
support.
4) serializing explicitely fixes layout of your structure. If you want
to
add/remove/move around a field, you are doomed. Implementing
ISerializable
interface on the object allows for maximum flexibility!
Only if you are going to include versioning in the protocol or always make
sure both ends of the connection are running the same version. These are
issues that exist no matter what serialization technique you use, explicit
or some implicit built-in approach.
The fact is, the less work you want to put into it yourself, the more
likely you are to have overhead problems. The .NET serialization
implementation includes features that address some of the concerns you
mention, but those features aren't free. They necessarily impose
additional overhead, and you are stuck with whatever other inefficiencies
might exist as well.
Maximum flexibility is mutually exclusive with maximum performance. You
need to decide which is more important to you.
At this point, I am just looking to see if there is a way to reduce 143
bytes overhead, which I believe just carries my object's identifying
information for deserialization, e.g. Assembly, version, class name,
namespace, etc.
There are ways to do that. You just don't seem to want to actually use
any of them.
Pete