MCPcopy Index your code
hub / github.com/VolmitSoftware/Adapt / decompress

Method decompress

src/main/java/com/volmit/adapt/util/IO.java:72–80  ·  view source on GitHub ↗
(String gz)

Source from the content-addressed store, hash-verified

70 }
71
72 public static String decompress(String gz) throws IOException {
73 ByteArrayInputStream bin = new ByteArrayInputStream(Base64.getUrlDecoder().decode(gz));
74 GZIPInputStream gzi = new GZIPInputStream(bin);
75 ByteArrayOutputStream boas = new ByteArrayOutputStream();
76 IO.fullTransfer(gzi, boas, 256);
77 gzi.close();
78
79 return boas.toString(StandardCharsets.UTF_8);
80 }
81
82 public static byte[] sdecompress(String compressed) throws IOException {
83 ByteArrayInputStream bin = new ByteArrayInputStream(Base64.getUrlDecoder().decode(compressed));

Callers

nothing calls this directly

Calls 4

fullTransferMethod · 0.95
closeMethod · 0.65
decodeMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected