aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/compression.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-04-22 18:15:02 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-04-22 18:15:02 +0200
commit58c84cda3bdf537dd68ecf5c6bfeb7e942472396 (patch)
tree3312cd9fb7259331fc10f1e51ba4500c60bc0297 /src/libutil/compression.cc
parent456179018a669be5d041d07ced927ad72d3c15f0 (diff)
Make compression interruptible
Diffstat (limited to 'src/libutil/compression.cc')
-rw-r--r--src/libutil/compression.cc4
1 files changed, 3 insertions, 1 deletions
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 <lzma.h>
#include <cstdio>
@@ -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<std::string> decompressXZ(const std::string & in)
strm().avail_out = sizeof(outbuf);
while (true) {
+ checkInterrupt();
if (strm().avail_in == 0)
action = LZMA_FINISH;