(String compressed)
| 80 | } |
| 81 | |
| 82 | public static byte[] sdecompress(String compressed) throws IOException { |
| 83 | ByteArrayInputStream bin = new ByteArrayInputStream(Base64.getUrlDecoder().decode(compressed)); |
| 84 | GZIPInputStream gzi = new GZIPInputStream(bin); |
| 85 | ByteArrayOutputStream boas = new ByteArrayOutputStream(); |
| 86 | IO.fullTransfer(gzi, boas, 256); |
| 87 | gzi.close(); |
| 88 | |
| 89 | return boas.toByteArray(); |
| 90 | } |
| 91 | |
| 92 | public static String encode(byte[] data) { |
| 93 | return Base64.getUrlEncoder().encodeToString(data); |
nothing calls this directly
no test coverage detected