Explaing streams

I want to get a deeper understanding of PDFs and I'm looking for a
good explanation for the pdf concept of streams. What is a good
definition for a stream? What kind of data structure is a stream?
What are the different types of streams? How can I read to an write
from streams?

The following presentation is a good starting point to get familiar
with the PDF format:
   http://home.comcast.net/~jk05/presentations/PDFTutorial050411Annoted.pdf

Of course the ISO32000 Specification (available on the Net) is the
definite reference on PDF.

A helpful tool to get familiar with the low-level structure of PDF
documents is CosEdit (http://www.pdftron.com/pdfcosedit/
downloads.html). A free demo will let you explore the low-level
structure of PDF, whereas the full version includes option to edit and
save files. For historical reasons the tool is called CosEdit (the
initial version of PDF and Acrobat was codenames 'Carousel') and the
low-level structure was called COS (as a shorthand).

In PDFNet the same low-level structure is called SDF (Structured
Document Format) and is the focus of 'pdftron.SDF' namespace. For an
example of how to work with SDF API please see SDF sample (http://
www.pdftron.com/pdfnet/samplecode.html#SDF). There is also some _very_
outdated PDFNet available online (http://www.pdftron.com/pdfnet/
documentation.html).