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
1
vote
2 answers

libarchive returns error on some entries while 7z can extract normally

I'm having trouble with libarchive version 3.3.2. I wrote a program to read selected entries in 7z archives, that look like: file.7z |__ file.xml |__ file.fog |__ file_1.fog However, the program failed to read file_1.fog for most of my…
Quang Hoang
  • 146,074
  • 10
  • 56
  • 74
1
vote
1 answer

How to correctly import latest libarchive for use on Mac OS

The release notes for libarchive state that because of an older version of libarchive being included within MacOS they recommend changing LD_LIBRARY_PATH to point towards the location of the recent copy of libarchive. I've used this code to try and…
1
vote
1 answer

Extracting .tar.gz using libarchive on UNC path?

I'm trying to use libarchive to extract .tar.gz file to current folder. Test machine if win7 64bit running under virtual box. It works fine if I do it in C:\ (.vdi disk), however it fails on E:\ (shared folder from host). Based on this Can't create…
graywolf
  • 7,092
  • 7
  • 53
  • 77
1
vote
0 answers

Decode utf-8 in tarfile

I have tar file which contains multibyte characters (japanese) . I am using libarchive to un tar the file . The filenames inside the tar files are encoded using utf-8 . When I try to untar the file the result always looses the multibyte characters .…
sameer karjatkar
  • 2,017
  • 4
  • 23
  • 43
1
vote
1 answer

libarchive raise compiler error in iOS in Xcode

I compiled libarchive with following commands cmake -G "Xcode" ~/libarchive-download-dir/ make make install and added libarchive.14.dylib and achieve.h to my project. But I got an compiler error. Any idea why? Undefined symbols for architecture…
János
  • 32,867
  • 38
  • 193
  • 353
0
votes
0 answers

how to install "bsdtar" instead of busybox "tar" in yocto build

I need bsdtar, bsdcpio binaries provided by libarchive package to be installed in the rootfs instead of busybox-tar and busybox-cpio. Tried changing the ALTERNATIVE_PRIORITY = "10" in the libarchive bb file but that doesn't install bsdtar in the…
Aspire
  • 921
  • 1
  • 7
  • 15
0
votes
1 answer

Untar files larger than 2GB (w/o using libarchive if possible)

I'm successfully using https://github.com/libarchive/libarchive/blob/master/contrib/untar.c as dependency-free code to read TAR files, but that code fails with a .tar file that contains a 10GB single file entry. It actually fails at the…
ddevienne
  • 1,802
  • 2
  • 17
  • 28
0
votes
0 answers

React: libarchive to acces 7z file - disallowed MIME type

I'm trying to extract a 7z file using libarchive and display it in React. The file name and '_7zOpen !!' are being logged but then it doesn't seem to be running this line: const filesObj = await archive.getFilesObject(); or actually extracting the…
RDev
  • 33
  • 4
0
votes
1 answer

libarchive: how to force flush into disc? or set memory usage limit?

I try to use libarchive to create some archives. I use directly an example from wiki. Problem is that it stores everything in memory until archive_write_free is called. Simple measurement: adding about 2000000 x 1.5KB of random ascii buffers (as…
Bogdan
  • 984
  • 8
  • 16
0
votes
2 answers

cannot link and include libarchive to C preogram

I have a simple C program . and I'm trying to use libarchive inside it . the problem is the linker does not work probably so I can just include archive.h header without error but can't use any method inside the app as i get undefined reference…
Sina Gz
  • 31
  • 6
0
votes
1 answer

InvalidArchiveError when installing GNURadio on Windows 10 from command line. Seems to be issue with libarchive or codec2

InvalidArchiveError("Error with archive C:\\Users\\RDCRLCLW\\Miniconda3\\pkgs\\codec2-0.9.2-h301d43c_1.tar.bz2. You probably need to delete and re-download or re-create this file. Message from libarchive was:\n\nCan't create…
0
votes
0 answers

How can I unzip an archive in memory using LibArchive in C++?

I do not understand how this library works and the documentation is one of the worst I've ever seen. How can I read text files stored inside the archive into memory? Am I even using the right functions? // Reading the raw zip file into…
0
votes
1 answer

react native - expo - libarchive.js "Can't find variable: Worker" issue

I am trying to unzip a file which exists in DocumentDirectoryPath but getting the error below: [Unhandled promise rejection: ReferenceError: Can't find variable: Worker] node_modules\libarchive.js\src\libarchive.js:37:29 in…
Gurcan
  • 428
  • 1
  • 8
  • 19
0
votes
1 answer

How can I get unzipped file and corresponding path from libarchive.js

I am trying to use archive.extractFiles function to get path and file. This function is not waiting for list array to populate, instead immediately returning empty array. import {Archive} from 'libarchive.js/main.js'; Archive.init({ …
ravi yadav
  • 1
  • 1
  • 2
0
votes
0 answers

libarchive "not found" when Compiling Ardour on macOS High Sierra 10.13.6

I'm trying to compile the stable version of Ardour (6.0.0) on macOS High Sierra 10.13.6, which I've obtained via git clone https://github.com/boostorg/boost.git. I've managed to work out the first couple of dependancies, but am now stuck on getting…
KeithJ
  • 169
  • 3
  • 12