Related to #101, but slightly different. When reading in messages from a network buffer (or mmap file in #121), it happens frequently that the message buffer is significantly larger than the message itself. When callingread_message_from_words, there's a length check that errors out in this situation. While I'm happy to pass read_message the correct-size buffer, that requires me to read the segment table to figure out message size, and read_segment_table is private.
To better support streaming use cases, is it possible to either allow the length check to succeed if too many words are supplied, or move read_segment_table to the public API?
Side note: if a decision is made to mark read_segment_table as public, having an additional method to actually calculate message size would be incredibly helpful. I was able to guess and check, but having an approved means would be great.
Related to #101, but slightly different. When reading in messages from a network buffer (or
mmapfile in #121), it happens frequently that the message buffer is significantly larger than the message itself. When callingread_message_from_words, there's a length check that errors out in this situation. While I'm happy to passread_messagethe correct-size buffer, that requires me to read the segment table to figure out message size, andread_segment_tableis private.To better support streaming use cases, is it possible to either allow the length check to succeed if too many words are supplied, or move
read_segment_tableto the public API?Side note: if a decision is made to mark
read_segment_tableas public, having an additional method to actually calculate message size would be incredibly helpful. I was able to guess and check, but having an approved means would be great.