이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-27(UTC)"],[],[],null,["# tuningfork::VectorStream Struct Reference\n\ntuningfork::VectorStream\n========================\n\n`#include \u003cprotobuf_nano_util.h\u003e`\n\nA view on the vector provided in `vec`.\n\nSummary\n-------\n\nNo ownership is taken.\n\n| Details ||\n|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Parameters | |-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `vec` | Example usage: ```css+lasso std::vector\u003cuint8_t\u003e v; VectorStream str {&v, 0}; pb_ostream_t stream = {VectorStream::Write, &str, SIZE_MAX, 0}; pb_encode(&stream, ...); ``` | |\n\n| ### Public attributes ||\n|-------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|\n| [it](#structtuningfork_1_1_vector_stream_1a15e8cd3ec11280c7e7060563a197d195) | `size_t` The current position in the vector while decoding or encoding. |\n| [vec](#structtuningfork_1_1_vector_stream_1a3fc88833828997802f63f25ecfc9596e) | `std::vector\u003c uint8_t \u003e *` A vector of bytes that must be valid while `Read` or `Write` are called. |\n\n| ### Public static functions ||\n|-------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------|\n| [Read](#structtuningfork_1_1_vector_stream_1add5291b48820efba50df20aed1acf095)`(pb_istream_t *stream, uint8_t *buf, size_t count)` | `bool` Read `count` bytes from the stream to the given buffer. |\n| [Write](#structtuningfork_1_1_vector_stream_1a9a25c5eebeb2335dfcb069e247784cf8)`(pb_ostream_t *stream, const uint8_t *buf, size_t count)` | `bool` Write `count` bytes from the given buffer to the stream. |\n\nPublic attributes\n-----------------\n\n### it\n\n```scdoc\nsize_t tuningfork::VectorStream::it\n``` \nThe current position in the vector while decoding or encoding. \n\n### vec\n\n```scdoc\nstd::vector\u003c uint8_t \u003e * tuningfork::VectorStream::vec\n``` \nA vector of bytes that must be valid while `Read` or `Write` are called.\n\nThe vector will be resized as needed by `Write`.\n\nPublic static functions\n-----------------------\n\n### Read\n\n```scdoc\nbool tuningfork::VectorStream::Read(\n pb_istream_t *stream,\n uint8_t *buf,\n size_t count\n)\n``` \nRead `count` bytes from the stream to the given buffer.\n\n\u003cbr /\u003e\n\n| Details ||\n|-------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Parameters | |----------|------------------------------| | `stream` | The stream to read from. | | `buf` | The buffer to write to. | | `count` | The number of bytes to read. | |\n| **Returns** | true if successful, false on a read error. |\n\n### Write\n\n```gdscript\nbool tuningfork::VectorStream::Write(\n pb_ostream_t *stream,\n const uint8_t *buf,\n size_t count\n)\n``` \nWrite `count` bytes from the given buffer to the stream.\n\n\u003cbr /\u003e\n\n| Details ||\n|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Parameters | |----------|-------------------------------| | `stream` | The stream to write to. | | `buf` | The buffer to read from. | | `count` | The number of bytes to write. | |\n| **Returns** | true if successful, false on a write error. |"]]