msoucy / dproto

D Protocol Buffer mixins to create structures at compile time
Boost Software License 1.0
37 stars 16 forks source link

Range support #13

Closed msoucy closed 9 years ago

msoucy commented 10 years ago

Deserializers should handle any arbitrary input range of ubyte, not just ubyte[].

By the same reasoning, serializers should handle output ranges.

MartinNowak commented 9 years ago

Any progress on that? It would be really great if your library could be used without allocating temporary buffers.

msoucy commented 9 years ago

I've been away from the project for a bit, but this is next on my agenda. I'm starting on the deserialization first.

MartinNowak commented 9 years ago

Great, thanks a lot.

msoucy commented 9 years ago

So, I'm not entirely sure about the API that I've been building - is this the "correct"/"cleanest" way to do it?

MartinNowak commented 9 years ago

Yes, the API looks good. You might simply overload serialize instead of naming it serializeTo, but that's merely a matter of taste. I'll try to test it this weekend and will report back on my findings.

MartinNowak commented 9 years ago

Can this be closed now? Should also release a new version 1.1.2.

msoucy commented 9 years ago

I believe it can. Did your testing find anything else that needs to be taken care of with range support?

Also, this is the last remaining issue for 1.2.0, so I'll probably be tagging that when this gets closed.

MartinNowak commented 9 years ago

I think I found a bug when decoding nested messages, but that needs a little more investigation.

msoucy commented 9 years ago

SYN - status?

MartinNowak commented 9 years ago

SYN - status?

Sorry, no time right now, busy with release building.

msoucy commented 9 years ago

No worries, take your time

MartinNowak commented 9 years ago

I can no longer reproduce the bug, maybe my D test server and the python client were out of sync. So good to go for a new version from my side.

msoucy commented 9 years ago

Alright, in that case I'll close this and push the next release!

MartinNowak commented 9 years ago

Thanks, I haven't yet benchmarked/profiled receiving, but work on that shouldn't affect the API.