MCPcopy Index your code
hub / github.com/google/brotli / skip

Method skip

java/org/brotli/wrapper/dec/BrotliInputStream.java:103–119  ·  view source on GitHub ↗
(long n)

Source from the content-addressed store, hash-verified

101 }
102
103 @Override
104 public long skip(long n) throws IOException {
105 if (decoder.closed) {
106 throw new IOException("read after close");
107 }
108 long result = 0;
109 while (n > 0) {
110 if (decoder.decode() == -1) {
111 break;
112 }
113 int limit = (int) Math.min(n, (long) decoder.buffer.remaining());
114 decoder.discard(limit);
115 result += limit;
116 n -= limit;
117 }
118 return result;
119 }
120}

Callers

nothing calls this directly

Calls 3

decodeMethod · 0.80
minMethod · 0.80
discardMethod · 0.80

Tested by

no test coverage detected