Let me explain what I'm trying to realize:
I have a encrypted tar file. I can decrypt it in memory, but obviously I can't write the decrypted data back to hard disk as a real file. The decrypted data is structured as a char* buffer in memory; how can I untar it in memory?
I can't find answer with libtar library.
I also tried to untar it with execlp("tar", "tar", "-xvO", (void*)0)
.
But it didn't work as I thought.
Anyone can give me a hint of the best solution? Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…