public boolean isCompressedOrEncrypted() {
    Compression.Algorithm compressAlgo = getCompression();
    boolean compressed = compressAlgo != null && compressAlgo != Compression.Algorithm.NONE;

    Encryption.Context cryptoContext = getEncryptionContext();
    boolean encrypted = cryptoContext != null && cryptoContext != Encryption.Context.NONE;

    return compressed || encrypted;
  }
Returns true when on-disk blocks are compressed, and/or encrypted; false otherwise.
hbase-common/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileContext.java