MCPcopy Create free account
hub / github.com/VolmitSoftware/Adapt / sdecompress

Method sdecompress

src/main/java/com/volmit/adapt/util/IO.java:82–90  ·  view source on GitHub ↗
(String compressed)

Source from the content-addressed store, hash-verified

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);

Callers

nothing calls this directly

Calls 4

fullTransferMethod · 0.95
toByteArrayMethod · 0.80
closeMethod · 0.65
decodeMethod · 0.45

Tested by

no test coverage detected