| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- software-testing
- 생명의 삶
- ICSE
- vulnerabilties
- fault-localization
- 대학원생
- citrus
- 바이너리 분석
- sotware-testing
- linking
- 소프트웨어 취약저 분석
- graphfuzz
- build
- binary code analaysis
- Cyber Security
- libxml2
- 묵상
- unit-testing
- Environment
- reading critique
- 느헤미야
- protobuf
- fuzzing
- software-engineering
- binary code analysis
- libFuzzer
- FSE
- QT
- Software Engineering
- 프로그램 분석
Archives
- Today
- Total
heechan.yang
[ProtoBuf] The Surface of Protocol Buffer 본문
Protocol Buffer is mechanism to serialalize structured data to a raw byte stream and also parse a raw byte stream to a structure data.

A structure is defined in a file with .proto extension. Compiling this file enables the user to construct a class that is capable of parsing a raw byte stream to its form of structure and back to raw byte stream.
Example
// .proto file
message Person {
optional string name = 1;
optional int32 id = 2;
optional string email = 3;
}
// C++ code
Person john;
fstream input(argv[1], ios::in | ios::binary);
john.ParseFromIstream(&input);
int id = john.id();
std::string name = john.name();
std::string email = john.email();