msgid ""
msgstr ""
"Project-Id-Version: Chinese (Simplified Han script) (Boost Beast Translation "
"(zh_Hans))\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-07-25 09:49+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Chinese (Simplified Han script) <https://"
"insights.cppalliance.org/weblate/projects/boost-beast-documentation-zh_Hans/"
"doc-qbk-07-concepts-dynamicbuffer-qbk/zh_Hans/>\n"
"Language: zh_Hans\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 2026.5\n"

#. type: section title
#: 10
msgid "DynamicBuffer"
msgstr "动态缓冲区"

#. type: paragraph
#: 12
msgid ""
"A dynamic buffer encapsulates memory storage that may be automatically "
"resized as required, where the memory is divided into an input sequence "
"followed by an output sequence. These memory regions are internal to the "
"dynamic buffer, but direct access to the elements is provided to permit them "
"to be efficiently used with I/O operations, such as the send or receive "
"operations of a socket. Data written to the output sequence of a dynamic "
"buffer object is appended to the input sequence of the same object."
msgstr ""
"动态缓冲区用于封装可根据需要自动调整大小的内存存储。该内存被划分为一个输入序"
"列和一个输出序列。这些内存区域属于动态缓冲区的内部，但提供对元素的直接访问，"
"以便将其高效用于 I/O 操作，例如套接字的发送或接收操作。写入动态缓冲区对象输出"
"序列的数据，将被追加到该对象的输入序列中。"

#. type: paragraph
#: 20
msgid ""
"The interface to this concept is intended to permit the following "
"implementation strategies:"
msgstr "该概念的接口旨在支持以下实现策略："

#. type: list
#: 23
msgid "* A single contiguous octet array, which is reallocated as necessary to"
msgstr "* 使用单个连续字节数组，并根据需要对该数组进行重新分配"

#. type: list
#: 27
msgid ""
"* A sequence of one or more octet arrays, where each array is of the same"
msgstr "* 使用一个或多个字节数组的序列，其中每个数组的大小均相同"

#. type: list
#: 31
msgid ""
"* A sequence of one or more octet arrays of varying sizes. Additional octet"
msgstr "* 使用一个或多个大小可变的字节数组序列。额外的字节"

#. type: heading
#: 36
msgid "Associated With"
msgstr "关联于"

#. type: list
#: 38
msgid ""
"* `boost::asio::is_dynamic_buffer`\n"
"* __ConstBufferSequence__\n"
"* __MutableBufferSequence__"
msgstr ""
"* `boost::asio::is_dynamic_buffer`\n"
"* __ConstBufferSequence__\n"
"* __MutableBufferSequence__"

#. type: heading
#: 42
msgid "Requirements"
msgstr "要求"

#. type: list
#: 44
msgid ""
"* `D` denotes a dynamic buffer class.\n"
"* `a` denotes a value of type `D`.\n"
"* `c` denotes a (possibly const) value of type `D`.\n"
"* `n` denotes a value of type `std::size_t`.\n"
"* `T` denotes a type meeting the requirements for __ConstBufferSequence__.\n"
"* `U` denotes a type meeting the requirements for __MutableBufferSequence__."
msgstr ""
"* `D`：用于表示一个动态缓冲区类。\n"
"* `a`：用于表示一个 `D` 类型的值。\n"
"* `c`：用于表示一个 `D` 类型的值（可能为 const）。\n"
"* `n`：用于表示一个 `std::size_t` 类型的值。\n"
"* `T`：用于表示一个满足 __ConstBufferSequence__ 要求的类型。\n"
"* `U`：用于表示一个满足 __MutableBufferSequence__ 要求的类型。"

#. type: table title
#: 51
msgid "Valid expressions"
msgstr "合法表达式"

#. type: table cell
#: 51
msgid "Expression"
msgstr "表达式"

#. type: table cell
#: 51
msgid "Type"
msgstr "类型"

#. type: table cell
#: 51
msgid "Semantics, Pre/Post-conditions"
msgstr "语义，前置/后置条件"

#. type: table cell
#.
#: 51
msgctxt "51"
msgid "`D::const_buffers_type`"
msgstr ""

#. type: table cell
#: 51
msgid "`T`"
msgstr "`T`"

#. type: table cell
#: 51
msgid "This type represents the memory associated with the input sequence."
msgstr "该类型用于表示与输入序列关联的内存。"

#. type: table cell
#.
#: 51
msgctxt "51"
msgid "`D::mutable_buffers_type`"
msgstr ""

#. type: table cell
#: 51
msgid "`U`"
msgstr "`U`"

#. type: table cell
#: 51
msgid "This type represents the memory associated with the output sequence."
msgstr "该类型用于表示与输出序列关联的内存。"

#. type: table cell
#: 51
msgid "`c.size()`"
msgstr "`c.size()`"

#. type: table cell
#.
#: 51
msgctxt "51"
msgid "`std::size_t`"
msgstr ""

#. type: table cell
#: 51
msgid "Returns the size, in bytes, of the input sequence."
msgstr "返回输入序列的大小（以字节为单位）。"

#. type: table cell
#: 51
msgid "`c.max_size()`"
msgstr "`c.max_size()`"

#. type: table cell
#: 51
msgid ""
"Returns the permitted maximum of the sum of the sizes of the input sequence "
"and output sequence."
msgstr "返回输入序列和输出序列大小之和的允许最大值。"

#. type: table cell
#: 51
msgid "`c.capacity()`"
msgstr "`c.capacity()`"

#. type: table cell
#: 51
msgid ""
"Returns the maximum sum of the sizes of the input sequence and output "
"sequence that the dynamic buffer can hold without requiring reallocation."
msgstr ""
"返回动态缓冲区在无需重新分配内存的情况下，所能容纳的输入序列和输出序列大小之"
"和的最大值。"

#. type: table cell
#: 51
msgid "`c.data()`"
msgstr "`c.data()`"

#. type: table cell
#: 51
msgid ""
"Returns a constant buffer sequence u that represents the memory associated "
"with the input sequence, and where `buffer_size(u) == size()`."
msgstr ""
"返回一个常量缓冲区序列 `u`，该序列表示与输入序列关联的内存，且满足 "
"`buffer_size(u) == size()`。"

#. type: table cell
#: 51
msgid "`a.prepare(n)`"
msgstr "`a.prepare(n)`"

#. type: table cell
#: 51
msgid ""
"Returns a mutable buffer sequence u representing the output sequence, and "
"where `buffer_size(u) == n`. The dynamic buffer reallocates memory as "
"required. All constant or mutable buffer sequences previously obtained using "
"`data()` or `prepare()` are invalidated.\n"
"\n"
"Throws: `length_error` if `size() + n` exceeds `max_size()`."
msgstr ""
"返回一个表示输出序列的可变缓冲区序列 `u`，且满足 `buffer_size(u) == n`。动态"
"缓冲区会根据需要重新分配内存。此前通过 `data()` 或 `prepare()` 获取的所有常量"
"或可变缓冲区序列均会失效。\n"
"\n"
"抛出异常：如果 `size() + n` 超过 `max_size()`，则抛出 `length_error`。"

#. type: table cell
#: 51
msgid "`a.commit(n)`"
msgstr "`a.commit(n)`"

#. type: table cell
#: 51
msgid ""
"Appends `n` bytes from the start of the output sequence to the end of the "
"input sequence. The remainder of the output sequence is discarded. If `n` is "
"greater than the size of the output sequence, the entire output sequence is "
"appended to the input sequence. All constant or mutable buffer sequences "
"previously obtained using `data()` or `prepare()` are invalidated."
msgstr ""
"将输出序列开头的 `n` 个字节追加到输入序列的末尾。输出序列的剩余部分将被丢弃。"
"如果 `n` 大于输出序列的大小，则将整个输出序列追加到输入序列中。此前通过 `data"
"()` 或 `prepare()` 获取的所有常量或可变缓冲区序列均会失效。"

#. type: table cell
#: 51
msgid "`a.consume(n)`"
msgstr "`a.consume(n)`"

#. type: table cell
#: 51
msgid ""
"Removes `n` bytes from beginning of the input sequence. If `n` is greater "
"than the size of the input sequence, the entire input sequence is removed. "
"All constant or mutable buffer sequences previously obtained using `data()` "
"or `prepare()` are invalidated."
msgstr ""
"从输入序列的开头移除 `n` 个字节。如果 `n` 大于输入序列的大小，则移除整个输入"
"序列。此前通过 `data()` 或 `prepare()` 获取的所有常量或可变缓冲区序列均会失效"
"。"

#. type: heading
#: 125
msgid "Models"
msgstr "模型"

#. type: list
#: 127
msgid ""
"* [link beast.ref.boost__beast__basic_flat_buffer `basic_flat_buffer`]\n"
"* [link beast.ref.boost__beast__basic_multi_buffer `basic_multi_buffer`]\n"
"* [link beast.ref.boost__beast__flat_buffer `flat_buffer`]\n"
"* [link beast.ref.boost__beast__flat_static_buffer `flat_static_buffer`]\n"
"* [link beast.ref.boost__beast__flat_static_buffer_base "
"`flat_static_buffer_base`]\n"
"* [link beast.ref.boost__beast__static_buffer `static_buffer`]\n"
"* [link beast.ref.boost__beast__static_buffer_base `static_buffer_base`]\n"
"* [link beast.ref.boost__beast__multi_buffer `multi_buffer`]"
msgstr ""
"* [link beast.ref.boost__beast__basic_flat_buffer `basic_flat_buffer`]\n"
"* [link beast.ref.boost__beast__basic_multi_buffer `basic_multi_buffer`]\n"
"* [link beast.ref.boost__beast__flat_buffer `flat_buffer`]\n"
"* [link beast.ref.boost__beast__flat_static_buffer `flat_static_buffer`]\n"
"* [link beast.ref.boost__beast__flat_static_buffer_base "
"`flat_static_buffer_base`]\n"
"* [link beast.ref.boost__beast__static_buffer `static_buffer`]\n"
"* [link beast.ref.boost__beast__static_buffer_base `static_buffer_base`]\n"
"* [link beast.ref.boost__beast__multi_buffer `multi_buffer`]"
