How can I see the contents of .tar.xz or .tar.gz on an Android device without rooting?

I need to learn about the C and C ++ codes that are "hidden" in the files; however, I did not find a way to see these contents.