doc: add note about Buffer octets integer coercion

PR-URL: https://github.com/nodejs/node/pull/27030
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
pull/27037/head
Vse Mozhet Byt 2019-03-31 14:32:08 +03:00
parent e4c6c3bf2e
commit 0e803d1d81
1 changed files with 2 additions and 1 deletions

View File

@ -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.