From e3fbd54cee3fffecbf4f7c384e0aad715fc68218 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 28 Dec 2015 00:07:03 +0100 Subject: FileFd: (native) LZ4 support Implement native support for LZ4 compression, using the official lz4 library. --- apt-pkg/aptconfiguration.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'apt-pkg/aptconfiguration.cc') 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 -- cgit v1.2.3