Hi CapnProto Team, I understand the API to obtain a flat buffer of the built message is capnp::messageToFlatArray.
However, the current API forces you to save the buffer on a returned kj::Array<capnp::word> words object. Is there a way I could pass in a pre-allocated buffer, and let CapnProto to use that for serialisation (which essentially is creating a header + concat all the segments?)? Currently, some of the API has to be implemented in this way, when pre-allocated buffer is present. This introduced an extra copy and serialisation time. https://github.com/eclipse-ecal/ecal/blob/master/ecal/core/include/ecal/msg/capnproto/publisher.h#L147-L150 A good kind of API would be like this: https://github.com/eclipse-ecal/ecal/blob/master/ecal/core/include/ecal/msg/protobuf/publisher.h#L162 Thanks in advance! -- You received this message because you are subscribed to the Google Groups "Cap'n Proto" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/capnproto/70bbe8b2-c06d-495f-ac6d-6eedecbdd305n%40googlegroups.com.
