From 58c84cda3bdf537dd68ecf5c6bfeb7e942472396 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 22 Apr 2016 18:15:02 +0200 Subject: [PATCH] Make compression interruptible --- src/libutil/compression.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libutil/compression.cc b/src/libutil/compression.cc index b047d305c..beede1321 100644 --- a/src/libutil/compression.cc +++ b/src/libutil/compression.cc @@ -1,5 +1,5 @@ #include "compression.hh" -#include "types.hh" +#include "util.hh" #include #include @@ -35,6 +35,7 @@ std::string compressXZ(const std::string & in) strm().avail_out = sizeof(outbuf); while (true) { + checkInterrupt(); if (strm().avail_in == 0) action = LZMA_FINISH; @@ -73,6 +74,7 @@ ref decompressXZ(const std::string & in) strm().avail_out = sizeof(outbuf); while (true) { + checkInterrupt(); if (strm().avail_in == 0) action = LZMA_FINISH;