The bitrot detection is via libjpeg, libraw, and ffmpeg (to handle both photo and video validation): they can be run in verbose modes that can report decoding errors which are due to file truncation or outright corruption.
https://photostructure.com/getting-started/automatic-library...