Skip to content

Commit

Permalink
fixup! fixup! doc: improve Buffer documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
addaleax committed Mar 7, 2020
1 parent 9c85a8a commit 8cc28ab
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions doc/api/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,13 @@ The character encodings currently supported by Node.js are the following:
encoded using a single byte. Characters that do not fit into that range are
truncated and will be mapped to characters in that range.

Converting a `Buffer` into a string using one of the above is referred to as
decoding, and converting a string into a `Buffer` is referred to as encoding.

Node.js also supports the following two binary-to-text encodings. For
binary-to-text encodings, converting a `Buffer` into a string is typically
referred to as encoding. In the case of character encodings, like the ones
listed above, the naming is reversed.
binary-to-text encodings, the naming convention is reversed: Converting a
`Buffer` into a string is typically referred to as encoding, and converting a
string into a `Buffer` as decoding.

* `'base64'`: [Base64][] encoding. When creating a `Buffer` from a string,
this encoding will also correctly accept "URL and Filename Safe Alphabet" as
Expand Down

0 comments on commit 8cc28ab

Please sign in to comment.