(byte[] data)
| 25 | public class SynthTest { |
| 26 | |
| 27 | private byte[] decompress(byte[] data) throws IOException { |
| 28 | byte[] buffer = new byte[65536]; |
| 29 | ByteArrayInputStream input = new ByteArrayInputStream(data); |
| 30 | ByteArrayOutputStream output = new ByteArrayOutputStream(); |
| 31 | InputStream brotliInput = newBrotliInputStream(input); |
| 32 | while (true) { |
| 33 | int len = brotliInput.read(buffer, 0, buffer.length); |
| 34 | if (len <= 0) { |
| 35 | break; |
| 36 | } |
| 37 | output.write(buffer, 0, len); |
| 38 | } |
| 39 | brotliInput.close(); |
| 40 | return output.toByteArray(); |
| 41 | } |
| 42 | |
| 43 | private void checkSynth(byte[] compressed, boolean expectSuccess, String expectedOutput) { |
| 44 | byte[] expected = readUniBytes(expectedOutput); |
no test coverage detected