سؤال

My question is quite simple. Is there any possible way to unpack packed .xz file in from C code? I would probably call some default linux-integrated program to unpack it for me, but how exactly does it work? I call the external function and than somehow I get directly back to the program content of the extracted file? Let's say that inside the .xz file is text file and I want to read it afterwards.

هل كانت مفيدة؟

المحلول

I would use system("xz -dl file.xz"), but there is good info here and links to source code to implementations: http://tukaani.org/xz/format.html

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top