Stream vs File

  • A stream can be a packet (e.g. TCP) or frame (e.g. MP3). It has header AND data
  • A stream can be read on a piecemeal basis (chunks of data)
  • A stream uses clear-defined protocol for encoding and decoding
  • A stream can be thought of as items on a conveyor belt being processed one at a time (see Wikipedia)

Useful link: StackOverflow

  • A file may contain metadata but generally, can be thought as simply a container of data (see Wikipedia)
  • A typical small file must be read in its entirety (all-or-nothing). We are not talking about memory-mapped files here
  • A file is simply a text file (not binary)
  • A file is OS-independent

Subjectivity aside, leave a reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s