MCPcopy Create free account
hub / github.com/M66B/FairEmail / compress

Method compress

app/src/main/java/eu/faircode/email/CloudSync.java:815–822  ·  view source on GitHub ↗
(byte[] data)

Source from the content-addressed store, hash-verified

813 }
814
815 public static byte[] compress(byte[] data) throws IOException {
816 try (ByteArrayOutputStream bos = new ByteArrayOutputStream(data.length)) {
817 try (GZIPOutputStream gzip = new GZIPOutputStream(bos)) {
818 gzip.write(data);
819 }
820 return bos.toByteArray();
821 }
822 }
823
824 public static byte[] decompress(byte[] compressed) throws IOException {
825 try (ByteArrayInputStream is = new ByteArrayInputStream(compressed)) {

Callers 12

transformMethod · 0.95
getDataUriStreamMethod · 0.45
downloadImageMethod · 0.45
callMethod · 0.45
onExecuteMethod · 0.45
onExecuteMethod · 0.45
removeTrackingPixelsMethod · 0.45
onDataSetChangedMethod · 0.45
resizeAttachmentMethod · 0.45
getMethod · 0.45
getContentMethod · 0.45
_getMethod · 0.45

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected