PGoCareerGoCareer prep tools
Home
LoginSign up
  • Java
  • Python
  • AI
  • React
  • Angular
  • PHP
  • Node.js
  • SQL
  • DSA
  • HTML
  • CSS
  • JS
  • Spring
  • ML
  • MongoDB

Node.js · Theory

Buffers

← All stacks

Theory

20/723

Buffers

Isha only reaches for Buffers when read a big CSV has to stay correct in an upload job.

For Buffers, the event loop is in play. Don’t blame it until you have traced read a big CSV.

Skip Buffers and loading the whole file into RAM shows up in an upload job.

Isha ships Buffers in an upload job. That is the use case worth saying.

Buffers miss — loading the whole file into RAM. Fix it before you talk about advanced Node.js.

After Buffers, Isha should still remember loading the whole file into RAM.

Close Buffers with — “If I skip it, read a big CSV goes wrong like this: loading the whole file into RAM.”

Exam tip

Say Buffers in one breath, then createReadStream, then loading the whole file into RAM.

Example

// Buffers
const users = [
  { id: 1, name: "Asha" },
  { id: 2, name: "Ravi" },
];

function findUser(id) {
  return users.find((u) => u.id === id) ?? null;
}

console.log(findUser(2));
console.log(users.map((u) => u.name));

Buffers: find user 2, then list names. Say both prints.

Short notes

  • DefBuffers — Isha uses it for read a big CSV in an upload job.
  • RuleBuffers → createReadStream.
  • RememberBuffers + the event loop (an upload job).
  • UseBuffers in an upload job (read a big CSV).
  • TrapBuffers — loading the whole file into RAM.
  • ExBuffers → read a big CSV.

Questions

1

Isha asks: why does Buffers exist? Use read a big CSV.

2

Where does Buffers show up in an upload job?

3

Which mistake makes read a big CSV fail?

4

Dry-run createReadStream and say the result.

Previous← Child ProcessNextStreams →
P

GoCareerGo

Utilities · Preparation Hub · Resume · CV · Tools — one workspace.

Workspace

DashboardProfilePreparation HubResume builderCV builderCareer planning

PDF Tools

Merge PDFSplit PDFCompress PDFImage to PDFAll toolsJobs

Image & QR

Compress ImageResize ImageQR ScannerQR GeneratorBlogIT interview prep

Company

FAQFeedbackContactPrivacyTermsSitemap

© 2026 GoCareerGo. Keep moving forward.