@Override
    public MediaType streamingDetectUpdate(ZipArchiveEntry zae, InputStream zis,
                                           StreamingDetectContext detectContext) {
        String name = zae.getName();

        if (name.indexOf('/') != -1 || name.indexOf('\\') != -1) {
            return null;
        }
        if (name.toLowerCase(Locale.ROOT).endsWith(".kml")) {
            KMLCounter counter = detectContext.get(KMLCounter.class);
            if (counter == null) {
                counter = new KMLCounter();
                detectContext.set(KMLCounter.class, counter);
            }
            counter.increment();
        }
        return null;
    }
This looks for a single file with a name ending in ".kml" at the root level of the zip file.
<p>
As of Tika 3.2.1, we allow other files at the root level.
<p>
We could make this more robust by requiring xml root detection on the *.kml file.
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-zip-commons/src/main/java/org/apache/tika/detect/zip/KMZDetector.java