How ekoppenhagen/zip-utils works
Project type and purpose
• This is an open-source JVM library (“zip-utils”) written in Kotlin/Java.
• It provides three core operations on ZIP archives:
• Zipping (compressing files or byte arrays)
• Unzipping (extracting) – marked “TBD” in README
• Comparing two ZIP files or byte arrays for equality
• It has no third-party dependencies and relies on the JDK’s native ZIP APIs.
File structure
Top-level folders and files:
• build.gradle.kts, settings.gradle.kts, gradle/… (Gradle build & wrapper)
• config/detekt.yml (static analysis)
• src/main/kotlin/io/github/ekoppenhagen/ziputils/… (production code)
• src/test/kotlin/io/github/ekoppenhagen/ziputils/… (unit tests)
• src/test/resources (sample ZIPs & directories)
Inside the production code area:
• Zip.kt – main entry point for zipping/unzipping
• CompareZip.kt – entry point for comparing archives
• exceptions/ – custom exception types for failure scenarios
Key insights from the README
• There is no external service or database—everything is file-system or in-memory (byte arrays).
• The library is designed to be dropped into any Kotlin/Java project via Maven/Gradle.
• It exposes a simple static-method API (Zip.file, Zip.byteArray, CompareZip.files, CompareZip.byteArrays).
Details to capture
• The stateless nature of the API and the fact that no persistent storage is used beyond the filesystem.
• The separate code paths for file-based vs byte-array-based operations.
• The error-handling flow when a comparison fails or a target file already exists.