(InputStream input, OutputStream output, byte[] buffer)
| 8 | |
| 9 | public 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; |
no test coverage detected