Q: I was wondering if it is even possible to open, buffer, and pass a
.tgz file using C standard libraries and libraries?
Q: Do you want to copy the binary .tgz file as-is? Sure - piece of cake :)
Or do you want to interpret the .tgz file, and then copy its contents?
If the latter, I'd look at "zlib":
Q: Using fopen I get a NULL pointer which tells me that a .tgz file
isn't a binary file
A: That tells you no such thing! You should be able to "fopen()" any file ... as long as it exists, and as long as you have the correct permissions.
Use "perror()" to find out what the underlying error was.