I have written a code which read file from remote device using libssh scp APIs. I have a specific requirement wherein I want to scp a .tar file from a remote device. I am able to read .tar content into a buffer, but I am not sure how to create .tar file out of that buffer. Any help would be