title: Can antlr4 be used to parse very large gzip compressed files?
body: <p>I am trying to parse very large gzip compressed (10+GB) file in <strong>python3</strong>. Instead of creating the parse tree, instead I used embedded actions based on the suggestions in <a href="https://stackoverflow.com/questions/17500291/can-antlr4-java-parser-handle-very-large-files-or-can-it-stream-files">this</a> answer.</p>
  <p>However, looking at the <code>FileStream</code> code it wants to read the entire file and then parse it. This will not work for big files.</p>
  <p>So, this is a two part question.</p>
  <ul>
  <li>Can ANTLR4 use a file stream, probably custom, that allows it to read chunks of the file at a time? What should the class interface look like?</li>
  <li>Predicated on the above having &quot;yes&quot;, would that class need to handle seek operations, which would be a problem if the underlying file is gzip compressed?</li>
  </ul>