Skip to content

Commit

Permalink
COMPRESS-544 : minor bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterAlfredLee committed Aug 14, 2020
1 parent b927280 commit 870b54c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,13 @@ public long skip(final long n) throws IOException {

if (!currEntry.isSparse()) {
skipped = IOUtils.skip(inputStream, numToSkip);
// for non-sparse entry, we should get the bytes actually skipped bytes along with
// inputStream.available() if inputStream is instance of FileInputStream
skipped = getActuallySkipped(availableOfInputStream, skipped, numToSkip);
} else {
skipped = skipSparse(numToSkip);
}

skipped = getActuallySkipped(availableOfInputStream, skipped, numToSkip);

count(skipped);
entryOffset += skipped;
Expand Down

0 comments on commit 870b54c

Please sign in to comment.