Hi Perplumblewintz, While technically you could try to customize segment size using a custom MessageBuilder subclass, I don't think it's going to work very well for such tight constraints. Instead, I'd suggest you serialize the whole message into a byte buffer upfront, apply any compression (whether that be packed mode or a real compression algorithm like zstd), then split the final buffer into 100-byte chunks. Then reassemble on the other side before parsing.
-Kenton On Mon, Mar 23, 2020 at 12:41 AM Perplumblewintz Jönz <blueca...@gmail.com> wrote: > I am trying to send Cap'n Proto messages across a proprietary 3rd-party > communication channel, which is limited to sending and receiving 100 bytes > at a time. I was hoping to send each segment as a ZeroMQ multipart message > part, but I would need to ensure that each segment is less than 100 bytes. > Again, I was hopeful that packing could help ensure this, but I'm not clear > that this is true after some time reading the code. It seems that I might > need to adjust the segment size, but data alignment and such is not > something that I've dealt with before and is currently beyond me. > > Can anyone confirm that this should work or possibly suggest an > alternative approach? > > Thanks! > > -- > 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 capnproto+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/capnproto/8291c8d3-db05-43bc-8551-223625059bd4%40googlegroups.com > <https://groups.google.com/d/msgid/capnproto/8291c8d3-db05-43bc-8551-223625059bd4%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 capnproto+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/capnproto/CAJouXQ%3DxUErqWL0i1-uhNkihOqtgDdeAAkRxbJJFec1sgbwa9w%40mail.gmail.com.