Skip to content

Commit 93f550c

Browse files
Copilotslachiewicz
andcommitted
Add comparison to Commons Compress in README
Co-authored-by: slachiewicz <[email protected]>
1 parent b0c036c commit 93f550c

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,59 @@ Plexus-archiver
88

99
The current master is now at https://github.com/codehaus-plexus/plexus-archiver
1010

11+
## What is Plexus Archiver?
12+
13+
Plexus Archiver is a high-level Java API for creating and extracting archives (ZIP, JAR, TAR, etc.). It provides a simple, unified interface for working with various archive formats, abstracting away the low-level details of archive manipulation.
14+
15+
## Comparison to Apache Commons Compress
16+
17+
Plexus Archiver builds on top of [Apache Commons Compress](https://commons.apache.org/proper/commons-compress/) (since version 2.5) and provides additional capabilities:
18+
19+
### Apache Commons Compress
20+
21+
Commons Compress is a low-level library that provides:
22+
- Direct access to archive formats and compression algorithms
23+
- Fine-grained control over archive entries and their attributes
24+
- Support for a wide range of archive formats (ZIP, TAR, AR, CPIO, etc.)
25+
- Streaming API for memory-efficient processing
26+
27+
### Plexus Archiver
28+
29+
Plexus Archiver is a higher-level abstraction layer that adds:
30+
31+
**Simplified API**: Easy-to-use builder-style interface for common archiving tasks without dealing with low-level stream handling.
32+
33+
**Advanced Features**:
34+
- File selectors and filtering capabilities
35+
- Automatic handling of file permissions and attributes
36+
- Built-in support for directory scanning with includes/excludes patterns
37+
- Reproducible builds support (configurable timestamps and ordering)
38+
- Duplicate handling strategies
39+
- File mappers for transforming entry names during archiving/unarchiving
40+
- Protection against ZIP bombs (configurable output size limits)
41+
42+
**Build Tool Integration**: Designed for integration with build tools like Maven, with support for:
43+
- Modular JAR creation (Java 9+ modules)
44+
- Manifest generation and customization
45+
- Archive finalizers for post-processing
46+
47+
**Dependency Injection Ready**: Includes JSR-330 annotations for easy integration with dependency injection frameworks.
48+
49+
### When to Use Which?
50+
51+
**Use Apache Commons Compress when:**
52+
- You need fine-grained control over archive format details
53+
- You're working with streaming data or large archives
54+
- You need to support specialized or uncommon archive formats
55+
- Memory efficiency is critical
56+
57+
**Use Plexus Archiver when:**
58+
- You want a simple, declarative API for common archiving tasks
59+
- You're building a Maven plugin or similar build tool
60+
- You need reproducible builds with consistent archive ordering
61+
- You want built-in file filtering and selection capabilities
62+
- You need to create modular JARs or other specialized Java archives
63+
1164
## Important Hint
1265

1366
Based on a hint of snyk.io security team they have found a possible security issue.

0 commit comments

Comments
 (0)