I suspect you're looking for pristine-tar(1)?
https://manpages.debian.org/stretch/pristine-tar/pristine-ta...
It's intended to solve exactly this problem, but in reverse -- a tarball is extracted to source, and we want to ensure that the sources we've extraced can be traced back to the original tarball.