MinimalZipEntry { public boolean isDeflateCompressed() { if (getCompressionMethod() != 8) { return false; } return getCompressedSize() != getUncompressedSize(); } MinimalZipEntry(
      int compressionMethod,
      long crc32OfUncompressedData,
      long compressedSize,
      long uncompressedSize,
      byte[] fileNameBytes,
      boolean generalPurposeFlagBit11,
      long fileOffsetOfLocalEntry); void setFileOffsetOfCompressedData(long offset); int getCompressionMethod(); long getCrc32OfUncompressedData(); long getCompressedSize(); long getUncompressedSize(); byte[] getFileNameBytes(); String getFileName(); boolean getGeneralPurposeFlagBit11(); long getFileOffsetOfLocalEntry(); long getFileOffsetOfCompressedData(); boolean isDeflateCompressed(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void testIsDeflateCompressed() { Assert.assertTrue(defaultEntry.isDeflateCompressed()); MinimalZipEntry stored = new MinimalZipEntry( COMPRESSION_METHOD, CRC32, 1000, 1000, FILE_NAME_BYTES, GENERAL_PURPOSE_BIT_FLAG_11, FILE_OFFSET_OF_LOCAL_ENTRY); Assert.assertFalse(stored.isDeflateCompressed()); Assert.assertFalse(alteredCompressionMethod.isDeflateCompressed()); }