Cross-platform file archiving

I need to archive multiple files into a single file (e.g. tar file) programmatically using C ++ for Linux and Windows. It does not have to be a tar file, any compressed / uncompressed file format that can be used on both operating systems. Any ideas where to look?

+4
source share
5 answers

libarchive is a library for Linux and Windows. It can be statically linked with Windows, and some Linux distributions already have libarchive libraries installed.

+2
source

See MiniZip library, pure C ++ cross-platform Windows / linux.

+3
source

If the LGPL license is right for you, check out http://sourceforge.net/projects/sevenzip/ I don’t think that the compression part of the program is very close to windows. Thus, just get the part you need, it supports many formats: 7z, XZ, BZIP2, GZIP, TAR, ZIP, WIM, ARJ, CAB, CHM, CPIO, CramFS, DEB, DMG, FAT, HFS, ISO, LZH, LZMA, MBR, MSI, NSIS, NTFS, RAR, RPM, SquashFS, UDF, VHD, WIM, XAR, Z.

+2
source

You can watch zlib . See the Related External Links section of this page for links to resources and DLLs for compiling them on Windows.

+2
source

Windows XP has built-in zip file processing

on * nix you can use zip and unzip

+1
source

Source: https://habr.com/ru/post/1383902/


All Articles