ZipFileData implements FileData { public long getCompressedSize() { return entry.getCompressedSize(); } ZipFileData(ZipFile zipFile, ZipEntry entry); @Override @MustBeClosed InputStream getInputStream(); @Override Path getPathWithinRoot(); @Override Path getPathWithinModule(); @Override long getSize(); long getCompressedSize();  }
@Test public void getsCorrectCompressedSize() throws Exception { File bundleFile = TestUtils.getTestDataFile(APP_BUNDLE); try (ZipFile zipFile = new ZipFile(bundleFile)) { ZipEntry entry = zipFile.getEntry("base/manifest/AndroidManifest.xml"); ZipFileData data = new ZipFileData(zipFile, entry); assertThat(data.getCompressedSize()).isEqualTo(794L); } }