Buffer objects

Overview of buffer types

Duktape provides the following buffer and buffer-related types:

Type Standard Duktape version Description
Plain buffer No
Duktape specific
1.0 Plain, primitive buffer value (not an object), similar to how a plain string relates to a String object
Duktape.Buffer object No
Duktape specific
1.0 Object wrapped plain buffer, similar to how a String object relates to a plain string
Node.js Buffer object No
Node.js-like
1.3 Object with Node.js Buffer API
ArrayBuffer object Yes
Khronos/ES6
1.3 Standard object type for representing a byte array
DataView, typed array objects Yes
Khronos/ES6
1.3 View objects to access an underlying ArrayBuffer

See buffers.rst for a detailed discussion, including a detailed table of buffer types and their properties.

Working with buffers

Buffer values work in both C and Ecmascript code:

See How to work with buffers for examples.

Current limitations