<p>Recognized string types, things C++ can read and understand as strings.
"String" does not have to mean "text", it can also be "binary".</p>
</div><div><p>Ironically, JavaScript strings are the least performant of all options, to pass or receive to/from C++.
This because we expect UTF-8, which is packed in 8-byte chars. JavaScript strings are UTF-16 internally meaning extra copies and reinterpretation are required.</p>
<p>That's why all events pass data by ArrayBuffer and not JavaScript strings, as they allow zero-copy data passing.</p>
<p>You can always do Buffer.from(arrayBuffer).toString(), but keeping things binary and as ArrayBuffer is preferred.</p>
</div></div></section></section><sectionclass="tsd-panel-group tsd-member-group "><h2>Variables</h2><sectionclass="tsd-panel tsd-member tsd-kind-variable"><aid="DEDICATED_COMPRESSOR_128KB"class="tsd-anchor"></a><h3>DEDICATED_<wbr/>COMPRESSOR_<wbr/>128KB</h3><divclass="tsd-signature tsd-kind-icon">DEDICATED_<wbr/>COMPRESSOR_<wbr/>128KB<spanclass="tsd-signature-symbol">:</span><ahref="index.html#CompressOptions"class="tsd-signature-type"data-tsd-kind="Type alias">CompressOptions</a></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/uNetworking/uWebSockets.js/blob/master/docs/index.d.ts#L351">index.d.ts:351</a></li></ul></aside><divclass="tsd-comment tsd-typography"><divclass="lead">
<p>Sliding dedicated compress window, requires 128KB of memory per socket</p>
</div></div></section><sectionclass="tsd-panel tsd-member tsd-kind-variable"><aid="DEDICATED_COMPRESSOR_16KB"class="tsd-anchor"></a><h3>DEDICATED_<wbr/>COMPRESSOR_<wbr/>16KB</h3><divclass="tsd-signature tsd-kind-icon">DEDICATED_<wbr/>COMPRESSOR_<wbr/>16KB<spanclass="tsd-signature-symbol">:</span><ahref="index.html#CompressOptions"class="tsd-signature-type"data-tsd-kind="Type alias">CompressOptions</a></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/uNetworking/uWebSockets.js/blob/master/docs/index.d.ts#L345">index.d.ts:345</a></li></ul></aside><divclass="tsd-comment tsd-typography"><divclass="lead">
<p>Sliding dedicated compress window, requires 16KB of memory per socket</p>
</div></div></section><sectionclass="tsd-panel tsd-member tsd-kind-variable"><aid="DEDICATED_COMPRESSOR_256KB"class="tsd-anchor"></a><h3>DEDICATED_<wbr/>COMPRESSOR_<wbr/>256KB</h3><divclass="tsd-signature tsd-kind-icon">DEDICATED_<wbr/>COMPRESSOR_<wbr/>256KB<spanclass="tsd-signature-symbol">:</span><ahref="index.html#CompressOptions"class="tsd-signature-type"data-tsd-kind="Type alias">CompressOptions</a></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/uNetworking/uWebSockets.js/blob/master/docs/index.d.ts#L353">index.d.ts:353</a></li></ul></aside><divclass="tsd-comment tsd-typography"><divclass="lead">
<p>Sliding dedicated compress window, requires 256KB of memory per socket</p>
</div></div></section><sectionclass="tsd-panel tsd-member tsd-kind-variable"><aid="DEDICATED_COMPRESSOR_32KB"class="tsd-anchor"></a><h3>DEDICATED_<wbr/>COMPRESSOR_<wbr/>32KB</h3><divclass="tsd-signature tsd-kind-icon">DEDICATED_<wbr/>COMPRESSOR_<wbr/>32KB<spanclass="tsd-signature-symbol">:</span><ahref="index.html#CompressOptions"class="tsd-signature-type"data-tsd-kind="Type alias">CompressOptions</a></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/uNetworking/uWebSockets.js/blob/master/docs/index.d.ts#L347">index.d.ts:347</a></li></ul></aside><divclass="tsd-comment tsd-typography"><divclass="lead">
<p>Sliding dedicated compress window, requires 32KB of memory per socket</p>
</div></div></section><sectionclass="tsd-panel tsd-member tsd-kind-variable"><aid="DEDICATED_COMPRESSOR_3KB"class="tsd-anchor"></a><h3>DEDICATED_<wbr/>COMPRESSOR_<wbr/>3KB</h3><divclass="tsd-signature tsd-kind-icon">DEDICATED_<wbr/>COMPRESSOR_<wbr/>3KB<spanclass="tsd-signature-symbol">:</span><ahref="index.html#CompressOptions"class="tsd-signature-type"data-tsd-kind="Type alias">CompressOptions</a></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/uNetworking/uWebSockets.js/blob/master/docs/index.d.ts#L339">index.d.ts:339</a></li></ul></aside><divclass="tsd-comment tsd-typography"><divclass="lead">
<p>Sliding dedicated compress window, requires 3KB of memory per socket</p>
</div></div></section><sectionclass="tsd-panel tsd-member tsd-kind-variable"><aid="DEDICATED_COMPRESSOR_4KB"class="tsd-anchor"></a><h3>DEDICATED_<wbr/>COMPRESSOR_<wbr/>4KB</h3><divclass="tsd-signature tsd-kind-icon">DEDICATED_<wbr/>COMPRESSOR_<wbr/>4KB<spanclass="tsd-signature-symbol">:</span><ahref="index.html#CompressOptions"class="tsd-signature-type"data-tsd-kind="Type alias">CompressOptions</a></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/uNetworking/uWebSockets.js/blob/master/docs/index.d.ts#L341">index.d.ts:341</a></li></ul></aside><divclass="tsd-comment tsd-typography"><divclass="lead">
<p>Sliding dedicated compress window, requires 4KB of memory per socket</p>
</div></div></section><sectionclass="tsd-panel tsd-member tsd-kind-variable"><aid="DEDICATED_COMPRESSOR_64KB"class="tsd-anchor"></a><h3>DEDICATED_<wbr/>COMPRESSOR_<wbr/>64KB</h3><divclass="tsd-signature tsd-kind-icon">DEDICATED_<wbr/>COMPRESSOR_<wbr/>64KB<spanclass="tsd-signature-symbol">:</span><ahref="index.html#CompressOptions"class="tsd-signature-type"data-tsd-kind="Type alias">CompressOptions</a></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/uNetworking/uWebSockets.js/blob/master/docs/index.d.ts#L349">index.d.ts:349</a></li></ul></aside><divclass="tsd-comment tsd-typography"><divclass="lead">
<p>Sliding dedicated compress window, requires 64KB of memory per socket</p>
</div></div></section><sectionclass="tsd-panel tsd-member tsd-kind-variable"><aid="DEDICATED_COMPRESSOR_8KB"class="tsd-anchor"></a><h3>DEDICATED_<wbr/>COMPRESSOR_<wbr/>8KB</h3><divclass="tsd-signature tsd-kind-icon">DEDICATED_<wbr/>COMPRESSOR_<wbr/>8KB<spanclass="tsd-signature-symbol">:</span><ahref="index.html#CompressOptions"class="tsd-signature-type"data-tsd-kind="Type alias">CompressOptions</a></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/uNetworking/uWebSockets.js/blob/master/docs/index.d.ts#L343">index.d.ts:343</a></li></ul></aside><divclass="tsd-comment tsd-typography"><divclass="lead">
<p>Sliding dedicated compress window, requires 8KB of memory per socket</p>
</div></div></section><sectionclass="tsd-panel tsd-member tsd-kind-variable"><aid="DEDICATED_DECOMPRESSOR"class="tsd-anchor"></a><h3>DEDICATED_<wbr/>DECOMPRESSOR</h3><divclass="tsd-signature tsd-kind-icon">DEDICATED_<wbr/>DECOMPRESSOR<spanclass="tsd-signature-symbol">:</span><ahref="index.html#CompressOptions"class="tsd-signature-type"data-tsd-kind="Type alias">CompressOptions</a></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/uNetworking/uWebSockets.js/blob/master/docs/index.d.ts#L369">index.d.ts:369</a></li></ul></aside><divclass="tsd-comment tsd-typography"><divclass="lead">
<p>Sliding dedicated decompress window, requires 32KB of memory per socket (plus about 23KB)</p>
</div></div></section><sectionclass="tsd-panel tsd-member tsd-kind-variable"><aid="DEDICATED_DECOMPRESSOR_16KB"class="tsd-anchor"></a><h3>DEDICATED_<wbr/>DECOMPRESSOR_<wbr/>16KB</h3><divclass="tsd-signature tsd-kind-icon">DEDICATED_<wbr/>DECOMPRESSOR_<wbr/>16KB<spanclass="tsd-signature-symbol">:</span><ahref="index.html#CompressOptions"class="tsd-signature-type"data-tsd-kind="Type alias">CompressOptions</a></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/uNetworking/uWebSockets.js/blob/master/docs/index.d.ts#L357">index.d.ts:357</a></li></ul></aside><divclass="tsd-comment tsd-typography"><divclass="lead">
<p>Sliding dedicated decompress window, requires 16KB of memory per socket (plus about 23KB)</p>
</div></div></section><sectionclass="tsd-panel tsd-member tsd-kind-variable"><aid="DEDICATED_DECOMPRESSOR_1KB"class="tsd-anchor"></a><h3>DEDICATED_<wbr/>DECOMPRESSOR_<wbr/>1KB</h3><divclass="tsd-signature tsd-kind-icon">DEDICATED_<wbr/>DECOMPRESSOR_<wbr/>1KB<spanclass="tsd-signature-symbol">:</span><ahref="index.html#CompressOptions"class="tsd-signature-type"data-tsd-kind="Type alias">CompressOptions</a></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/uNetworking/uWebSockets.js/blob/master/docs/index.d.ts#L365">index.d.ts:365</a></li></ul></aside><divclass="tsd-comment tsd-typography"><divclass="lead">
<p>Sliding dedicated decompress window, requires 1KB of memory per socket (plus about 23KB)</p>
</div></div></section><sectionclass="tsd-panel tsd-member tsd-kind-variable"><aid="DEDICATED_DECOMPRESSOR_2KB"class="tsd-anchor"></a><h3>DEDICATED_<wbr/>DECOMPRESSOR_<wbr/>2KB</h3><divclass="tsd-signature tsd-kind-icon">DEDICATED_<wbr/>DECOMPRESSOR_<wbr/>2KB<spanclass="tsd-signature-symbol">:</span><ahref="index.html#CompressOptions"class="tsd-signature-type"data-tsd-kind="Type alias">CompressOptions</a></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/uNetworking/uWebSockets.js/blob/master/docs/index.d.ts#L363">index.d.ts:363</a></li></ul></aside><divclass="tsd-comment tsd-typography"><divclass="lead">
<p>Sliding dedicated decompress window, requires 2KB of memory per socket (plus about 23KB)</p>
</div></div></section><sectionclass="tsd-panel tsd-member tsd-kind-variable"><aid="DEDICATED_DECOMPRESSOR_32KB"class="tsd-anchor"></a><h3>DEDICATED_<wbr/>DECOMPRESSOR_<wbr/>32KB</h3><divclass="tsd-signature tsd-kind-icon">DEDICATED_<wbr/>DECOMPRESSOR_<wbr/>32KB<spanclass="tsd-signature-symbol">:</span><ahref="index.html#CompressOptions"class="tsd-signature-type"data-tsd-kind="Type alias">CompressOptions</a></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/uNetworking/uWebSockets.js/blob/master/docs/index.d.ts#L355">index.d.ts:355</a></li></ul></aside><divclass="tsd-comment tsd-typography"><divclass="lead">
<p>Sliding dedicated decompress window, requires 32KB of memory per socket (plus about 23KB)</p>
</div></div></section><sectionclass="tsd-panel tsd-member tsd-kind-variable"><aid="DEDICATED_DECOMPRESSOR_4KB"class="tsd-anchor"></a><h3>DEDICATED_<wbr/>DECOMPRESSOR_<wbr/>4KB</h3><divclass="tsd-signature tsd-kind-icon">DEDICATED_<wbr/>DECOMPRESSOR_<wbr/>4KB<spanclass="tsd-signature-symbol">:</span><ahref="index.html#CompressOptions"class="tsd-signature-type"data-tsd-kind="Type alias">CompressOptions</a></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/uNetworking/uWebSockets.js/blob/master/docs/index.d.ts#L361">index.d.ts:361</a></li></ul></aside><divclass="tsd-comment tsd-typography"><divclass="lead">
<p>Sliding dedicated decompress window, requires 4KB of memory per socket (plus about 23KB)</p>
</div></div></section><sectionclass="tsd-panel tsd-member tsd-kind-variable"><aid="DEDICATED_DECOMPRESSOR_512B"class="tsd-anchor"></a><h3>DEDICATED_<wbr/>DECOMPRESSOR_<wbr/>512B</h3><divclass="tsd-signature tsd-kind-icon">DEDICATED_<wbr/>DECOMPRESSOR_<wbr/>512B<spanclass="tsd-signature-symbol">:</span><ahref="index.html#CompressOptions"class="tsd-signature-type"data-tsd-kind="Type alias">CompressOptions</a></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/uNetworking/uWebSockets.js/blob/master/docs/index.d.ts#L367">index.d.ts:367</a></li></ul></aside><divclass="tsd-comment tsd-typography"><divclass="lead">
<p>Sliding dedicated decompress window, requires 512B of memory per socket (plus about 23KB)</p>
</div></div></section><sectionclass="tsd-panel tsd-member tsd-kind-variable"><aid="DEDICATED_DECOMPRESSOR_8KB"class="tsd-anchor"></a><h3>DEDICATED_<wbr/>DECOMPRESSOR_<wbr/>8KB</h3><divclass="tsd-signature tsd-kind-icon">DEDICATED_<wbr/>DECOMPRESSOR_<wbr/>8KB<spanclass="tsd-signature-symbol">:</span><ahref="index.html#CompressOptions"class="tsd-signature-type"data-tsd-kind="Type alias">CompressOptions</a></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/uNetworking/uWebSockets.js/blob/master/docs/index.d.ts#L359">index.d.ts:359</a></li></ul></aside><divclass="tsd-comment tsd-typography"><divclass="lead">
<p>Sliding dedicated decompress window, requires 8KB of memory per socket (plus about 23KB)</p>
</div></div></section><sectionclass="tsd-panel tsd-member tsd-kind-variable"><aid="DISABLED"class="tsd-anchor"></a><h3>DISABLED</h3><divclass="tsd-signature tsd-kind-icon">DISABLED<spanclass="tsd-signature-symbol">:</span><ahref="index.html#CompressOptions"class="tsd-signature-type"data-tsd-kind="Type alias">CompressOptions</a></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/uNetworking/uWebSockets.js/blob/master/docs/index.d.ts#L333">index.d.ts:333</a></li></ul></aside><divclass="tsd-comment tsd-typography"><divclass="lead">
<p>No compression (always a good idea if you operate using an efficient binary protocol)</p>
</div></div></section><sectionclass="tsd-panel tsd-member tsd-kind-variable"><aid="SHARED_COMPRESSOR"class="tsd-anchor"></a><h3>SHARED_<wbr/>COMPRESSOR</h3><divclass="tsd-signature tsd-kind-icon">SHARED_<wbr/>COMPRESSOR<spanclass="tsd-signature-symbol">:</span><ahref="index.html#CompressOptions"class="tsd-signature-type"data-tsd-kind="Type alias">CompressOptions</a></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/uNetworking/uWebSockets.js/blob/master/docs/index.d.ts#L335">index.d.ts:335</a></li></ul></aside><divclass="tsd-comment tsd-typography"><divclass="lead">
<p>Zero memory overhead compression.</p>
</div></div></section><sectionclass="tsd-panel tsd-member tsd-kind-variable"><aid="SHARED_DECOMPRESSOR"class="tsd-anchor"></a><h3>SHARED_<wbr/>DECOMPRESSOR</h3><divclass="tsd-signature tsd-kind-icon">SHARED_<wbr/>DECOMPRESSOR<spanclass="tsd-signature-symbol">:</span><ahref="index.html#CompressOptions"class="tsd-signature-type"data-tsd-kind="Type alias">CompressOptions</a></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/uNetworking/uWebSockets.js/blob/master/docs/index.d.ts#L337">index.d.ts:337</a></li></ul></aside><divclass="tsd-comment tsd-typography"><divclass="lead">