<commit_before><h1 id="bufferobjects">Buffer objects</h1>

<h2>Overview of buffer types</h2>

<p>Duktape provides the following buffer and buffer-related types:</p>

<ul>
<li>Plain buffer value</li>
<li>Duktape.Buffer object</li>
<li>Node.js Buffer object</li>
<li>ArrayBuffer object</li>
<li>DataView and TypedArray views</li>
</ul>

<p>See <a href="https://github.com/svaarala/duktape/blob/master/doc/buffers.rst">buffers.rst</a>
for detailed discussion.</p>

<h2>Property summary</h2>

<p>See <a href="https://github.com/svaarala/duktape/blob/master/doc/buffers.rst">buffers.rst</a>.</p>

<h2>Buffers in Ecmascript code</h2>

<p>See <a href="https://github.com/svaarala/duktape/blob/master/doc/buffers.rst">buffers.rst</a>.</p>

<h2>Buffers in C code</h2>

<p>See <a href="https://github.com/svaarala/duktape/blob/master/doc/buffers.rst">buffers.rst</a>.</p>

<h2>Current limitations</h2>

<ul>
<li>See <a href="#typedarray-custombehavior">TypedArray binding</a> custom
    behavior.</li>
<li>See <a href="#nodejsbuffer-custombehavior">Node.js Buffer binding</a> custom
    behavior.</li>
</ul><commit_msg>Minimal bufferobject C API guide text<commit_after><h1 id="bufferobjects">Buffer objects</h1>

<h2>Overview of buffer types</h2>

<p>Duktape provides the following buffer and buffer-related types:</p>

<ul>
<li>Plain buffer value</li>
<li>Duktape.Buffer object</li>
<li>Node.js Buffer object</li>
<li>ArrayBuffer object</li>
<li>DataView and TypedArray views</li>
</ul>

<p>See <a href="https://github.com/svaarala/duktape/blob/master/doc/buffers.rst">buffers.rst</a>
for detailed discussion.</p>

<h2>Property summary</h2>

<p>See <a href="https://github.com/svaarala/duktape/blob/master/doc/buffers.rst">buffers.rst</a>.</p>

<h2>Buffers in Ecmascript code</h2>

<p>See <a href="https://github.com/svaarala/duktape/blob/master/doc/buffers.rst">buffers.rst</a>.</p>

<h2>Buffers in C code</h2>

<p>Duktape API calls prior to 1.3 deal with plain buffer values only.
To avoid incompatible changes in Duktape 1.3, separate API calls have
been added to deal with any buffer-like values, including both plain
buffers and buffer objects.  API calls dealing with buffer objects have
been tagged <code>bufferobject</code> in the API documentation:</p>
<ul>
<li><code><a href="api.html#taglist-bufferobject">bufferobject</a></code> API calls</li>
</ul>

<p>The following test case illustrates basic buffer object use from C code:</p>
<ul>
<li><a href="https://github.com/svaarala/duktape/blob/master/api-testcases/test-bufferobject-example-1.c">test-bufferobject-example-1.c</a></li>
</ul>

<h2>Current limitations</h2>

<ul>
<li>See <a href="#typedarray-custombehavior">TypedArray binding</a> custom
    behavior.</li>
<li>See <a href="#nodejsbuffer-custombehavior">Node.js Buffer binding</a> custom
    behavior.</li>
</ul>
{'fraction_non_alphanumeric': 0.1751592356687898, 'fraction_numerical': 0.010615711252653927, 'mean_word_length': 5.310267857142857, 'pattern_counts': {'":': 0, '<': 123, '<?xml version=': 0, '>': 123, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '342921', 'n_tokens_mistral': 1073, 'n_tokens_neox': 1063, 'n_words': 221}