Hi protobuf team,
I noticed that, all MessageLite serialization APIs perform an explicit or implicit flush, except for SerializeWithCachedSizes. Because of this, data may remain buffered and not be immediately readable unless an extra flush is performed, details at
https://github.com/protocolbuffers/protobuf/issues/25144.
As a public API, should the behavior of SerializeWithCachedSizes be consistent with the other serialization interfaces? If so, is it possible to add an flush/trim inside SerializeWithCachedSizes, and provide a separate internal-only entry point that preserves the current no-flush behavior for internal callers?
Thanks