Revert "update_engine: Add XZ compression for CrOS"

This reverts commit 717c324c334cc3bac954101f7a127fe8ef56e4e6.

Reason for revert: <canaries failed>

Original change's description:
> update_engine: Add XZ compression for CrOS
>
> This patch implements XZ compression for Chrome OS. It is only activated
> for only delta payload at this point. The XZ compression is typically
> slower than Bzip2 to compress, but faster to decompress. However, it
> uses slightly higher memory in decompression. It compresses about 5%-10%
> better than the current Bzip2.
>
> BUG=chromium:758792
> TEST=unittests pass; brillo_update_paylod {generate|verify} passes;
>
> Change-Id: Icdaf1d37d344c30a796845eb64daa00120f3598a
> Reviewed-on: https://chromium-review.googlesource.com/811895
> Commit-Ready: Amin Hassani <ahassani@chromium.org>
> Tested-by: Amin Hassani <ahassani@chromium.org>
> Reviewed-by: Alex Deymo <deymo@chromium.org>
> Reviewed-by: Ben Chan <benchan@chromium.org>

TBR=benchan@chromium.org,deymo@chromium.org,deymo@google.com,senj@chromium.org,ahassani@chromium.org

Change-Id: I43e8c5ebec84d395b87aa782fb4d478a5fe99279
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:795313
Reviewed-on: https://chromium-review.googlesource.com/830053
Commit-Ready: Amin Hassani <ahassani@chromium.org>
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
diff --git a/payload_generator/xz_chromeos.cc b/payload_generator/xz_chromeos.cc
index 2ff9458..a8cda4e 100644
--- a/payload_generator/xz_chromeos.cc
+++ b/payload_generator/xz_chromeos.cc
@@ -16,39 +16,13 @@
 
 #include "update_engine/payload_generator/xz.h"
 
-#include <base/logging.h>
-#include <lzma.h>
-
 namespace chromeos_update_engine {
 
 void XzCompressInit() {}
 
 bool XzCompress(const brillo::Blob& in, brillo::Blob* out) {
-  out->clear();
-  if (in.empty())
-    return true;
-
-  // Resize the output buffer to get enough memory for writing the compressed
-  // data.
-  out->resize(lzma_stream_buffer_bound(in.size()));
-
-  const uint32_t kLzmaPreset = 6;
-  size_t out_pos = 0;
-  int rc = lzma_easy_buffer_encode(kLzmaPreset,
-                                   LZMA_CHECK_NONE,  // We do not need CRC.
-                                   nullptr,
-                                   in.data(),
-                                   in.size(),
-                                   out->data(),
-                                   &out_pos,
-                                   out->size());
-  if (rc != LZMA_OK) {
-    LOG(ERROR) << "Failed to compress data to LZMA stream with return code: "
-               << rc;
-    return false;
-  }
-  out->resize(out_pos);
-  return true;
+  // No Xz compressor implementation in Chrome OS delta_generator builds.
+  return false;
 }
 
 }  // namespace chromeos_update_engine
diff --git a/payload_generator/zip_unittest.cc b/payload_generator/zip_unittest.cc
index 5b0d5da..c750eb7 100644
--- a/payload_generator/zip_unittest.cc
+++ b/payload_generator/zip_unittest.cc
@@ -115,7 +115,12 @@
   }
 };
 
+#ifdef __ANDROID__
 typedef ::testing::Types<BzipTest, XzTest> ZipTestTypes;
+#else
+// Chrome OS implementation of Xz compressor just returns false.
+typedef ::testing::Types<BzipTest> ZipTestTypes;
+#endif  // __ANDROID__
 
 TYPED_TEST_CASE(ZipTest, ZipTestTypes);
 
diff --git a/update_engine.gyp b/update_engine.gyp
index 41f4422..4da04d4 100644
--- a/update_engine.gyp
+++ b/update_engine.gyp
@@ -124,7 +124,7 @@
       'dependencies': [
         'update_metadata-protos',
       ],
-      # TODO(deymo): Remove unused dependencies once we stop including files
+      #TODO(deymo): Remove unused dependencies once we stop including files
       # from the root directory.
       'variables': {
         'exported_deps': [
@@ -355,7 +355,6 @@
         'exported_deps': [
           'ext2fs',
           'libpuffdiff',
-          'liblzma',
         ],
         'deps': ['<@(exported_deps)'],
       },