Forum

Stream Recorder and player, Chunk issues

I’m trying to write a stream of data in a file, and read it sequencially.
The stream consist in a record (Binary serialized) written every frame in the disk,
until here it’s fine, the problem is when i try to deserialize the Chunks of data, because the Bytes count is different for every frame.

Any idea?
Do i need a kind of header to define how many bytes per frame?
Is there a better way to do that?
I’ve seen a set of “Chunk” and “Tokenizer” related nodes but i don’t know how to use them.

StreamRecorder.vl (44.1 KB)

I’d convert the bytes to a Base64 string and write each frame as one line of text. You can then read it as text line by line, get the bytes and deserialize.

2 Likes

Thank you, i got it
StreamRecorder.vl (43.4 KB)