MCPcopy Create free account
hub / github.com/DeNA/PacketProxy / gzip

Method gzip

src/main/java/core/packetproxy/common/Utils.java:239–246  ·  view source on GitHub ↗
(byte[] src)

Source from the content-addressed store, hash-verified

237 }
238
239 public static byte[] gzip(byte[] src) throws Exception {
240 ByteArrayOutputStream out = new ByteArrayOutputStream();
241 GZIPOutputStream gzos = new GZIPOutputStream(out);
242 gzos.write(src);
243 gzos.flush();
244 gzos.finish();
245 return out.toByteArray();
246 }
247
248 public static byte[] ungzip(byte[] src) throws Exception {
249 ByteArrayOutputStream out = new ByteArrayOutputStream();

Callers

nothing calls this directly

Calls 3

finishMethod · 0.80
writeMethod · 0.65
toByteArrayMethod · 0.45

Tested by

no test coverage detected