What is a buffer in Node.js?

后端 未结 3 1072
离开以前
离开以前 2021-02-02 06:34

As you can read in the Node.js documentation on the Buffer class, a buffer

is similar to an array of integers but corresponds to a raw memory allocation o

3条回答
  •  梦毁少年i
    2021-02-02 07:15

    BUFFER is a temporary holding spot for data being moved from one place to another.

    In order to understand what is Buffer, we need to know how a computer will process things. See the chart below.

    The concept is like if you are watching a Youtube Video, you can start to watch a video without downloading the whole video. If your internet speed is too slow, you would see "buffering", that means the computer is trying to collect data in order for you to keep watching that video.

提交回复
热议问题