30 google::protobuf::Message *proto) {
31 int fd = open(filename.c_str(), O_RDONLY);
33 AERROR <<
"cannot open file " << filename;
36 google::protobuf::io::FileInputStream raw_input(fd);
38 bool success = google::protobuf::TextFormat::Parse(&raw_input, proto);
45 google::protobuf::Message *proto) {
46 int fd = open(filename.c_str(), O_RDONLY);
48 AERROR <<
"cannot open file " << filename;
51 google::protobuf::io::FileInputStream raw_input(fd);
52 google::protobuf::io::CodedInputStream coded_input(&raw_input);
53 coded_input.SetTotalBytesLimit(std::numeric_limits<int>::max(), 536870912);
55 bool success = proto->ParseFromCodedStream(&coded_input);