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

Method decodeBytes

java/org/brotli/integration/Benchmark.java:33–47  ·  view source on GitHub ↗
(InputStream input, OutputStream output, byte[] buffer)

Source from the content-addressed store, hash-verified

31 }
32
33 private static long decodeBytes(InputStream input, OutputStream output, byte[] buffer)
34 throws IOException {
35 long totalOut = 0;
36 int readBytes;
37 BrotliInputStream in = new BrotliInputStream(input);
38 try {
39 while ((readBytes = in.read(buffer)) >= 0) {
40 output.write(buffer, 0, readBytes);
41 totalOut += readBytes;
42 }
43 } finally {
44 in.close();
45 }
46 return totalOut;
47 }
48
49 public static void main(String... args) throws IOException {
50 if (args.length == 0) {

Callers 1

mainMethod · 0.95

Calls 3

readMethod · 0.95
closeMethod · 0.95
writeMethod · 0.45

Tested by

no test coverage detected