17 questions for “Streams & Buffers”

Found in 1 field. Select a question to see its full answer.

Information Technology

17 questions in 1 technology

#QuestionTechnologyTopicLevel
1How would you copy a large file efficiently in Node.js, and what's the difference between fs.copyFile() and manually piping streams? Node.js › File System & File ProcessingNode.jsFile System & File ProcessingIntermediate
2What is backpressure in Node.js streams, and how do you handle it correctly when piping data? Node.js › Advanced Node.jsNode.jsAdvanced Node.jsAdvanced
3What is the difference between fs.readFile() and fs.createReadStream() for reading a file in Node.js? Node.js › File System & File ProcessingNode.jsFile System & File ProcessingBeginner
4What is the difference between multer's diskStorage and memoryStorage engines? Node.js › File Uploads & Media ProcessingNode.jsFile Uploads & Media ProcessingBeginner
5How do you correctly propagate and handle errors from a Node.js stream, given that stream errors aren't caught by a surrounding try/catch? Node.js › Error HandlingNode.jsError HandlingIntermediate
6How would you stream a large file upload directly to processing (like virus scanning or transcoding) without first saving the entire file to disk? Node.js › File Uploads & Media ProcessingNode.jsFile Uploads & Media ProcessingIntermediate
7What is the purpose of the Content-Length and Transfer-Encoding: chunked headers, and why can't a response use both simultaneously? Node.js › HTTP & Web ServersNode.jsHTTP & Web ServersIntermediate
8How would you pipe the output of one child process directly into the input of another, replicating a shell pipeline in Node.js? Node.js › Child Processes & Process ManagementNode.jsChild Processes & Process ManagementIntermediate
9How would you read a large file efficiently using a stream rather than loading it entirely into memory with fs.readFile()? Node.js › File System (fs) ModuleNode.jsFile System (fs) ModuleIntermediate
10What is the global Buffer class, and how does it relate to the process object's broader role in giving access to system-level capabilities? Node.js › Global Objects & the process ObjectNode.jsGlobal Objects & the process ObjectIntermediate