Preliminary xzip/LZMA support

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1164814 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 14 years ago
parent 54241a1f0a
commit ffcb34f4b8

@ -101,6 +101,14 @@ KTar::KTar( const TQString& filename, const TQString & _mimetype )
if ( fourthByte == 4 )
mimetype = "application/x-zip";
}
else if ( firstByte == '\xFD' && secondByte == '7' && thirdByte == 'z' )
{
unsigned char fourthByte = file.getch();
unsigned char fifthByte = file.getch();
unsigned char sixthByte = file.getch();
if ( fourthByte == 'X' && fifthByte == 'Z' && sixthByte == 0x00 )
mimetype = "application/x-xz";
}
}
file.close();
}
@ -285,8 +293,10 @@ bool KTar::KTarPrivate::fillTempFile( const TQString & filename) {
bool forced = false;
if( "application/x-gzip" == mimetype
|| "application/x-bzip2" == mimetype)
forced = true;
|| "application/x-bzip2" == mimetype
|| "application/x-lzma" == mimetype
|| "application/x-xz" == mimetype)
forced = true;
TQIODevice *filterDev = KFilterDev::deviceForFile( filename, mimetype, forced );

@ -33,7 +33,7 @@
* A class for reading / writing (optionally compressed) tar archives.
*
* KTar allows you to read and write tar archives, including those
* that are compressed using gzip or bzip2.
* that are compressed using gzip, bzip2, or xz.
*
* @author Torben Weis <weis@kde.org>, David Faure <faure@kde.org>
*/
@ -45,7 +45,8 @@ public:
* using the compression filter associated to given mimetype.
*
* @param filename is a local path (e.g. "/home/weis/myfile.tgz")
* @param mimetype "application/x-gzip" or "application/x-bzip2"
* @param mimetype "application/x-gzip", "application/x-bzip2",
* or "application/x-xz"
* Do not use application/x-tgz or similar - you only need to
* specify the compression layer ! If the mimetype is omitted, it
* will be determined from the filename.

@ -0,0 +1,88 @@
[Desktop Entry]
MimeType=application/x-lzma
Comment=LZMA File
Comment[af]=LZMA Lêer
Comment[ar]=ملف LZMA
Comment[az]=LZMA Faylı
Comment[be]=Файл LZMA
Comment[bg]=Архив LZMA
Comment[bn]=জি-জিপ ফাইল
Comment[br]=Restr LZMA
Comment[bs]=LZMA datoteka
Comment[ca]=Fitxer LZMA
Comment[cs]=Soubor komprimovaný gzipem
Comment[csb]=Lopk LZMA
Comment[cy]=Ffeil LZMA
Comment[da]=LZMA-fil
Comment[de]=LZMA-Datei
Comment[el]=Αρχείο gzip
Comment[eo]=LZMA-dosiero
Comment[es]=Archivo comprimido LZMA
Comment[et]=LZMA arhiiv
Comment[eu]=LZMA fitxategia
Comment[fa]=پروندۀ LZMA
Comment[fi]=LZMA-paketti
Comment[fr]=Fichier compressé par LZMA
Comment[fy]=LZMA-triem
Comment[ga]=Comhad gzip
Comment[gl]=Ficheiro LZMA
Comment[he]=קובץ LZMA
Comment[hi]=LZMA फ़ाइल
Comment[hr]=LZMA datoteka
Comment[hu]=LZMA-fájl
Comment[id]=Berkas LZMA
Comment[is]=Þjöppuð skrá (gzip)
Comment[it]=File LZMA
Comment[ja]=LZMA ファイル
Comment[ka]=LZMA არქივი
Comment[kk]=LZMA файлы
Comment[km]=ឯកសារ LZMA
Comment[ko]=LZMA 파일
Comment[lb]=LZMA-Datei
Comment[lt]=LZMA byla
Comment[lv]=LZMA fails
Comment[mk]=LZMA-датотека
Comment[mn]=GZip-Файл
Comment[ms]=Fail LZMA
Comment[mt]=Arkivju LZMA
Comment[nb]=GZip-fil
Comment[nds]=GZip-Datei
Comment[ne]=LZMA फाइल
Comment[nl]=LZMA-bestand
Comment[nn]=LZMA-fil
Comment[nso]=Faele ya LZMA
Comment[pa]=LZMA ਫਾਇਲ
Comment[pl]=Plik LZMA
Comment[pt]=Ficheiro do GZip
Comment[pt_BR]=Arquivo GZip
Comment[ro]=Fişier GZip
Comment[ru]=Архив gzip
Comment[rw]=LZMA Idosiye
Comment[se]=LZMA-fiila
Comment[sk]=GZip súbor
Comment[sl]=Datoteka, stisnjena z gzip
Comment[sq]=LZMA Skedë
Comment[sr]=LZMA фајл
Comment[sr@Latn]=LZMA fajl
Comment[ss]=Lifayela le LZMA
Comment[sv]=LZMA-fil
Comment[ta]=LZMA கோப்பு
Comment[te]=జీజిప్ దస్త్రం
Comment[tg]=Файли LZMA
Comment[th]=แฟ้มบีบอัด LZMA
Comment[tr]=LZMA Dosyası
Comment[tt]=LZMA Bireme
Comment[uk]=Файл gzip
Comment[uz]=LZMA-fayli
Comment[uz@cyrillic]=LZMA-файли
Comment[ven]=Faela ya LZMA
Comment[vi]=Tập tin LZMA
Comment[wa]=Fitchî gzip
Comment[xh]=Ifayile ye LZMA
Comment[zh_CN]=LZMA 文件
Comment[zh_HK]=LZMA 檔案
Comment[zh_TW]=LZMA 檔案
Comment[zu]=Ifayela le-LZMA
Icon=tgz
Type=MimeType
Patterns=*.lzma;

@ -0,0 +1,95 @@
[Desktop Entry]
Type=MimeType
MimeType=application/x-tlz
Icon=tgz
Patterns=*.tar.lzma;
Comment=LZMA Tar Archive
Comment[af]=LZMA gekompakteerde Tar Argief
Comment[ar]=أرشيف TAR عن طريق LZMA
Comment[az]=LZMAlənmiş Tar Arxivi
Comment[be]=Архіў Tar, сціснуты LZMA
Comment[bg]=Компресиран архив Tar с LZMA
Comment[bn]=জি-জিপকৃত (gzipped) টার আর্কাইভ
Comment[br]=Diell tar gzippet
Comment[bs]=LZMAovana tar arhiva
Comment[ca]=Arxiu TAR gzipat
Comment[cs]=LZMAovaný tar archív
Comment[csb]=Archiwa spakòwóné przez Tar ë LZMAp
Comment[cy]=Archif Tar wedi'i LZMAio
Comment[da]=LZMApede TAR-arkiver
Comment[de]=LZMA-komprimiertes Tar-Archiv
Comment[el]=Συμπιεσμένη αρχειοθήκη tar με gzip
Comment[eo]=LZMA-Tar-arĥivo
Comment[es]=Archivo Tar comprimido en LZMA
Comment[et]=LZMAitud TAR-arhiiv
Comment[eu]=Tar+GZIP artxiboa
Comment[fa]=بایگانی‌بان LZMAped
Comment[fi]=LZMA-pakattu Tar-paketti
Comment[fr]=Archive Tar compressée par LZMA
Comment[fy]=Mei LZMA komprimearre Tar-argyf
Comment[ga]=Cartlann tar comhbhrúite le gzip
Comment[gl]=Arquivo Tar comprimido con gzip
Comment[he]=ארכיון Tar דחוס ע"י LZMA
Comment[hi]=गजिप्ड Tar आर्काइव
Comment[hr]=LZMA-ana tar arhiva
Comment[hu]=LZMA tar-archívum
Comment[id]=Arsip LZMAped Tar
Comment[is]=LZMA þjappað tar-safn
Comment[it]=Archivio Tar compresso con LZMA
Comment[ja]=LZMA 圧縮された Tar アーカイブ
Comment[ka]=LZMA შეკუმშული Tar არქივი
Comment[kk]=LZMA-пен сығылған Tar архиві
Comment[km]=ប័ណ្ណសារ LZMAped Tar
Comment[ko]=LZMA으로 압축한 TAR 저장고
Comment[lb]=Mat LZMA kompriméierten Tar-Archiv
Comment[lt]=Tar archyvas, suglaudintas su gzip
Comment[lv]=LZMAots Tar Arhīvs
Comment[mi]=Takotoranga Tar LZMA
Comment[mk]=LZMA-увана Tar-архива
Comment[mn]=LZMA-р шахагдсан Tar-Архив
Comment[ms]=Arkib Tar diLZMAkan
Comment[mt]=Arkivju Tar LZMApjat
Comment[nb]=LZMApet tar-arkiv
Comment[nds]=GZip-komprimeert Tar-Archiv
Comment[ne]=जीजिप गरिएको टार सङ्ग्रह
Comment[nl]=Met LZMA gecomprimeerd Tar-archief
Comment[nn]=LZMApa tar-arkiv
Comment[nso]=Polokelo ya Tar ya LZMAped
Comment[oc]=Archius tar gzipats
Comment[pa]=LZMAped Tar ਪੁਰਾਲੇਖ
Comment[pl]=Archiwum po tarowaniu i spakowaniu gzipem
Comment[pt]=Pacote Tar Gz
Comment[pt_BR]=Pacote Tar comprimido via gzip
Comment[ro]=Arhivă Tar comprimată cu GZip
Comment[ru]=Сжатый gzip архив tar
Comment[rw]=LZMAped Tar Idosiye yo mu bushinguro
Comment[se]=LZMApejuvvon Tar-arkiiva
Comment[sk]=LZMAované Tar archívy
Comment[sl]=Z gzip stisnjeni arhiv tar
Comment[sq]=Tar Arkivë e Ndrydhur me LZMA
Comment[sr]=ГЗипована TAR архива
Comment[sr@Latn]=GZipovana TAR arhiva
Comment[ss]=Silulu se LZMAped Tar
Comment[sv]=LZMA-komprimerat tar-arkiv
Comment[ta]=LZMA செய்த Tar காப்பகம்
Comment[te]=జీజిప్ చేయబడిన టార్ ఆర్కైవ్
Comment[tg]=Архиви LZMAped Tar
Comment[th]=แฟ้ม Tar บีบอัดด้วย LZMA
Comment[tr]=LZMA'lenmiş Tar Arşivi
Comment[tt]=LZMA'le Tar Tuplama
Comment[uk]=Архів tar стиснутий gzip
Comment[uz]=LZMA bilan qisilgan Tar arxivi
Comment[uz@cyrillic]=LZMA билан қисилган Tar архиви
Comment[ven]=Fhethu hau vhulungela hone zwithu zwa kale ha Tar ha LZMAped
Comment[vi]=Bản Tar đã nén LZMA
Comment[wa]=Årtchive TAR rastrindowe avou gzip
Comment[xh]=Indawo yogcino ye LZMAped Tar
Comment[zh_CN]=LZMA 压缩的 Tar 归档
Comment[zh_HK]=LZMA 壓縮的 Tar 保存檔
Comment[zh_TW]=LZMA 壓縮的 Tar 壓縮文件
Comment[zu]=Umqulu we-LZMAped Tar
[Property::X-KDE-LocalProtocol]
Type=QString
Value=tar

@ -0,0 +1,95 @@
[Desktop Entry]
Type=MimeType
MimeType=application/x-txz
Icon=txz
Patterns=*.tar.xz;*.txz;
Comment=Xzipped Tar Archive
Comment[af]=Xzip gekompakteerde Tar Argief
Comment[ar]=أرشيف TAR عن طريق Xzip
Comment[az]=Xziplənmiş Tar Arxivi
Comment[be]=Архіў Tar, сціснуты Xzip
Comment[bg]=Компресиран архив Tar с Xzip
Comment[bn]=জি-জিপকৃত (gzipped) টার আর্কাইভ
Comment[br]=Diell tar gzippet
Comment[bs]=Xzipovana tar arhiva
Comment[ca]=Arxiu TAR gzipat
Comment[cs]=Xzipovaný tar archív
Comment[csb]=Archiwa spakòwóné przez Tar ë Xzipp
Comment[cy]=Archif Tar wedi'i Xzipio
Comment[da]=Xzippede TAR-arkiver
Comment[de]=Xzip-komprimiertes Tar-Archiv
Comment[el]=Συμπιεσμένη αρχειοθήκη tar με gzip
Comment[eo]=Xzip-Tar-arĥivo
Comment[es]=Archivo Tar comprimido en Xzip
Comment[et]=Xzipitud TAR-arhiiv
Comment[eu]=Tar+GZIP artxiboa
Comment[fa]=بایگانی‌بان Xzipped
Comment[fi]=Xzip-pakattu Tar-paketti
Comment[fr]=Archive Tar compressée par Xzip
Comment[fy]=Mei Xzip komprimearre Tar-argyf
Comment[ga]=Cartlann tar comhbhrúite le gzip
Comment[gl]=Arquivo Tar comprimido con gzip
Comment[he]=ארכיון Tar דחוס ע"י Xzip
Comment[hi]=गजिप्ड Tar आर्काइव
Comment[hr]=Xzip-ana tar arhiva
Comment[hu]=Xzip tar-archívum
Comment[id]=Arsip Xzipped Tar
Comment[is]=Xzip þjappað tar-safn
Comment[it]=Archivio Tar compresso con Xzip
Comment[ja]=Xzip 圧縮された Tar アーカイブ
Comment[ka]=Xzip შეკუმშული Tar არქივი
Comment[kk]=Xzip-пен сығылған Tar архиві
Comment[km]=ប័ណ្ណសារ Xzipped Tar
Comment[ko]=Xzip으로 압축한 TAR 저장고
Comment[lb]=Mat Xzip kompriméierten Tar-Archiv
Comment[lt]=Tar archyvas, suglaudintas su gzip
Comment[lv]=Xzipots Tar Arhīvs
Comment[mi]=Takotoranga Tar Xzip
Comment[mk]=Xzip-увана Tar-архива
Comment[mn]=Xzip-р шахагдсан Tar-Архив
Comment[ms]=Arkib Tar diXzipkan
Comment[mt]=Arkivju Tar Xzippjat
Comment[nb]=Xzippet tar-arkiv
Comment[nds]=GZip-komprimeert Tar-Archiv
Comment[ne]=जीजिप गरिएको टार सङ्ग्रह
Comment[nl]=Met Xzip gecomprimeerd Tar-archief
Comment[nn]=Xzippa tar-arkiv
Comment[nso]=Polokelo ya Tar ya Xzipped
Comment[oc]=Archius tar gzipats
Comment[pa]=Xzipped Tar ਪੁਰਾਲੇਖ
Comment[pl]=Archiwum po tarowaniu i spakowaniu gzipem
Comment[pt]=Pacote Tar Gz
Comment[pt_BR]=Pacote Tar comprimido via gzip
Comment[ro]=Arhivă Tar comprimată cu GZip
Comment[ru]=Сжатый gzip архив tar
Comment[rw]=Xzipped Tar Idosiye yo mu bushinguro
Comment[se]=Xzippejuvvon Tar-arkiiva
Comment[sk]=Xzipované Tar archívy
Comment[sl]=Z gzip stisnjeni arhiv tar
Comment[sq]=Tar Arkivë e Ndrydhur me Xzip
Comment[sr]=ГЗипована TAR архива
Comment[sr@Latn]=GZipovana TAR arhiva
Comment[ss]=Silulu se Xzipped Tar
Comment[sv]=Xzip-komprimerat tar-arkiv
Comment[ta]=Xzip செய்த Tar காப்பகம்
Comment[te]=జీజిప్ చేయబడిన టార్ ఆర్కైవ్
Comment[tg]=Архиви Xzipped Tar
Comment[th]=แฟ้ม Tar บีบอัดด้วย Xzip
Comment[tr]=Xzip'lenmiş Tar Arşivi
Comment[tt]=Xzip'le Tar Tuplama
Comment[uk]=Архів tar стиснутий gzip
Comment[uz]=Xzip bilan qisilgan Tar arxivi
Comment[uz@cyrillic]=Xzip билан қисилган Tar архиви
Comment[ven]=Fhethu hau vhulungela hone zwithu zwa kale ha Tar ha Xzipped
Comment[vi]=Bản Tar đã nén Xzip
Comment[wa]=Årtchive TAR rastrindowe avou gzip
Comment[xh]=Indawo yogcino ye Xzipped Tar
Comment[zh_CN]=Xzip 压缩的 Tar 归档
Comment[zh_HK]=Xzip 壓縮的 Tar 保存檔
Comment[zh_TW]=Xzip 壓縮的 Tar 壓縮文件
Comment[zu]=Umqulu we-Xzipped Tar
[Property::X-KDE-LocalProtocol]
Type=QString
Value=tar

@ -0,0 +1,88 @@
[Desktop Entry]
MimeType=application/x-xz
Comment=Xzip File
Comment[af]=Xzip Lêer
Comment[ar]=ملف Xzip
Comment[az]=Xzip Faylı
Comment[be]=Файл Xzip
Comment[bg]=Архив Xzip
Comment[bn]=জি-জিপ ফাইল
Comment[br]=Restr Xzip
Comment[bs]=Xzip datoteka
Comment[ca]=Fitxer Xzip
Comment[cs]=Soubor komprimovaný gzipem
Comment[csb]=Lopk Xzip
Comment[cy]=Ffeil Xzip
Comment[da]=Xzip-fil
Comment[de]=Xzip-Datei
Comment[el]=Αρχείο gzip
Comment[eo]=Xzip-dosiero
Comment[es]=Archivo comprimido Xzip
Comment[et]=Xzip arhiiv
Comment[eu]=Xzip fitxategia
Comment[fa]=پروندۀ Xzip
Comment[fi]=Xzip-paketti
Comment[fr]=Fichier compressé par Xzip
Comment[fy]=Xzip-triem
Comment[ga]=Comhad gzip
Comment[gl]=Ficheiro Xzip
Comment[he]=קובץ Xzip
Comment[hi]=Xzip फ़ाइल
Comment[hr]=Xzip datoteka
Comment[hu]=Xzip-fájl
Comment[id]=Berkas Xzip
Comment[is]=Þjöppuð skrá (gzip)
Comment[it]=File Xzip
Comment[ja]=Xzip ファイル
Comment[ka]=Xzip არქივი
Comment[kk]=Xzip файлы
Comment[km]=ឯកសារ Xzip
Comment[ko]=Xzip 파일
Comment[lb]=Xzip-Datei
Comment[lt]=Xzip byla
Comment[lv]=Xzip fails
Comment[mk]=Xzip-датотека
Comment[mn]=GZip-Файл
Comment[ms]=Fail Xzip
Comment[mt]=Arkivju Xzip
Comment[nb]=GZip-fil
Comment[nds]=GZip-Datei
Comment[ne]=Xzip फाइल
Comment[nl]=Xzip-bestand
Comment[nn]=Xzip-fil
Comment[nso]=Faele ya Xzip
Comment[pa]=Xzip ਫਾਇਲ
Comment[pl]=Plik Xzip
Comment[pt]=Ficheiro do GZip
Comment[pt_BR]=Arquivo GZip
Comment[ro]=Fişier GZip
Comment[ru]=Архив gzip
Comment[rw]=Xzip Idosiye
Comment[se]=Xzip-fiila
Comment[sk]=GZip súbor
Comment[sl]=Datoteka, stisnjena z gzip
Comment[sq]=Xzip Skedë
Comment[sr]=Xzip фајл
Comment[sr@Latn]=Xzip fajl
Comment[ss]=Lifayela le Xzip
Comment[sv]=Xzip-fil
Comment[ta]=Xzip கோப்பு
Comment[te]=జీజిప్ దస్త్రం
Comment[tg]=Файли Xzip
Comment[th]=แฟ้มบีบอัด Xzip
Comment[tr]=Xzip Dosyası
Comment[tt]=Xzip Bireme
Comment[uk]=Файл gzip
Comment[uz]=Xzip-fayli
Comment[uz@cyrillic]=Xzip-файли
Comment[ven]=Faela ya Xzip
Comment[vi]=Tập tin Xzip
Comment[wa]=Fitchî gzip
Comment[xh]=Ifayile ye Xzip
Comment[zh_CN]=Xzip 文件
Comment[zh_HK]=Xzip 檔案
Comment[zh_TW]=Xzip 檔案
Comment[zu]=Ifayela le-Xzip
Icon=tgz
Type=MimeType
Patterns=*.xz;
Loading…
Cancel
Save