I have a message that serializes into 24 bytes. I write two messages to a 
file resulting in a file thats 48 bytes long. Now I truncate the file to 40 
bytes and write one message, so the file now looks like this: 1 full 
message, one broken, 1 full message. Is there any way to iterate over the 
file and when encountering the broken message detect that it is broken and 
skip directly to the second full message? I've been using python to read 
such file with following code

def main():
    with open('dates.txt', 'r') as fp:
        for date in date_capnp.Date.read_multiple(fp):
                print(date)

But it fails with following message:

Message contains non-struct pointer where struct pointer was expected

Also, if it's possible to detect such message, is it possible to get it's 
position and length? Thank you.

-- 
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].
Visit this group at https://groups.google.com/group/capnproto.

Reply via email to