By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release. View | Details | Raw Unified | Return to bug 1493
Collapse All | Expand All

(-)trinity-tdelibs-3.5.13.2~pre55+9977a7c4/CMakeLists.txt.ORI (+11 lines)
Lines 81-86 Link Here
81
OPTION( WITH_INOTIFY "Enable inotify support for kio" ON )
81
OPTION( WITH_INOTIFY "Enable inotify support for kio" ON )
82
OPTION( WITH_GAMIN "Enable FAM/GAMIN support" ${WITH_ALL_OPTIONS} )
82
OPTION( WITH_GAMIN "Enable FAM/GAMIN support" ${WITH_ALL_OPTIONS} )
83
OPTION( WITH_SUDO_KDESU_BACKEND "Use sudo as backend for kdesu (default is su)" OFF )
83
OPTION( WITH_SUDO_KDESU_BACKEND "Use sudo as backend for kdesu (default is su)" OFF )
84
OPTION( WITH_LZMA "Enable support for LZMA/XZ" ${WITH_ALL_OPTIONS} )
84
85
85
OPTION( WITH_ASPELL "Enable aspell support" ${WITH_ALL_OPTIONS} )
86
OPTION( WITH_ASPELL "Enable aspell support" ${WITH_ALL_OPTIONS} )
86
OPTION( WITH_HSPELL "Enable hspell support" ${WITH_ALL_OPTIONS} )
87
OPTION( WITH_HSPELL "Enable hspell support" ${WITH_ALL_OPTIONS} )
Lines 652-657 Link Here
652
endif( KDEINIT_USE_XFT )
653
endif( KDEINIT_USE_XFT )
653
654
654
655
656
##### check for lzma/xz #########################
657
658
if( WITH_LZMA )
659
  pkg_search_module( LZMA liblzma )
660
  if( NOT LZMA_FOUND )
661
    message(FATAL_ERROR "\nLZMA are requested, but not found on your system" )
662
  endif( NOT LZMA_FOUND )
663
endif( WITH_LZMA )
664
665
655
##### check for libart ##########################
666
##### check for libart ##########################
656
667
657
if( WITH_LIBART )
668
if( WITH_LIBART )
(-)trinity-tdelibs-3.5.13.2~pre55+9977a7c4/kioslave.OLD/xz/CMakeLists.txt (+41 lines)
Line 0 Link Here
1
#################################################
2
#
3
#  (C) 2010 Serghei Amelian
4
#  serghei (DOT) amelian (AT) gmail.com
5
#
6
#  Improvements and feedback are welcome
7
#
8
#  This file is released under GPL >= 2
9
#
10
#################################################
11
12
include_directories(
13
  ${TQT_INCLUDE_DIRS}
14
  ${CMAKE_BINARY_DIR}/kdecore
15
  ${CMAKE_SOURCE_DIR}/kdecore
16
  ${CMAKE_SOURCE_DIR}/kio/kio
17
)
18
19
link_directories(
20
  ${TQT_LIBRARY_DIRS}
21
)
22
23
24
##### other data ################################
25
26
install( FILES kxzfilter.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
27
28
29
##### kxzfilter ###############################
30
31
set( target kxzfilter )
32
33
set( ${target}_SRCS
34
  kxzfilter.cpp
35
)
36
37
tde_add_kpart( ${target} AUTOMOC
38
  SOURCES ${${target}_SRCS}
39
  LINK kio-shared ${LZMA_LIBRARIES}
40
  DESTINATION ${PLUGIN_INSTALL_DIR}
41
)
(-)trinity-tdelibs-3.5.13.2~pre55+9977a7c4/kioslave.OLD/CMakeLists.txt (+1 lines)
Lines 14-18 Link Here
14
add_subdirectory( ftp )
14
add_subdirectory( ftp )
15
add_subdirectory( gzip )
15
add_subdirectory( gzip )
16
add_subdirectory( bzip2 )
16
add_subdirectory( bzip2 )
17
tde_conditional_add_subdirectory( WITH_LZMA xz )
17
add_subdirectory( metainfo )
18
add_subdirectory( metainfo )
18
add_subdirectory( iso )
19
add_subdirectory( iso )
(-)trinity-tdelibs-3.5.13.2~pre55+9977a7c4/kioslave.OLD/xz/kxzfilter.cpp (+190 lines)
Line 0 Link Here
1
/* This file is part of the KDE libraries
2
   Copyright (C) 2007-2008 Per Øyvind Karlsen <peroyvind@mandriva.org>
3
4
   Based on kbzip2filter:
5
   Copyright (C) 2000-2005 David Faure <faure@kde.org>
6
7
   This library is free software; you can redistribute it and/or
8
   modify it under the terms of the GNU Library General Public
9
   License as published by the Free Software Foundation; either
10
   version 2 of the License, or (at your option) any later version.
11
12
   This library is distributed in the hope that it will be useful,
13
   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
   Library General Public License for more details.
16
17
   You should have received a copy of the GNU Library General Public License
18
   along with this library; see the file COPYING.LIB.  If not, write to
19
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20
   Boston, MA 02110-1301, USA.
21
*/
22
23
#include "kxzfilter.h"
24
#include <klibloader.h>
25
26
//#include <config-compression.h>
27
#define HAVE_XZ_SUPPORT 1
28
#if HAVE_XZ_SUPPORT
29
extern "C" {
30
	#include <lzma.h>
31
}
32
33
#include <kdebug.h>
34
35
#include <qiodevice.h>
36
37
// #define DEBUG_XZ
38
39
class KXzFilterFactory : public KLibFactory
40
{
41
public:
42
    KXzFilterFactory() : KLibFactory() {}
43
    virtual ~KXzFilterFactory(){}
44
    TQObject *createObject( TQObject *, const char *, const char*, const TQStringList & )
45
    {
46
        return new KXzFilter;
47
    }
48
};
49
50
K_EXPORT_COMPONENT_FACTORY( kxzfilter, KXzFilterFactory )
51
52
53
class KXzFilter::Private
54
{
55
public:
56
    Private()
57
    : isInitialized(false)
58
    {
59
        memset(&zStream, 0, sizeof(zStream));
60
        mode = 0;
61
    }
62
63
    lzma_stream zStream;
64
    int mode;
65
    bool isInitialized;
66
};
67
68
KXzFilter::KXzFilter()
69
    :d(new Private)
70
{
71
}
72
73
74
KXzFilter::~KXzFilter()
75
{
76
    delete d;
77
}
78
79
void KXzFilter::init( int mode )
80
{
81
    if (d->isInitialized) {
82
        terminate();
83
    }
84
  
85
    lzma_ret result;
86
    d->zStream.next_in = 0;
87
    d->zStream.avail_in = 0;
88
    if ( mode == IO_ReadOnly )
89
    {
90
	/* We set the memlimit for decompression to 100MiB which should be
91
	 * more than enough to be sufficient for level 9 which requires 65 MiB.
92
	 */
93
        result = lzma_auto_decoder(&d->zStream, 100<<20, 0);
94
    	//kdDebug(7131) << "lzma_auto_decoder returned " << result;
95
    } else if ( mode == IO_WriteOnly ) {
96
        result = lzma_easy_encoder(&d->zStream, LZMA_PRESET_DEFAULT, LZMA_CHECK_CRC32);
97
    	//kdDebug(7131) << "lzma_easy_encoder returned " << result;
98
    } else
99
        kdWarning(7131) << "Unsupported mode " << mode << ". Only IO_ReadOnly and IO_WriteOnly supported";
100
    d->mode = mode;
101
    d->isInitialized = true;
102
}
103
104
int KXzFilter::mode() const
105
{
106
    return d->mode;
107
}
108
109
void KXzFilter::terminate()
110
{
111
    if (d->mode == IO_ReadOnly || d->mode == IO_WriteOnly) {
112
        lzma_end(&d->zStream);
113
    } else {
114
        kdWarning(7131) << "Unsupported mode " << d->mode << ". Only IO_ReadOnly and IO_WriteOnly supported";
115
    }
116
    d->isInitialized = false;
117
}
118
119
120
void KXzFilter::reset()
121
{
122
    //kdDebug(7131) << "KXzFilter::reset";
123
    // liblzma doesn't have a reset call...
124
    terminate();
125
    init( d->mode );
126
}
127
128
void KXzFilter::setOutBuffer( char * data, uint maxlen )
129
{
130
    d->zStream.avail_out = maxlen;
131
    d->zStream.next_out = (uint8_t *)data;
132
}
133
134
void KXzFilter::setInBuffer( const char *data, unsigned int size )
135
{
136
    d->zStream.avail_in = size;
137
    d->zStream.next_in = (uint8_t *)const_cast<char *>(data);
138
}
139
140
int KXzFilter::inBufferAvailable() const
141
{
142
    return d->zStream.avail_in;
143
}
144
145
int KXzFilter::outBufferAvailable() const
146
{
147
    return d->zStream.avail_out;
148
}
149
150
KXzFilter::Result KXzFilter::uncompress()
151
{
152
    //kdDebug(7131) << "Calling lzma_code with avail_in=" << inBufferAvailable() << " avail_out =" << outBufferAvailable();
153
    lzma_ret result = lzma_code(&d->zStream, LZMA_RUN);
154
    if ( result != LZMA_OK )
155
    {
156
        kdDebug(7131) << "lzma_code returned " << result;
157
        kdDebug(7131) << "KXzFilter::uncompress " << ( result == LZMA_STREAM_END ? END : ERROR );
158
    }
159
160
    switch (result) {
161
        case LZMA_OK:
162
                return OK;
163
        case LZMA_STREAM_END:
164
                return END;
165
        default:
166
                return ERROR;
167
    }
168
}
169
170
KXzFilter::Result KXzFilter::compress( bool finish )
171
{
172
    //kdDebug(7131) << "Calling lzma_code with avail_in=" << inBufferAvailable() << " avail_out=" << outBufferAvailable();
173
    lzma_ret result = lzma_code(&d->zStream, finish ? LZMA_FINISH : LZMA_RUN );
174
175
    switch (result) {
176
        case LZMA_OK:
177
                return OK;
178
                break;
179
        case LZMA_STREAM_END:
180
                kdDebug(7131) << "  lzma_code returned " << result;
181
                return END;
182
		break;
183
        default:
184
                kdDebug(7131) << "  lzma_code returned " << result;
185
                return ERROR;
186
                break;
187
    }
188
}
189
190
#endif  /* HAVE_XZ_SUPPORT */
(-)trinity-tdelibs-3.5.13.2~pre55+9977a7c4/kioslave.OLD/xz/kxzfilter.desktop (+86 lines)
Line 0 Link Here
1
[Desktop Entry]
2
Type=Service
3
Name=XZ Filter
4
Name[af]=XZ Filter
5
Name[ar]=فلتر XZ
6
Name[az]=XZ Filtri
7
Name[be]=Фільтр XZ
8
Name[bg]=Филтър XZ
9
Name[bn]=জি-জিপ (XZ) ফিল্টার
10
Name[br]=Sil XZ
11
Name[ca]=Filtre XZ
12
Name[cs]=Filtr XZ
13
Name[csb]=Filter XZ
14
Name[cy]=Hidl XZ
15
Name[da]=XZ-filter
16
Name[de]=XZ-Filter
17
Name[el]=Φίλτρο XZ
18
Name[eo]=XZ-filtrilo
19
Name[es]=Filtro XZ
20
Name[et]=XZ filter
21
Name[eu]=XZ iragazkia
22
Name[fa]=پالایۀ XZ
23
Name[fi]=XZ-suodin
24
Name[fr]=Filtre XZ
25
Name[fy]=XZ-filter
26
Name[ga]=Scagaire XZ
27
Name[gl]=Filtro XZ
28
Name[he]=מסנן XZ
29
Name[hi]=XZ फ़िल्टर
30
Name[hr]=XZ filtar
31
Name[hu]=XZ szűrő
32
Name[id]=Filter XZ
33
Name[is]=XZ sía
34
Name[it]=Filtro XZ
35
Name[ja]=XZ フィルタ
36
Name[ka]=XZ ფილტრი
37
Name[kk]=XZ сүзгісі
38
Name[km]=តម្រង XZ
39
Name[ko]=XZ 거르개
40
Name[lb]=XZ-Filter
41
Name[lt]=XZ filtras
42
Name[lv]=XZ Filtrs
43
Name[mk]=XZ филтер
44
Name[mn]=XZ-Filter
45
Name[ms]=Penapis XZ
46
Name[mt]=Filtru XZ
47
Name[nb]=XZ-filter
48
Name[nds]=XZ-Filter
49
Name[ne]=XZ फिल्टर
50
Name[nl]=XZ-filter
51
Name[nn]=XZ-filter
52
Name[nso]=Sesekodi sa XZ
53
Name[pa]=XZ ਫਿਲਟਰ
54
Name[pl]=Filtr XZ
55
Name[pt]=Filtro XZ
56
Name[pt_BR]=Filtro XZ
57
Name[ro]=Filtru XZ
58
Name[ru]=Фильтр XZ
59
Name[rw]=Muyunguruzi XZ 
60
Name[se]=XZ-filter
61
Name[sk]=XZ filter
62
Name[sl]=Filter za XZ
63
Name[sq]=Filteri XZ
64
Name[sr]=XZ филтер
65
Name[sr@Latn]=XZ filter
66
Name[ss]=Sisefo se XZ 
67
Name[sv]=XZ-filter
68
Name[ta]=XZ வடிகட்டி
69
Name[te]=జిజిప్ గలని
70
Name[tg]=Таровиши XZ
71
Name[th]=ตัวกรอง XZ
72
Name[tr]=XZ Filtresi
73
Name[tt]=XZ Sözgeçe
74
Name[uk]=Фільтр XZ
75
Name[uz]=XZ-filter
76
Name[uz@cyrillic]=XZ-филтер
77
Name[ven]=Filithara ya XZ
78
Name[vi]=Bộ lọc XZ
79
Name[wa]=Passete XZ
80
Name[xh]=Isihluzi se XZ
81
Name[zh_CN]=XZ 过滤程序
82
Name[zh_HK]=XZ 過濾器
83
Name[zh_TW]=XZ 過濾器
84
Name[zu]=Ihluzo le-XZ
85
X-KDE-Library=kxzfilter
86
ServiceTypes=KDECompressionFilter,application/x-xz,application/x-txz,application/x-lzma
(-)trinity-tdelibs-3.5.13.2~pre55+9977a7c4/kioslave.OLD/xz/kxzfilter.h (+61 lines)
Line 0 Link Here
1
/* This file is part of the KDE libraries
2
   Copyright (C) 2007-2008 Per Øyvind Karlsen <peroyvind@mandriva.org>
3
4
   Based on kbzip2filter:
5
   Copyright (C) 2000 David Faure <faure@kde.org>
6
7
   This library is free software; you can redistribute it and/or
8
   modify it under the terms of the GNU Library General Public
9
   License as published by the Free Software Foundation; either
10
   version 2 of the License, or (at your option) any later version.
11
12
   This library is distributed in the hope that it will be useful,
13
   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
   Library General Public License for more details.
16
17
   You should have received a copy of the GNU Library General Public License
18
   along with this library; see the file COPYING.LIB.  If not, write to
19
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20
   Boston, MA 02110-1301, USA.
21
*/
22
23
#ifndef KXZFILTER_H
24
#define KXZFILTER_H
25
26
//#include <config-compression.h>
27
#define HAVE_XZ_SUPPORT 1
28
#if HAVE_XZ_SUPPORT
29
30
#include "kfilterbase.h"
31
32
/**
33
 * Internal class used by KFilterDev
34
 * @internal
35
 */
36
class KXzFilter : public KFilterBase
37
{
38
public:
39
    KXzFilter();
40
    virtual ~KXzFilter();
41
42
    virtual void init( int );
43
    virtual int mode() const;
44
    virtual void terminate();
45
    virtual void reset();
46
    virtual bool readHeader() { return true; } // lzma handles it by itself ! Cool !
47
    virtual bool writeHeader( const TQCString & ) { return true; }
48
    virtual void setOutBuffer( char * data, uint maxlen );
49
    virtual void setInBuffer( const char * data, uint size );
50
    virtual int  inBufferAvailable() const;
51
    virtual int  outBufferAvailable() const;
52
    virtual Result uncompress();
53
    virtual Result compress( bool finish );
54
private:
55
    class Private;
56
    Private* const d;
57
};
58
59
#endif
60
61
#endif // KXZFILTER_H
(-)trinity-tdelibs-3.5.13.2~pre55+9977a7c4/kio/magic.ORI (+3 lines)
Lines 484-489 Link Here
484
# ACE archive
484
# ACE archive
485
7      string        **ACE**     application/x-ace
485
7      string        **ACE**     application/x-ace
486
486
487
# XZ
488
0	string           \0fd\037\07a\058\05a\000             application/x-xz
489
487
490
488
#------------------------------------------------------------------------------
491
#------------------------------------------------------------------------------
489
# frame:  file(1) magic for FrameMaker files
492
# frame:  file(1) magic for FrameMaker files
(-)trinity-tdelibs-3.5.13.2~pre55+9977a7c4/kdecore/kurl.cpp.ORI (+4 lines)
Lines 1456-1461 Link Here
1456
     return true;
1456
     return true;
1457
  if (m_strRef_encoded.startsWith("zip:"))
1457
  if (m_strRef_encoded.startsWith("zip:"))
1458
     return true;
1458
     return true;
1459
  if (m_strRef_encoded.startsWith("lzma:"))
1460
     return true;
1461
  if (m_strRef_encoded.startsWith("xz:"))
1462
     return true;
1459
  if ( m_strProtocol == "error" ) // anything that starts with error: has suburls
1463
  if ( m_strProtocol == "error" ) // anything that starts with error: has suburls
1460
     return true;
1464
     return true;
1461
  return false;
1465
  return false;
(-)trinity-tdelibs-3.5.13.2~pre55+9977a7c4/kdecore/kdebug.areas.ORI (+1 lines)
Lines 289-294 Link Here
289
7126        kio_devices
289
7126        kio_devices
290
7127        kio_fish
290
7127        kio_fish
291
7128        kio_svn
291
7128        kio_svn
292
7131        kio_xz
292
293
293
# kdesdk
294
# kdesdk
294
8100        kompare
295
8100        kompare
(-)trinity-tdelibs-3.5.13.2~pre55+9977a7c4/kio/tests/kfiltertest.cpp.ORI (+10 lines)
Lines 94-104 Link Here
94
    getcwd( currentdir, PATH_MAX );
94
    getcwd( currentdir, PATH_MAX );
95
    TQString pathgz = TQFile::decodeName(currentdir) + "/test.gz";
95
    TQString pathgz = TQFile::decodeName(currentdir) + "/test.gz";
96
    TQString pathbz2 = TQFile::decodeName(currentdir) + "/test.bz2";
96
    TQString pathbz2 = TQFile::decodeName(currentdir) + "/test.bz2";
97
    TQString pathxz = TQFile::decodeName(currentdir) + "/test.xz";
97
98
98
    kdDebug() << " -- test_block_write gzip -- " << endl;
99
    kdDebug() << " -- test_block_write gzip -- " << endl;
99
    test_block_write(pathgz);
100
    test_block_write(pathgz);
100
    kdDebug() << " -- test_block_write bzip2 -- " << endl;
101
    kdDebug() << " -- test_block_write bzip2 -- " << endl;
101
    test_block_write(pathbz2);
102
    test_block_write(pathbz2);
103
    kdDebug() << " -- test_block_write xz -- " << endl;
104
    test_block_write(pathxz);
102
105
103
    kdDebug() << " -- test_block gzip -- " << endl;
106
    kdDebug() << " -- test_block gzip -- " << endl;
104
    test_block(pathgz);
107
    test_block(pathgz);
Lines 114-118 Link Here
114
    kdDebug() << " -- test_textstream bzip2 -- " << endl;
117
    kdDebug() << " -- test_textstream bzip2 -- " << endl;
115
    test_textstream(pathbz2);
118
    test_textstream(pathbz2);
116
119
120
    kdDebug() << " -- test_block xz -- " << endl;
121
    test_block(pathxz);
122
    kdDebug() << " -- test_getch xz -- " << endl;
123
    test_getch(pathxz);
124
    kdDebug() << " -- test_textstream xz -- " << endl;
125
    test_textstream(pathxz);
126
117
    return 0;
127
    return 0;
118
}
128
}

Return to bug 1493