'How protobuf parses a string from a large string?

I have a message with repeated field, assuming the repeating field size is very large, and then I save the proto object to string (SerializeToString), which size is 200M.

message ChunkBody {
  repeated SingleMessage messages = 1;
}

Now If I want to parse this object (ParseFromString), I have to read the whole 200M file before I can parse it?

Actually I want to implement the function of iteratively reading repeated messages from file.


the environment I want to use

lib: protobuf
language : python


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source