Conversation
|
Your code was unsafe for sb_offsets_size_offset != 8. I have decided to only deal with 64-bits offset for the moment. |
|
Thanks for the input. I've ran your code on my test-image with 44 deleted test files on it. My code recovers 44 files with about 80% matching the source files. Your code unfortunately only recovers 1 file. For almost all files this check in file_check_hdf5_0 fails: It seems to me that file_recovery->file_size just contains garbage here, see some log outputs: though sometimes the value is strangely close to the eof_address, I may have missed something... Edit: Changing to leads to the more successful recovery I observed with my code: 44/44 files recovered 41/44 checksums match |
|
Can you try with |
|
This yields 43/44 recovered with 41/43 checksum matches 👍 Can you quickly comment on the origin of the value file_recovery->file_size? |
|
What are the results with |
|
44/44 recovered, 0 matches :( |
|
There was a missing "return 1;" in my previous copy/paste: |
|
44/44 recovered 41/44 matches 👍 |
Hi
I needed to recover some HDF5 data files and added superblock parsing to determine the file sizes to file_hdf5.c.
I'm told file recovery with my changes was much improved (I'm not qualified to speak on the recovered contents) and additional tests with HDF5 example files look very promising in checksum comparisons.
Though unfortunately I'm not very fluent in either C or this level of data recovery, so I expect there to be potential for improvement still.
Feel free to let me know if any adjustments need to be made.
In any case, many thanks for providing and maintaing testdisk! 👍
References:
HDF5 Superblock specification: https://support.hdfgroup.org/documentation/hdf5/latest/_f_m_t11.html#subsec_fmt11_boot_super
Additional HDF5 example data files: https://github.com/openPMD/openPMD-example-datasets
(Unfortunately I was unable to source any HDF5 files with superblock version 1 so I could not test that case)