🍋
Menu
General

Stdin/Stdout/Stderr

Standard I/O Streams

The three default data streams — standard input (0), standard output (1), and standard error (2) — used by command-line programs for data flow.

รายละเอียดทางเทคนิค

Stdin/Stdout/Stderr is a common concept in file processing and digital tool workflows. Browser-based implementations use Web APIs (File API, Canvas, Web Workers) to process data entirely on the client device. This architecture eliminates server-side dependencies, reduces latency to near-zero for processing tasks, and ensures complete data privacy since files never leave the browser's sandbox. The primary constraint is browser memory — large files may require streaming or chunked processing approaches.

ตัวอย่าง

```javascript
// Stdin/Stdout/Stderr: file processing example
const file = document.getElementById('fileInput').files[0];
const reader = new FileReader();
reader.onload = (e) => {
  const data = e.target.result;
  console.log(`Loaded: ${file.name} (${file.size} bytes)`);
};
reader.readAsArrayBuffer(file);
```

คำศัพท์ที่เกี่ยวข้อง