code: public JBBPFieldStruct parse(final InputStream in, final JBBPVarFieldProcessor varFieldProcessor, final JBBPExternalValueProvider externalValueProvider) throws IOException {
      final JBBPBitInputStream bitInStream = in instanceof JBBPBitInputStream ? (JBBPBitInputStream) in : new JBBPBitInputStream(in, bitOrder);
      this.finalStreamByteCounter = bitInStream.getCounter();
  
      final JBBPNamedNumericFieldMap fieldMap;
      if (this.compiledBlock.hasEvaluatedSizeArrays() || this.compiledBlock.hasVarFields()) {
        fieldMap = new JBBPNamedNumericFieldMap(externalValueProvider);
      } else {
        fieldMap = null;
      }
  
      if (this.compiledBlock.hasVarFields()) {
        JBBPUtils.assertNotNull(varFieldProcessor, "The Script contains VAR fields, a var field processor must be provided");
      }
      try {
        return new JBBPFieldStruct(new JBBPNamedFieldInfo("", "", -1), parseStruct(bitInStream, new JBBPIntCounter(), varFieldProcessor, fieldMap, new JBBPIntCounter(), new JBBPIntCounter(), false));
      } finally {
        this.finalStreamByteCounter = bitInStream.getCounter();
      }
    }
docs: Parse am input stream with defined external value provider.
  
  @param in                    an input stream which content will be parsed, it must not be null
  @param varFieldProcessor     a var field processor, it may be null if there is
  not any var field in a script, otherwise NPE will be thrown during parsing
  @param externalValueProvider an external value provider, it can be null but
  only if the script doesn't have fields desired the provider
  @return the parsed content as the root structure
  @throws IOException it will be thrown for transport errors