summaryrefslogtreecommitdiff
path: root/apt-pkg/aptconfiguration.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2015-12-28 00:07:03 +0100
committerJulian Andres Klode <jak@debian.org>2016-01-07 14:28:27 +0100
commite3fbd54cee3fffecbf4f7c384e0aad715fc68218 (patch)
treef6376dd48b8f6917c2bd36dca183f1d6eeb5c07f /apt-pkg/aptconfiguration.cc
parentd4cfc24887851fa55f93a1a3c09f662b80f97729 (diff)
FileFd: (native) LZ4 support
Implement native support for LZ4 compression, using the official lz4 library.
Diffstat (limited to 'apt-pkg/aptconfiguration.cc')
-rw-r--r--apt-pkg/aptconfiguration.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc
index a708a77c9..53f29df79 100644
--- a/apt-pkg/aptconfiguration.cc
+++ b/apt-pkg/aptconfiguration.cc
@@ -365,6 +365,12 @@ const Configuration::getCompressors(bool const Cached) {
setDefaultConfigurationForCompressors();
compressors.push_back(Compressor(".", "", "", NULL, NULL, 0));
+ if (_config->Exists("Dir::Bin::lz4") == false || FileExists(_config->FindFile("Dir::Bin::lz4")) == true)
+ compressors.push_back(Compressor("lz4",".lz4","lz4","-1","-d",50));
+#ifdef HAVE_LZ4
+ else
+ compressors.push_back(Compressor("lz4",".lz4","false", NULL, NULL, 50));
+#endif
if (_config->Exists("Dir::Bin::gzip") == false || FileExists(_config->FindFile("Dir::Bin::gzip")) == true)
compressors.push_back(Compressor("gzip",".gz","gzip","-6n","-d",100));
#ifdef HAVE_ZLIB