X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/47371b0047432ba7a5ee87173b00f912cdcd14e6..650faab01603caac04494d54cf6b10a65c00ea13:/ftparchive/multicompress.h diff --git a/ftparchive/multicompress.h b/ftparchive/multicompress.h index 3ac3b8fb2..4839af47d 100644 --- a/ftparchive/multicompress.h +++ b/ftparchive/multicompress.h @@ -20,28 +20,18 @@ #include #include +#include #include #include class MultiCompress { - // Enumeration of all supported compressors - struct CompType - { - const char *Name; - const char *Extension; - const char *Binary; - const char *CompArgs; - const char *UnCompArgs; - unsigned char Cost; - }; - // An output file struct Files { string Output; - const CompType *CompressProg; - Files *Next; + APT::Configuration::Compressor CompressProg; + Files *Next; FileFd TmpFile; pid_t CompressProc; time_t OldMTime; @@ -51,10 +41,9 @@ class MultiCompress Files *Outputs; pid_t Outputter; mode_t Permissions; - static const CompType Compressors[]; - bool OpenCompress(const CompType *Prog,pid_t &Pid,int const &FileFd, - int &OutFd,bool const &Comp); + bool OpenCompress(APT::Configuration::Compressor const &Prog, + pid_t &Pid,int const &FileFd, int &OutFd,bool const &Comp); bool Child(int const &Fd); bool Start(); bool Die(); @@ -65,7 +54,7 @@ class MultiCompress FILE *Input; unsigned long UpdateMTime; - bool Finalize(unsigned long &OutSize); + bool Finalize(unsigned long long &OutSize); bool OpenOld(int &Fd,pid_t &Proc); bool CloseOld(int Fd,pid_t Proc); static bool GetStat(string const &Output,string const &Compress,struct stat &St);