Implement Xz compressor functions.
The new XzCompress() function is similar to BzipCompress() function but
uses the Xz compression algorithm.
This patch simplifies the unittests of the compressors and reuses the
client-side decompresor implementation instead of repeating the
implementation in the delta generator. This patch removes the unused
compression/decompression functions.
Bug: 24578399
TEST=Added unittests.
(cherry picked from commit 246bf21fd0074a1897c28a7c4703c2223e6224b6)
Change-Id: I20cc3035d36c1041cc67fe88435c720d9dbc8733
diff --git a/payload_generator/bzip.h b/payload_generator/bzip.h
index ca9956e..198768f 100644
--- a/payload_generator/bzip.h
+++ b/payload_generator/bzip.h
@@ -17,18 +17,12 @@
#ifndef UPDATE_ENGINE_PAYLOAD_GENERATOR_BZIP_H_
#define UPDATE_ENGINE_PAYLOAD_GENERATOR_BZIP_H_
-#include <string>
-#include <vector>
-
#include <brillo/secure_blob.h>
namespace chromeos_update_engine {
-// Bzip2 compresses or decompresses str/in to out.
-bool BzipDecompress(const brillo::Blob& in, brillo::Blob* out);
+// Compresses the input buffer |in| into |out| with bzip2.
bool BzipCompress(const brillo::Blob& in, brillo::Blob* out);
-bool BzipCompressString(const std::string& str, brillo::Blob* out);
-bool BzipDecompressString(const std::string& str, brillo::Blob* out);
} // namespace chromeos_update_engine