private String getCompressionString(final TiffDirectory directory) throws ImagingException {
        final short compressionFieldValue;
        if (directory.findField(TiffTagConstants.TIFF_TAG_COMPRESSION) != null) {
            compressionFieldValue = directory.getFieldValue(TiffTagConstants.TIFF_TAG_COMPRESSION);
        } else {
            compressionFieldValue = COMPRESSION_UNCOMPRESSED_1;
        }
        final int compression = 0xffff & compressionFieldValue;
        switch (compression) {
        case COMPRESSION_UNCOMPRESSED: // None;
            return "None";
        case COMPRESSION_CCITT_1D: // CCITT Group 3 1-Dimensional Modified
            // Huffman run-length encoding.
            return "CCITT_1D";
        case COMPRESSION_CCITT_GROUP_3:
            return "CCITT_3";
        case COMPRESSION_CCITT_GROUP_4:
            return "CCITT_4";
        case COMPRESSION_LZW:
            return "LZW";
        case COMPRESSION_PACKBITS:
            return "PACKBITS";
        case COMPRESSION_DEFLATE_ADOBE:
        case COMPRESSION_DEFLATE_PKZIP:
            return "Deflate";
        default:
            return "None";
        }
    }
Formats a header allowing space for the maximum length of the file paths in the list. If the comma-separated-value option is set, spaces will be
suppressed and commas introduced as separators.

@param maxPathLen the maximum length of a file path (used if csv option is not set)
@param csv        true if formatting is configured for comma-separated-value files.
@return a valid string.
src/test/java/org/apache/commons/imaging/examples/tiff/SurveyTiffFile.java