InputStream inputStream = new FileInputStream(file);
inputStream = FileUtil.tryGzipInput(inputStream);
final BundleStreamSource source;
if(parser instanceof StreamingParser) {
final StreamingParser streamParser = (StreamingParser) parser;
streamParser.initStream(inputStream);
source = streamParser;
}
else {
MultipleObjectsBundle parsingResult = parser.parse(inputStream);
// normalize objects and transform labels