title: Delphi open files with streams
body: <p>I asked some days ago <a href="https://stackoverflow.com/questions/45548492/delphi-read-file-at-specific-address">this</a> question in which people told me to use <code>TFileStream</code>. I am reading Głowacki's Expert Delphi and he uses TStreamReader/TStreamWriter. In a comment I have read this:</p>
  
  <blockquote>
    <p>TStreamReader is a helper class for reading textual data. Your file is
    not text, it is binary. Use TFileStream directly instead</p>
  </blockquote>
  
  <p>I'm a bit in trouble with this. I understand that a <a href="https://en.wikipedia.org/wiki/Binary_file" rel="nofollow noreferrer">binary</a> file does not contain text and to with <code>TFileStream</code> I can read binaries (as the documentation says). Let's say that I want to use <code>TStreamWriter</code> to output a series of numbers on a file and then read the content of this file. Am I allowed to do it with a TFileStream?</p>
  
  <p>I see that TStreamWriter has the <code>TEncoding</code> in the constructor so I need to specify utf-8 or ansi for example. Does this affect the structure of the file?</p>
  
  <p>I am new with this and I don't really understand the expert topics I've found online. From what I've understood TFileStream is for binary files and TStreamReader is for files that has some text inside</p>