From fb41da4a6b648966e518cbe388b82bcde74f038e Mon Sep 17 00:00:00 2001 From: Eric NOULARD Date: Mon, 16 Aug 2010 20:45:05 +0200 Subject: Add Compress compress support to libarchive-wrapper --- Source/cmArchiveWrite.cxx | 8 ++++++++ Source/cmArchiveWrite.h | 1 + 2 files changed, 9 insertions(+) diff --git a/Source/cmArchiveWrite.cxx b/Source/cmArchiveWrite.cxx index 524e53e..d9e4742 100644 --- a/Source/cmArchiveWrite.cxx +++ b/Source/cmArchiveWrite.cxx @@ -63,6 +63,14 @@ cmArchiveWrite::cmArchiveWrite(std::ostream& os, Compress c, Type t): return; } break; + case CompressCompress: + if(archive_write_set_compression_compress(this->Archive) != ARCHIVE_OK) + { + this->Error = "archive_write_set_compression_compress: "; + this->Error += archive_error_string(this->Archive); + return; + } + break; case CompressGZip: if(archive_write_set_compression_gzip(this->Archive) != ARCHIVE_OK) { diff --git a/Source/cmArchiveWrite.h b/Source/cmArchiveWrite.h index ce7f961..3e3b2f0 100644 --- a/Source/cmArchiveWrite.h +++ b/Source/cmArchiveWrite.h @@ -31,6 +31,7 @@ public: enum Compress { CompressNone, + CompressCompress, CompressGZip, CompressBZip2, CompressLZMA, -- cgit v0.12