From f9ef9eb43c93bdfe8985dfddbac44c682bdf7aeb Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Sun, 31 Mar 2019 14:32:08 +0300 Subject: [PATCH] doc: add note about Buffer octets integer coercion PR-URL: https://github.com/nodejs/node/pull/27030 Reviewed-By: Luigi Pinca Reviewed-By: Ruben Bridgewater Signed-off-by: Beth Griggs --- doc/api/buffer.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/buffer.md b/doc/api/buffer.md index afeef8b3c203ae..c626ba5e0dadd9 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -12,7 +12,8 @@ streams in TCP streams, file system operations, and other contexts. With [`TypedArray`] now available, the `Buffer` class implements the [`Uint8Array`] API in a manner that is more optimized and suitable for Node.js. -Instances of the `Buffer` class are similar to arrays of integers but +Instances of the `Buffer` class are similar to arrays of integers from `0` to +`255` (other integers are coerced to this range by `& 255` operation) but correspond to fixed-sized, raw memory allocations outside the V8 heap. The size of the `Buffer` is established when it is created and cannot be changed.