Explore Library
Quiz

Zero-copy TypedArray views over Buffers

Understand how Buffer pooling affects creating a zero-copy Uint8Array view over a Node Buffer.

You have a small Node.js Buffer `buf` and want a Uint8Array that shares its memory (zero-copy) and reflects exactly the same bytes. Which is correct and safe?