English | 简体中文
A simplified variant of Google's ProtoBuf.
A simple-protobuf file can be filled into a C struct directly, but no pointer is supported.
The sp file format is shown below.
[struct_len] + n*[[type][data_len][data]]
type
is a length-variable LE number(less than 2^57^) indicating the aligned type length of each struct item.*_len
is a length-variable LE number(less than 2^57^) indicating the length of*
.data
containsdata_len
bytes of the data.
You can read test.c
to find out the detailed usage.
This array has type uint64_t
, which indicates the aligned length of each struct item. You should call align_struct
to get that array.