- // Get the archive member and positition the file
- const ARArchive::Member *Member = AR.FindMember("data.tar.gz");
- const char *Compressor = "gzip";
- if (Member == 0) {
- Member = AR.FindMember("data.tar.bz2");
- Compressor = "bzip2";
+ // Get the archive member
+ const ARArchive::Member *Member = NULL;
+ std::string Compressor;
+
+ std::string const data = "data.tar";
+ std::vector<APT::Configuration::Compressor> compressor = APT::Configuration::getCompressors();
+ for (std::vector<APT::Configuration::Compressor>::const_iterator c = compressor.begin();
+ c != compressor.end(); ++c)
+ {
+ Member = AR.FindMember(std::string(data).append(c->Extension).c_str());
+ if (Member == NULL)
+ continue;
+ Compressor = c->Binary;
+ break;