Lines Matching refs:stream

2  * The main function is pb_encode. You also need an output stream, and the
33 * Also, NULL pointer marks a 'sizing stream' that does not
38 bool (*callback)(pb_ostream_t *stream, const pb_byte_t *buf, size_t count);
53 /* Encode a single protocol buffers message from C structure into a stream.
61 * pb_ostream_t stream;
64 * stream = pb_ostream_from_buffer(buffer, sizeof(buffer));
65 * pb_encode(&stream, MyMessage_fields, &msg);
67 bool pb_encode(pb_ostream_t *stream, const pb_msgdesc_t *fields, const void *src_struct);
83 bool pb_encode_ex(pb_ostream_t *stream, const pb_msgdesc_t *fields, const void *src_struct, unsigned int flags);
97 /* Create an output stream for writing into a memory buffer.
98 * The number of bytes written can be found in stream.bytes_written after
101 * Alternatively, you can use a custom stream that writes directly to e.g.
106 /* Pseudo-stream for measuring the size of a message without actually storing
111 * pb_ostream_t stream = PB_OSTREAM_SIZING;
112 * pb_encode(&stream, MyMessage_fields, &msg);
113 * printf("Message size is %d\n", stream.bytes_written);
121 /* Function to write into a pb_ostream_t stream. You can use this if you need
124 bool pb_write(pb_ostream_t *stream, const pb_byte_t *buf, size_t count);
133 bool pb_encode_tag_for_field(pb_ostream_t *stream, const pb_field_iter_t *field);
137 bool pb_encode_tag(pb_ostream_t *stream, pb_wire_type_t wiretype, uint32_t field_number);
142 bool pb_encode_varint(pb_ostream_t *stream, uint64_t value);
144 bool pb_encode_varint(pb_ostream_t *stream, uint32_t value);
150 bool pb_encode_svarint(pb_ostream_t *stream, int64_t value);
152 bool pb_encode_svarint(pb_ostream_t *stream, int32_t value);
156 bool pb_encode_string(pb_ostream_t *stream, const pb_byte_t *buffer, size_t size);
160 bool pb_encode_fixed32(pb_ostream_t *stream, const void *value);
165 bool pb_encode_fixed64(pb_ostream_t *stream, const void *value);
171 bool pb_encode_float_as_double(pb_ostream_t *stream, float value);
179 bool pb_encode_submessage(pb_ostream_t *stream, const pb_msgdesc_t *fields, const void *src_struct);