9 #ifndef luasandbox_util_protobuf_h_ 10 #define luasandbox_util_protobuf_h_ 18 #define LSB_MAX_VARINT_BYTES 10 56 unsigned char wiretype);
const char * lsb_err_value
LSB_UTIL_EXPORT lsb_err_value lsb_pb_write_double(lsb_output_buffer *ob, double i)
Writes a double to the output buffer.
LSB_UTIL_EXPORT int lsb_pb_output_varint(char *buf, unsigned long long i)
Outputs the varint to an existing buffer.
Data stream output buffer.
Shared types and structures.
LSB_UTIL_EXPORT lsb_err_value lsb_pb_update_field_length(lsb_output_buffer *ob, size_t len_pos)
Updates the field length in the output buffer once the size is known, this allows for single pass enc...
LSB_UTIL_EXPORT const char * lsb_pb_read_key(const char *p, int *tag, int *wiretype)
Extract the tag and wiretype from a protobuf key.
LSB_UTIL_EXPORT lsb_err_value lsb_pb_write_string(lsb_output_buffer *ob, char tag, const char *s, size_t len)
Writes a string to the output buffer.
LSB_UTIL_EXPORT lsb_err_value lsb_pb_write_key(lsb_output_buffer *ob, unsigned char tag, unsigned char wiretype)
Writes a field key (tag id/wire type) to the output buffer.
LSB_UTIL_EXPORT lsb_err_value lsb_pb_write_varint(lsb_output_buffer *ob, unsigned long long i)
Writes a varint encoded number to the output buffer.
LSB_UTIL_EXPORT lsb_err_value lsb_pb_write_bool(lsb_output_buffer *ob, int i)
Writes a bool to the output buffer.
LSB_UTIL_EXPORT const char * lsb_pb_read_varint(const char *p, const char *e, long long *vi)
Reads the varint into the provided variable.