I need to concatenate several in-memory files to one "standard" (not my own) archive file format using the C language. Compression is not important but it should be one file, i.e. a .tar file. As a result I need to write this archive file to stdout.
In C# I usually use the System.IO.Packaging namespace, but now I need to use C. Most of the examples describe compressing entities of filesystem, but I can't just use the tar utility because I have data in unsigned char * variables, not on disk. I know libtar can help, but all of the examples I have found use temporal files. I'd like to find a solution that does not create temporal files.