एक Buffer हा Node चा raw binary data हाताळण्याचा मार्ग आहे — V8 heap च्या बाहेर संग्रहित केलेला fixed-length byte sequence. JavaScript strings हे text (Unicode) साठी असल्यामुळे, Buffers binary सह काम करण्यासाठी अस्तित्वात आहेत: file contents, network packets, images, encryption, इत्यादी.
Buffers का अस्तित्वात आहेत
JavaScript strings → text (UTF-16). Can't cleanly represent arbitrary bytes.
Buffers → raw bytes (0–255 each). For binary data that isn't text.
जेव्हा तुम्ही file वाचता किंवा network data प्राप्त करता, तो bytes म्हणून येतो — एक Buffer — ज्याला तुम्ही तर text असल्यास string मध्ये decode करू शकता, किंवा binary असल्यास process करू शकता.
