rxi / microtar

A lightweight tar library written in ANSI C
MIT License
450 stars 101 forks source link

unable to use on tar.xz #20

Open mkandulavm opened 4 years ago

mkandulavm commented 4 years ago

I am getting checksum and other errors when trying to read a tar.xz.

Is it not supported ?

rxi commented 4 years ago

microtar only supports tar archives -- tar.xz, tar.gz and friends are compressed tar archives which would have to be decompressed first, the resultant decompressed data should work with microtar.

mkandulavm commented 4 years ago

Thanks for the reply ! can you suggest what might be the best route to do that ? Should I use some other library os System command ?

pegvin commented 1 year ago

basically tar collects all the files and creates a single archive, that archive is then compressed 7z format, thus .tar.7z is produced, or .tar.gz in gzip, or .tar.xz when using xz file format...

libarchive is the best library to work with all sorts of archives...