ZipWizard is a Windows CLI tool for file operations and basic compression/decompression using an LZ77-style approach. It supports create, edit, rename, delete, search, file info, zip, and unzip operations from an interactive menu.
The codebase is now physically organized for maintainability:
Zip-Wizard/
README.md
build.bat
run.bat
smoke-test.bat
.gitignore
include/
*.h
src/
*.c
docs/
CP_OPTIMIZATION_ROADMAP.md
Open Command Prompt in repository root and run:
build.bat
run.batYou can also run a smoke test:
smoke-test.batRun LZ77 roundtrip tests:
run-lz77-tests.bat- File operations: create, edit, rename, delete.
- Search: by file name pattern or by keyword in
.txtfiles. - File metadata: full path, attributes, and timestamps.
- Compression/decompression: LZ77-based zip/unzip workflow.
- CLI UX: menu-driven interaction with input validation.
- Interactive menu supports arrow-key selector + Enter execution.
- Menu layout reflows on terminal resize while waiting for selection.
- Non-interactive CLI mode for automation.
- Batch zip/unzip with progress and summary.
- Telemetry summary on exit (total/success/failure/avg-time).
zipwizard.exe --create demo.txt "hello"
zipwizard.exe --edit demo.txt "another line"
zipwizard.exe --rename demo.txt demo2.txt
zipwizard.exe --delete demo2.txt
zipwizard.exe --zip input.txt
zipwizard.exe --zip input.txt out.zwz
zipwizard.exe --unzip out.zwz
zipwizard.exe --unzip out.zwz restored.txt
zipwizard.exe --zip "C:\data\input.txt" "D:\archives\input.zwz"
zipwizard.exe --unzip "D:\archives\input.zwz" "D:\restore\input_restored.txt"
zipwizard.exe --batch-zip a.txt b.txt c.txt
zipwizard.exe --batch-unzip a.zwz b.zwz c.zwz
zipwizard.exe --search --keyword algorithm --ext txt --ignore-case
zipwizard.exe --search --keyword "*error*" --ext log --regex
zipwizard.exe --info sample.txtThis project now has a dedicated optimization roadmap for Competitive Programming / PBL goals:
- Complexity analysis baseline
- Data structure upgrades (hash map index, inverted index)
- Algorithm upgrades (KMP/Aho-Corasick, improved LZ77 matching)
- Benchmark-driven optimization process
See ./docs/CP_OPTIMIZATION_ROADMAP.md for details.
-
Milestone 1 implemented:
- Timing instrumentation now measures every menu operation and prints elapsed time in milliseconds.
- Benchmark-friendly timing output is available directly in CLI.
-
Milestone 2 implemented:
- Keyword search now uses Knuth-Morris-Pratt (KMP) matching over file streams instead of
strstrper line. - This improves theoretical matching complexity from repeated naive checks to
O(n + m)per file.
- Keyword search now uses Knuth-Morris-Pratt (KMP) matching over file streams instead of
- Implemented rolling-hash + hash-chain-assisted LZ77 matching in compression path.
- Added benchmark mode to compare naive vs optimized compression:
./zipwizard.exe --benchmark-compress .\benchmark_data\large.txt- The benchmark prints naive time, optimized time, and computed speedup.
- Added in-memory hash-map style file index cache loaded at startup.
- CRUD flows now keep index synchronized:
- Create adds filename to index.
- Delete removes filename from index.
- Rename updates old/new mapping in index.
- Exact name search now uses index lookup (
O(1)average), while wildcard search keeps filesystem scan behavior. - Added index benchmark mode:
./zipwizard.exe --benchmark-index large.txt 10000-
Published CP/PBL-ready report:
./docs/BENCHMARK_REPORT.md
-
Includes:
- Before/after complexity table
- Search/compression/index benchmark metrics
- Text-based performance graphs
- Raw benchmark outputs for reproducibility
- Add recursive directory search mode (
--recursive). - Add JSON output mode for automation (
--json). - Add configurable compression levels and presets.
- Add undo/rollback support for rename/delete via shadow log.
- Add performance trend report from benchmark runs.