Any optimization for immutable data in ProtoBuf?

We are currently running into high bandwidth issues in my WCF based project. To reduce bandwidth usage, we have some kind of internal serializer that compacts the data and pushes that data onto the wcf stack.

Example: SendData (stream); stream contains byte [], double? [] []

One of the optimization tricks used is to pass data only if it has changed, which was done by comparing the previous data with the current one and marking a nullable item as null if nothing changed. Items that are null are marked in byte []. Each element is represented by a bit in the [] byte. So if any single data in double? [] [] Unchanged, we keep about 8 bytes!

1) Is there an equivalent to the above in ProtoBuf? is it out of the box? 2) Does protobuf use compression by default all the time? 3) Suggest any other bandwidth optimization technique that might benefit me other than the compression I'm trying now!

We really appreciate expert opinion and suggestion!


source to share

All Articles