class PDF::Reader::Parser

def stream(dict)

Decodes the contents of a PDF Stream and returns it as a Ruby String.
###############################################################################
def stream(dict)
  raise MalformedPDFError, "PDF malformed, missing stream length" unless dict.has_key?(:Length)
  if @objects
    length = @objects.deref(dict[:Length])
  else
    length = dict[:Length] || 0
  end
  data = @buffer.read(length, :skip_eol => true)
  Error.str_assert(parse_token, "endstream")
  Error.str_assert(parse_token, "endobj")
  PDF::Reader::Stream.new(dict, data)
end