79737387

Date: 2025-08-16 17:58:19
Score: 1
Natty:
Report link

I think I found a way, it's easier than I thought:

    var size = msg.CalculateSize(); // msg is protobuf::Message
    var span = _cache.AsSpan(4, size); // _cache is pre-allocated byte array
    msg.WriteTo(span);
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: 21k