throws CodingException, InvalidPositionException, StreamAccessException {
Iterator<Log.Entry> entries = stream.readAll();
while (entries.hasNext()) {
LogEntry logEntry = decodeLogEntry(entries.next());
while (logEntry != null && isFrame(logEntry)) {
logEntry = tryDecodeFrame(logEntry.getFrame(), entries);
}
if (logEntry != null) {
if (logEntry.isSet(LogEntry._Fields.DEFLATED_ENTRY)) {
logEntry = Entries.inflate(logEntry);
vars.deflatedEntriesRead.incrementAndGet();
}
if (logEntry.isSetDeduplicatedSnapshot()) {
logEntry = LogEntry.snapshot(
snapshotDeduplicator.reduplicate(logEntry.getDeduplicatedSnapshot()));
}
reader.execute(logEntry);
vars.entriesRead.incrementAndGet();
}