Questions tagged [libarchive]

Multi-format archive and compression library

Multi-format archive and compression library

The libarchive library features:

  • Support for a variety of archive and compression formats.
  • Robust automatic format detection, including archive/compression combinations such as tar.gz.
  • Zero-copy internal architecture for high performance.
  • Streaming architecture eliminates all limits on size of archive, limits on entry sizes depend on particular formats.
  • Carefully factored code to minimize bloat when programs are statically linked.
  • Growing test suite to verify correctness of new ports.
  • Works on most POSIX-like systems (including FreeBSD, Linux, Solaris, etc.)
  • Supports Windows, including Cygwin, MinGW, and Visual Studio.

Home: http://www.libarchive.org/

60 questions
8
votes
2 answers

Set UTF-8 pathname header in libarchive

SUMMARY How can I write a zip file using libarchive in C++, such that path names will be UTF-8 encoded? With UTF-8 path names, special characters will be decoded correctly when using OS X / Linux / Windows 8 / 7-Zip / WinZip. DETAILS I am trying to…
ValarDohaeris
  • 6,064
  • 5
  • 31
  • 43
6
votes
1 answer

"Pathname can't be converted from UTF-8 to current locale" warning with Libarchive::Read module

I'm getting the file listings for tar.gz files using the Libarchive::Read module. When a tarball file name has UTF-8 characters in it, I get an error which is generated by the libarchive C library: Pathname can't be converted from UTF-8 to current…
StevieD
  • 6,925
  • 2
  • 25
  • 45
5
votes
1 answer

How to create a LibArchive archive on a directory path instead of a list of files?

I've never used LibArchive before and am trying to use it to create a .tar archive of a directory, since it is installed on my remote compute instance. LibArchive has an example of how to create an archive from a flat list of files (shown below).…
knowads
  • 705
  • 2
  • 7
  • 24
5
votes
0 answers

Libarchive: how to compress an archive on windows?

I am trying to create a compressed archive on windows with libarchive and at the moment it is not working. I can create zip or pax_restricted(tar) archives without compression, without any problems. To add compression I've tried some combinations of…
0xfeedbacc
  • 301
  • 2
  • 9
5
votes
1 answer

Using libarchive in python on Windows

I'm trying to get libarchive module working in python 3.4 on windows. I've installed libarchive-c with pip and all went ok but whenever I try to import it into my code or even to run it alone I'me getting error: OSError: [WinError 126] The specified…
NosIreland
  • 91
  • 2
  • 8
3
votes
0 answers

Libarchive - Creating a single .zip archive with both encrypted(PKzip) and un-encrypted files together

I am trying out libarchive to try to find out whether it is useful for my purpose. I have a .zip file, with few files encrypted (PKzip) and few other files un-encrypted. I am able to successfully extract my .zip file using libarchive without a…
Titus
  • 907
  • 8
  • 18
3
votes
1 answer

What does archive_read_support_filter_all() do?

archive_read_support_filter_all() enables the code to use external programs if an appropriate library was not available at build time. (See…
Parth Kapadia
  • 507
  • 6
  • 18
3
votes
2 answers

How to install libarchive on macOS and make compiler will detect it?

I am trying to install libarchive on macOS for my school project. I tried to do it using brew formulae, but CMake says that it can't detect it. How can I install libarchive in the right way? What I tried: brew install libarchive What I got in…
Denys Ivanenko
  • 388
  • 7
  • 21
3
votes
0 answers

How to read a csv file with huge data from a .7z archive?

I have a csv file containing 162 gb of data, that I had to compress using 7-zip to save space. I have been using libarchive to read from .7z files and append the blocks read to get the final result at the end. But the problem with this file is, its…
Uzair Riaz
  • 909
  • 1
  • 5
  • 12
3
votes
0 answers

libarchive with Xar - can't read contents of 2nd item and above in archive

The following piece of code works fine for formats like TAR, but when i'm using it for XAR, it reads the 1st item successfully, but from the 2nd item and on, the file names and size are retrieved, yet archive_read_data fails (with error code 25 -…
IdoT
  • 2,831
  • 1
  • 24
  • 35
3
votes
0 answers

Fail to extract binary file from Tar archive using libarchive

Update The example below does work. I had misread the intention of the flag ARCHIVE_EXTRACT_TIME and was expecting to see the newly created file. Instead the file was being extracted correctly but with its original creation date. It was a long…
boneill
  • 31
  • 4
2
votes
1 answer

read a .7z file in memory with Python, and process each line as a stream

I'm working with a huge .7z file that I need to process line by line. First I tried py7zr, but it only works by first decompressing the whole file into an object. This runs out of memory. Then libarchive is able to read block by block, but there's…
Felipe Hoffa
  • 54,922
  • 16
  • 151
  • 325
2
votes
1 answer

Pipenv libarchive error: no such file or directory: b'liblibarchive.a'

Installing libarchive using pipenv returned with a file/directory not found error. The pip file contains the package as libarchive==0.4.7. Logs showing the error: ... [pipenv.exceptions.InstallError]: Verifying that the library is…
Joep
  • 788
  • 2
  • 8
  • 23
2
votes
0 answers

installing LibArchive inside android NDK toolchain

Hi I have a C++ library which uses LibArchive library and CMake. The top level CMake requires LibArchive 3.0 using find_package inside CMakeLists.txt: find_package(LibArchive 3.0 REQUIRED) I have installed LibArchive on my Ubuntu development…
Amin Merati
  • 2,221
  • 4
  • 22
  • 38
2
votes
0 answers

Extract from archive into memory - libarchive

I've been learning how to use libarchive and the docs are quite helpful. However, I can't seem to figure out a way to extract it directly into memory instead of writing it to a file. Is this possible? Thanks! The example I've been looking at and…
wahaha88
  • 21
  • 1
1
2 3 4