Custom (Un)Packer

This project consists of building a command-line tool that creates and manipulates a custom, non-compressed archive format. It must support create_archive, list_content, full_unpack, unpack, logging, and strict validation.

Phase 1: Format design, CLI parsing and validation

Design archive layout and implement basic CLI with strict input checks.

  • Define header + index structure
  • Validate commands/paths
  • Provide clear help/errors

Functional Output: CLI accepts valid commands and recognizes a consistent archive format.


Phase 2: Archive creation (create_archive)

Implement archive writing with metadata, deterministic order, and checksum.

  • Walk directories/files
  • Write header, index, file data
  • Compute checksums

Functional Output: A correct archive is generated from files or folders.


Phase 3: Listing contents (list_content)

Read archive index and display file info without extraction.

  • Parse header/index only
  • Print filenames + sizes
  • Detect malformed archives

Functional Output: Accurate content list with sizes is displayed.


Phase 4: Full extraction (full_unpack)

Extract all files safely with metadata restoration.

  • Recreate folders/files
  • Validate checksums
  • Handle overwrite rules

Functional Output: Entire archive extracted correctly into destination folder.


Phase 5: Selective extraction (unpack)

Extract only specific files with logging and robust error handling.

  • Select entries by name
  • Write logs (success/errors)
  • Handle missing files cleanly

Functional Output: Requested files extracted; logs generated.


Phase 6: Testing, logging and CLI refinement

Finalize tests, logging, and usability improvements.

  • Add unit/integration tests
  • Add verbose/debug logs
  • Improve messages and usage

Functional Output: Stable, test-validated CLI with clear logs and reliable behavior.