# CPointer.writeBytes

Write bytes into managed storage.

```js
pointer.writeBytes(bytes, offset = 0)
```

## Arguments

| Argument | Type | Meaning |
| --- | --- | --- |
| `bytes` | array \| typed array | Byte values 0..255; at most 65536 per operation. |
| `offset` | number | Starting byte offset; default 0. |

## Returns

This pointer.

## Example

```js
const buffer = C.alloc(4);
buffer.writeBytes([1, 2, 3, 4]);
buffer.release();
```

## Notes

The write must fit the managed bounds.

[All JavaScript APIs](https://mcp.applesauceos.com/doc/api.md) · [Automation playbook](https://mcp.applesauceos.com/doc/ai.md)
