Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

High-performance deleted file recovery tool built in Rust. Recover JPEG, PNG, PDF, ZIP, BMP, and GIF files using signature-based file carving with 940 MiB/s throughput.

License

Notifications You must be signed in to change notification settings

Paulogb98/Reclaim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ RECLAIM - Professional File Recovery Tool

RECLAIM Logo

Features β€’ Requirements β€’ Installation β€’ Usage β€’ Formats β€’ Performance β€’ Docs β€’ License

Rust 1.70+ License Status Platforms v1.1.0


πŸ“– About

RECLAIM is a professional-grade, high-performance, cross-platform file recovery tool for recovering deleted files from RAW devices using signature-based file carving.

Built in Rust with focus on:

  • ⚑ Performance: 940 MiB/s footer search throughput
  • πŸ”’ Security: Multi-layer validation + U64 overflow protection
  • 🎯 Accuracy: Rigorous integrity verification
  • 🌍 Cross-Platform: Windows, Linux, macOS native support
  • πŸ“Š Reliability: Checkpoint + recovery system
  • 🧡 Parallelization: Multi-threading with linear scaling
  • ✨ Improvements: Rate limiting, U64 safe, checkpoint management

Recover your data safely through advanced file carving techniques (header/footer detection).


✨ Key Features

🎯 Efficient Recovery

  • Signature-based file carving - Automatic detection by header/footer
  • Rigorous validation - Format-specific integrity verification
  • Image reconstruction - Incomplete JPEG/PNG recovery
  • Automatic detection - Identifies format by byte pattern
  • Checkpoint system - Resume interrupted recoveries
  • Rate limiting - Intelligent bandwidth control (100 MB/s default)

πŸ†• Improvements (v1.1.0)

Feature Benefit Status
U64 Overflow Protection Safe for disks > 4GB βœ… Implemented
Multi-threading 4-6x speedup on SSD/NVMe βœ… Feature-gated
Rate Limiter I/O flood protection βœ… Sliding window
Checkpoint Manager Automatic cleanup βœ… Versioned
ValidationReport Public Safe inspection interface βœ… Public methods
CheckpointManager Full lifecycle management βœ… Automatic

πŸ“‹ Supported Formats

Format Header Footer Max Size Validation Status
JPEG FF D8 FF FF D9 50 MB βœ… Complete βœ… Active
PNG 89 50 4E 47 0D 0A 1A 0A 49 45 4E 44 AE 42 60 82 50 MB βœ… Complete βœ… Active
PDF 25 50 44 46 25 25 45 4F 46 100 MB βœ… Partial βœ… Active
ZIP 50 4B 03 04 50 4B 05 06 500 MB βœ… Partial βœ… Active
BMP 42 4D None 50 MB ⚠️ Minimal βœ… Active
GIF 47 49 46 38 00 3B 20 MB βœ… Partial βœ… Active

🌍 Cross-Platform

OS Support Implementation Requirement
Windows 10+ βœ… Native Windows API (CreateFileW) Admin
Linux (5.0+) βœ… Native File syscalls + ioctl sudo
macOS 10.15+ βœ… Native File syscalls (rdisk) sudo

βš™οΈ Advanced Features

Feature Description Status
πŸ“„ Checkpoints Resume recoveries βœ… JSON + versioning
πŸ“Š Telemetry Performance metrics βœ… Arc
πŸŽ›οΈ Rate Limiting Bandwidth control βœ… Sliding window 1s
πŸ₯— Health Checks 5 pre-operation validations βœ… Device, output, disk, memory, perms
πŸ›‘οΈ Security Path traversal + validation βœ… Defense in depth
πŸ“ˆ Progress Visual Real-time indicator βœ… indicatif with ETA
πŸ’Ύ Buffer Pool RAII with auto-release βœ… 8.7x vs malloc
🧡 Parallelization Multi-threading (feature flag) βœ… Linear scaling ≀8T
πŸ§ͺ Validation SHA-256 + metadata βœ… Per-format
πŸ”¨ Reconstruction JPEG/PNG incomplete βœ… jpeg-decoder + image

πŸ“Š Performance

Benchmarks Real (v1.1.0)

β”œβ”€ Footer Search        940 MiB/s  βœ… Excellent
β”œβ”€ File Carving         416 MiB/s  βœ… Very Good
β”œβ”€ Buffer Pool ops      13 ns      ⚑ Ultra-fast
β”œβ”€ RecoveryStats (U64)  1.5 ns     ⚑ Lock-free
β”œβ”€ Rate Limiter         <1ms       βœ… Sliding window
β”œβ”€ Multithreaded (4T)   207 Β΅s     βœ… Scalable
└─ Multithreaded (8T)   415 Β΅s     βœ… Linear

Estimated Times per Disk

Disk Type Speed Time for 1TB Notes
HDD 7200 RPM 50-100 MB/s ~2.8 hours Single-thread better
SSD SATA 200-500 MB/s ~42 minutes 4 threads ideal
SSD NVMe 500+ MB/s ~15-30 minutes 8 threads ideal

Note: Times with multi-threading enabled via --features parallel


βš™οΈ Requirements

Operating System

Requirement Windows Linux macOS
Min Version 10 Kernel 5.0+ 10.15+
Architecture x86_64 x86_64 x86_64 + arm64
Privileges Admin sudo sudo

Rust & Tools

  • Rust: 1.70 or higher (install here)
  • Cargo: Included with Rust
  • Git: For cloning repository (optional)

System Resources

Resource Minimum Recommended
RAM 512 MB 2 GB
Disk 100 MB (app) 1 GB (app + buffer)
CPU 1 core 4+ cores

πŸš€ Installation

Option 1: Via Cargo (Recommended)

Single-thread (default):

cargo install --path .

# Verify
reclaim --version

Multi-thread (optimized for SSD/NVMe):

cargo install --path . --features parallel

# Or with all features
cargo install --path . --features full

βœ… Simplest | ⏱️ ~2 minutes


Option 2: Build from Source

# Clone repository
git clone https://github.com/Paulogb98/reclaim.git
cd reclaim

# Compile (release = optimized)
cargo build --release

# Or with features
cargo build --release --features parallel

# Executable at: target/release/reclaim
./target/release/reclaim --help

# Install globally (optional)
cargo install --path .

βœ… Full control | ⏱️ ~3 minutes


Option 3: Via Homebrew (macOS)

brew install reclaim

βœ… Native macOS integration | ⏱️ ~1 minute


Option 4: Pre-compiled Binaries

Download from: https://github.com/Paulogb98/reclaim/releases

βœ… No compilation needed | ⏱️ ~30 seconds


πŸ“– Usage

General Syntax

reclaim <COMMAND> [OPTIONS]

Available Commands

1. Recover - Recover Files

reclaim recover --drive <LETTER/PATH> --format <FORMAT> [OPTIONS]

# Examples:
# Windows
reclaim recover --drive C --format jpeg --output D:\Recovered

# Linux
sudo reclaim recover --drive /dev/sda --format jpeg --output ./recovered

# macOS
sudo reclaim recover --drive /dev/disk0 --format jpeg --output ./recovered

# With checkpoint
reclaim recover --drive C --format jpeg --output D:\Recovered \
  --resume ./checkpoints/checkpoint_C_jpeg.json \
  --checkpoint-interval 50

Options:

  • --drive, -d (required) - C, D, /dev/sda, /dev/disk0
  • --format, -f (default: jpeg) - jpeg, png, pdf, zip, bmp, gif
  • --output, -o (default: ./recovered) - Destination directory
  • --resume, -r (optional) - Checkpoint path
  • --checkpoint-interval (default: 100) - Interval in MB

2. ListFormats - List Supported Formats

reclaim list-formats

# Output:
# πŸ” SUPPORTED FORMATS:
# ======================================================================
#   1. JPEG (.jpg)
#   2. PNG (.png)
#   3. PDF (.pdf)
#   ...

3. ListDevices - List Available Devices

reclaim list-devices

# Output:
# πŸ“ AVAILABLE DEVICES:
# ======================================================================
#   1. C:
#      Path: \\.\C:
#      Size: 931.51 GB
#      Removable: No
#   ...

4. Analyze - Analyze File

reclaim analyze --file ./recovered_00001.jpg

# Output:
# βœ… Format detected: jpeg (.jpg)
# πŸ“‹ VALIDATION REPORT:
# ======================================================================
# Status: βœ… VALID
# Size: 512000 bytes (500.00 KB)
# SHA-256: abc123def456...
# Dimensions: 1920x1080
# ...

5. CheckDevice - Verify Device

reclaim check-device --drive C

# Output:
# βœ… Device accessible: \\.\C:
#    Total size: 931.51 GB
#    Removable: No
#    ...

6. Validate - Validate Configuration

reclaim validate --drive C --format jpeg --output D:\Recovered

# Output:
# ============================================================
# πŸ” VALIDATION REPORT
# ============================================================
# βœ… Status: VALID
# βœ… Checks:
#   β€’ Drive validated against traversal
#   β€’ Format 'jpeg' supported
#   β€’ Output path validated
# ============================================================

πŸ’‘ Practical Examples

Recover JPEGs from Drive C

# Windows
reclaim recover -d C -f jpeg -o D:\Fotos

# Linux
sudo reclaim recover -d /dev/sda -f jpeg -o ~/fotos

# macOS
sudo reclaim recover -d /dev/disk0 -f jpeg -o ~/fotos

Recover Multiple Formats

# JPEGs
reclaim recover -d C -f jpeg -o D:\Recovered\JPEG

# Then PNGs
reclaim recover -d C -f png -o D:\Recovered\PNG

# Then PDFs
reclaim recover -d C -f pdf -o D:\Recovered\PDF

Resume Interrupted Recovery

# First attempt
reclaim recover -d C -f jpeg -o D:\Recovered
# [Ctrl+C to stop]

# Resume
reclaim recover -d C -f jpeg -o D:\Recovered \
  --resume ./checkpoints/checkpoint_C_jpeg.json

With Detailed Logging

# Windows
$env:RUST_LOG="reclaim=debug"
reclaim recover -d C -f jpeg -o D:\Recovered

# Linux/macOS
RUST_LOG=reclaim=debug reclaim recover -d /dev/sda -f jpeg -o ~/recovered

Background Recovery (No System Impact)

# Linux/macOS
RECLAIM_RATE_LIMIT=52428800 nice -n 19 \
  reclaim recover -d /dev/sdb -f jpeg -o ./background_recovery
# 50 MB/s rate limit + nice priority 19

# Windows PowerShell
$env:RECLAIM_RATE_LIMIT = "52428800"
reclaim recover -d E -f jpeg -o ./background_recovery

πŸ—οΈ Architecture

Layered Vision

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         CLI Layer (cli.rs)               β”‚
β”‚    Argument parsing (Clap)               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚    Validation Layer                      β”‚
β”‚  (validation.rs, health.rs, security.rs) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Business Logic Layer                   β”‚
β”‚  (recovery/*, carver.rs, validator.rs)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Infrastructure Layer                    β”‚
β”‚ (config.rs, models.rs, formats.rs, etc.) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   OS Abstraction Layer                   β”‚
β”‚  (device/platform/{windows,linux,macos}) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

For detailed architecture: See ARCHITECTURE.md


πŸ§ͺ Testing

# All tests
cargo test

# Specific module tests
cargo test recovery::

# With full output
cargo test -- --nocapture --test-threads=1

# Ignored tests
cargo test -- --ignored

# Integration tests only
cargo test --test integration_tests

πŸ“Š Benchmarks

# Run benchmarks
cargo bench --bench scanner_bench

# Save baseline
cargo bench -- --save-baseline v1.1.0

# Compare against baseline
cargo bench -- --baseline v1.1.0

# Generate HTML reports
cargo bench -- --plotting-backend gnuplot

For complete analysis: See BENCHMARK.md


πŸ“š Complete Documentation

Document Description Audience
README.md This file - Overview Everyone
ARCHITECTURE.md Technical design Developers
DESIGN_DECISIONS.md Why each decision Architects
PERFORMANCE.md Tuning & optimization DevOps/Ops
SECURITY.md Safety measures SecOps
DEPLOYMENT.md Build & release DevOps
TROUBLESHOOTING.md Problem solving Support
CONTRIBUTING.md How to contribute Contributors
BENCHMARK.md Performance analysis Optimizers

🀝 Contributing

Contributions welcome!

  1. Fork the repository
  2. Create branch (git checkout -b feature/AmazingFeature)
  3. Commit changes (git commit -m 'feat: add AmazingFeature')
  4. Push to branch (git push origin feature/AmazingFeature)
  5. Open Pull Request

Desired Contribution Areas

  • βœ… New file formats
  • βœ… Performance optimizations (SIMD, Boyer-Moore)
  • βœ… UX/messaging improvements
  • βœ… Documentation
  • βœ… Additional tests
  • βœ… New platform support

Read: CONTRIBUTING.md


πŸ› οΈ Quick Troubleshooting

❌ "Failed to open device"

Windows: Run as Administrator
Linux/macOS: Use sudo
Check: reclaim list-devices

❌ "Invalid drive"

Windows: Use letter (C, D, E)
Linux: Use /dev/sdX
macOS: Use /dev/diskX

❌ "No files found"

Try different format
Data may be overwritten
Use: RUST_LOG=debug reclaim recover...

For more: See TROUBLESHOOTING.md


πŸ“ž Contact & Support

Channel Type Response Time
GitHub Issues Bugs/Features 24-48h
GitHub Discussions Questions 24-48h
Email Urgent/Security 12-24h

πŸ“§ [email protected]


πŸ“„ License

  • MIT License - Simple and permissive
MIT License

Copyright (c) 2024 Paulo G.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction...

πŸ™ Acknowledgments

  • ✨ Rust community
  • πŸ“¦ Crates: clap, indicatif, image, jpeg-decoder, serde, tracing
  • 🀝 All contributors and testers
  • ❀️ Users who report bugs and suggestions

πŸ“Š Project Status

Aspect Status Details
Development βœ… Active Issues and PRs accepted
Production βœ… Ready v1.1.0 stable
Testing βœ… Complete 60+ unit, 15+ integration
Performance βœ… Optimized 940 MiB/s footer search
Security βœ… Audited Defense in depth + U64
Documentation βœ… Complete 5,700+ lines

πŸš€ Roadmap

βœ… V1.1.0 (Current)

  • βœ… File carving recovery
  • βœ… 6 supported formats
  • βœ… Checkpoints + resumption
  • βœ… Multi-threading (feature flag)
  • βœ… Complete telemetry
  • βœ… Health checks (5 validations)
  • βœ… Security (defense in depth)
  • βœ… U64 overflow protection
  • βœ… Rate limiting sliding window
  • βœ… CheckpointManager lifecycle

πŸ“‹ V2.0 (Planned)

  • πŸ“‹ SIMD for footer search (+50%)
  • πŸ“‹ Boyer-Moore algorithm (+30%)
  • πŸ“‹ Memory mapping (> 1GB files)
  • πŸ“‹ Plugin system
  • πŸ“‹ GPU acceleration

πŸ’­ V3.0+ (Future)

  • πŸ’­ Cloud storage integration
  • πŸ’­ Web UI
  • πŸ’­ Distributed recovery
  • πŸ’­ ML-based reconstruction

Built with ❀️ in Rust

πŸ—οΈ Architecture β€’ πŸ”§ Troubleshooting β€’ 🀝 Contributing β€’ βš™οΈ Performance

RECLAIM v1.1.0 | βœ… Production Ready | πŸ“… 2025-11-02

About

High-performance deleted file recovery tool built in Rust. Recover JPEG, PNG, PDF, ZIP, BMP, and GIF files using signature-based file carving with 940 MiB/s throughput.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Languages