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
0
votes
1 answer

How to include header files for external libraries in my source code?

I am trying to extract archived files in my project using Libarchive. On a standalone code, i include libarchive's archive.h using: #include But I have seen on projects that header files are not included directly, they use: #include…
Parth Kapadia
  • 507
  • 6
  • 18
0
votes
1 answer

libarchive how to read concatenated tar

I want to read a tar file that was made by concatenating multiple .tar.gz files using cat one.tar.gz two.tar.gz .... > combined.tar.gz using libarchive. I'm able to read files for the first tar file fine using a while(;;) r =…
Algorithmatic
  • 1,824
  • 2
  • 24
  • 41
0
votes
1 answer

Qt - problem integrating third party library (libarchive)

I'm having an error when I integer libarchive in Qt 5.14.2. I'm on windows. This is the error: undefined reference to `archive_read_new' In my main.cpp file, I have: struct archive *a; a = archive_read_new(); I compile sucessfully…
amof
  • 139
  • 5
0
votes
1 answer

Reading zip arhive header from memory using libarchive

I am trying to read headers of zip file , stored in memory using libarchive. Here is my try ArchiveReader::ArchiveReader(std::string filename) { if (!boost::filesystem::exists(filename)) { throw FileDoesNotExistsException(filename); …
Denys Ivanenko
  • 388
  • 7
  • 21
0
votes
0 answers

Error while loading libarchive in windows - Library can not be loaded: [WinError 126] The specified module could not be found

I am a beginner in python,trying to install "Libarchive", in a windows 10 64-bit laptop, am using python 3.7 getting following error $ pip install libarchive Collecting libarchive Using cached…
0
votes
0 answers

libarchive Complete Extractor

I downloaded libarchive-3.3.2.zip and build it using mingw32 according to https://github.com/libarchive/libarchive/wiki/BuildInstructions I also set LIBS += -L$$PWD/libarchive/ -larchive_static for static-build. After building, I tried to extract…
tijo
  • 1
  • 2
0
votes
1 answer

Steam Protocol C++ Unzip Multi message

I'm writting a plugin for Steam protocol in C++. I'm using https://github.com/seishun/SteamPP which uses protobufs from https://github.com/SteamRE/SteamKit and generally it works. I can communicate Steam, I can send and receive single messages…
John Doe
  • 3
  • 4
0
votes
1 answer

Seek in libarchive, how to reset header?

Is it possible to read decompressed file once again? Let imagine I used archive_read_next_header(a, &entry), and I read an unknown number of bytes using archive_read_data(a, ptr_to_buffer, buffer_size). Right now I want to reset it and start…
Michał
  • 65
  • 1
  • 8
0
votes
0 answers

python libarchive to get mtime of the archive

I have Python libarchive 0.4.3 installed. I'd like to get the mtime of a 7z file as stored inside the 7z file. This is different than the mtime of the file stored locally on the disk. Let's say it is the underlying source C tarball lzma1604.7z. The…
rocky
  • 7,226
  • 3
  • 33
  • 74
0
votes
1 answer

Creating compressed file in C++ without knowing the initial file size

I've been using Java's standard library for writing Zip Archive files and, in that case, I do not have to know the files that are going to be stored into a zip file beforehand: I would simply create a new ZipEntry and then write into the ZipFile…
jackb
  • 695
  • 8
  • 26
0
votes
1 answer

mingw+libarchive: cross compiling linker error

I'm trying to cross compile a tiny program under Linux for win32. It uses libarchive, which is available in for mingw on my fedora 23 installation (all installed through dnf), but I get lots of linker errors. Source:…
panzi
  • 7,517
  • 5
  • 42
  • 54
0
votes
0 answers

Error building libarchive for c++ Visual Studio 2010 Professional

I am trying to build libarchive for c++ Visual Studio 2010 Professional. Everything seems to be fine, the tests run OK, up until I get the following error: C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error…
ees
  • 335
  • 1
  • 2
  • 11
0
votes
1 answer

Rename a non-empty directory in an archive using libarchive

I'm trying to rename the entries of an archive using the libarchive library. In particular I'm using the function archive_entry_set_pathname. Files and empty directories are correctly renamed, but unfortunately this is not working if a directory is…
eang
  • 1,615
  • 7
  • 21
  • 41
0
votes
2 answers

Adding directory to tarfile with libarchive

I am trying to add a directory to a tar archive that I am creating. The archive is created, however, it has no files in it. Here's the code I have using libarchive (directory is a QString of the path to the directory to be tarred.) struct archive…
lthreed
  • 444
  • 4
  • 11
-1
votes
1 answer

writing an archive that contains encrypted files

I've some files that are encrypted with nettle. when I read the archive, they're all messed up... so is there's a preferred filter/format in order to keep those files straight? best regards, nicolas
1 2 3
4