Skip to content

Latest commit

 

History

History
22 lines (19 loc) · 1.11 KB

File metadata and controls

22 lines (19 loc) · 1.11 KB

Photo Recovery and Memory using C

  • Recover: Recover deleted JPEGs from a memory card.
  • I wrote the code in recover.c. The other files were provided by the instructor.

Recover Program Demo

💡Lessons Learned

  • Using malloc and command-line argument $ valgrind to prevent leaking memory and segmentation faults
  • Implementing knowledge of JPEGs “signatures”: 0xff 0xd8 0xff
  • Reading and writing files into memory using fread and fwrite
  • Using buffers of BLOCK SIZE

🚀 Getting Started

To run this project locally:

  • In your terminal, navigate to this folder's root directory and run the following commands
$ clang -o recover recover.c
$ ./recover card.raw

The expected result for the above execution is the recovery of 50 JPEGs, numbered 000.jpg to 050.jpg, that will be populated in this folder's root directory.