MCPcopy
hub / github.com/google/brotli / decodeBytes

Method decodeBytes

java/org/brotli/dec/Decoder.java:10–25  ·  view source on GitHub ↗
(InputStream input, OutputStream output, byte[] buffer)

Source from the content-addressed store, hash-verified

8
9public class Decoder {
10 private static long decodeBytes(InputStream input, OutputStream output, byte[] buffer)
11 throws IOException {
12 long totalOut = 0;
13 int readBytes;
14 BrotliInputStream in = new BrotliInputStream(input);
15 in.enableLargeWindow();
16 try {
17 while ((readBytes = in.read(buffer)) >= 0) {
18 output.write(buffer, 0, readBytes);
19 totalOut += readBytes;
20 }
21 } finally {
22 in.close();
23 }
24 return totalOut;
25 }
26
27 private static void decompress(String fromPath, String toPath, byte[] buffer) throws IOException {
28 long start;

Callers 1

decompressMethod · 0.95

Calls 4

enableLargeWindowMethod · 0.95
readMethod · 0.95
closeMethod · 0.95
writeMethod · 0.45

Tested by

no test coverage detected