BPackageWriter: Add Recompress()

Allows rewriting an existing package file with a different compression.
This commit is contained in:
Ingo Weinhold
2014-07-08 22:00:35 +02:00
parent 2fc2aebcba
commit cdfeba5a1e
9 changed files with 136 additions and 0 deletions
+4
View File
@@ -24,6 +24,7 @@ class BAbstractBufferedDataReader;
class BErrorOutput;
class BLowLevelPackageContentHandler;
class BPackageContentHandler;
class BPackageWriter;
class BPackageReader {
@@ -43,6 +44,9 @@ public:
BAbstractBufferedDataReader* HeapReader() const;
// Only valid as long as the reader lives.
private:
friend class BPackageWriter;
private:
PackageReaderImpl* fImpl;
};
+6
View File
@@ -16,6 +16,9 @@ namespace BPackageKit {
namespace BHPKG {
class BPackageReader;
namespace BPrivate {
class PackageWriterImpl;
}
@@ -72,6 +75,9 @@ public:
status_t AddEntry(const char* fileName, int fd = -1);
status_t Finish();
status_t Recompress(BPackageReader* reader);
// to be called after Init(); no Finish()
private:
PackageWriterImpl* fImpl;
};