Google's Java implementation of protobuf provides the writeDelimitedTo/parseDelimitedFrom methods, basically just prefixing individual messages with their length and thus allowing multiple messages to be combined in one output stream.
I've been trying to cobble this together myself, but I think it would be nice to have as part of the library as well. This would make API creation using your library much easier, since you might wanna support requests querying multiple resources/messages of one kind.
If you're not likely to implement this, could you maybe point me in the right direction for doing this myself? It's no problem for small messages (where the length fits into 8 bytes)
pack("c*", strlen($message->toStream()));
but for larger messages, packing with v* or V* produces errors on the client's side, because their length needs to be converted to a varint.
Google's Java implementation of protobuf provides the writeDelimitedTo/parseDelimitedFrom methods, basically just prefixing individual messages with their length and thus allowing multiple messages to be combined in one output stream.
I've been trying to cobble this together myself, but I think it would be nice to have as part of the library as well. This would make API creation using your library much easier, since you might wanna support requests querying multiple resources/messages of one kind.
If you're not likely to implement this, could you maybe point me in the right direction for doing this myself? It's no problem for small messages (where the length fits into 8 bytes)
but for larger messages, packing with v* or V* produces errors on the client's side, because their length needs to be converted to a varint.