Web Development Node.js Subjective
Aug 16, 2025

Explain the difference between readFile() and createReadStream().

Detailed Explanation
readFile(): loads entire file into memory, callback-based, good for small files. createReadStream(): reads in chunks, stream-based, memory efficient for large files, supports backpressure, pipe-able.
Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback