Ktso Zipset

That’s it. No cryptic flags, no trial versions.

| Dependency | Reason | License | |------------|--------|---------| | github.com/klauspost/compress (Go) or flate2 (Rust) | High‑performance DEFLATE implementation with level control | BSD‑3 | | golang.org/x/crypto (or ring crate) | AES‑256 and PBKDF2 | BSD‑3 | | cobra / clap | Robust CLI parsing & auto‑help | MIT | | github.com/google/uuid (optional) | For generating deterministic archive IDs when needed | BSD‑3 | ktso zipset

| Goal | Metric | Target | |------|--------|--------| | | % of archives using non‑default level | ≥ 80 % within 2 months | | Built‑in encryption (AES‑256) | % of archives encrypted in production | ≥ 95 % after 1 month | | Deterministic archive generation | % of builds with reproducible ZIP hashes | 100 % for CI builds | | CLI parity with legacy zip | Number of legacy scripts that run unchanged | ≥ 99 % (only deprecation warnings) | | Performance | Average time to zip 100 MB of text files (level 6) | ≤ 1.5 × legacy zip time | | Zero external runtime deps | Binary size increase | ≤ 200 KB over existing ktso binary | That’s it

| Command | Synopsis | Options | |---------|----------|---------| | ktso zipset create <output.zip> <source-dir> | Build a new archive. | -c, --level <0‑9> -e, --encrypt -p, --passphrase <string> (or omitted → read stdin) --date <YYYY‑MM‑DD> (deterministic timestamp) --legacy | | ktso zipset list <archive.zip> | List contents. | -v, --verbose (shows size, CRC, compression level) | | ktso zipset extract <archive.zip> <dest-dir> | Extract files. | -p, --passphrase (if encrypted) --overwrite | | ktso zipset verify <archive.zip> [--checksum <sha256>] | Verify integrity & encryption. | -p, --passphrase | | ktso zipset info <archive.zip> | Show metadata. | none | | -c, --level &lt;0‑9&gt; -e, --encrypt -p, --passphrase

| Requirement | Detail | |-------------|--------| | | Creation of a 500 MB mixed‑type archive at level 6 should complete ≤ 2 × legacy zip . | | Security | No plaintext passphrases logged; all crypto operations use Go’s crypto package (or Rust ring if ktso is Rust‑based). | | Portability | Buildable on Linux, macOS, Windows (both x86_64 and ARM64). | | Reliability | Must survive abrupt termination; partially written archives are automatically cleaned up. | | Usability | --help prints a concise usage example and a link to online docs. | | Maintainability | Code isolated in zipset/ package with 100 % unit test coverage and integration tests covering all sub‑commands. | | Observability | Verbose mode ( -v ) outputs timestamps, compression level per file, and encryption status. |