Seite 1 von 1

Komprimierung mit PyLZMA

Verfasst: Montag 5. Juli 2004, 12:06
von Magog
Hi,

auf meiner Homepage gibt es das Python-Modul PyLZMA, das eine Python-Schnittstelle zur Komprimierungs-Library LZMA bereitstellt.
LZMA wird u.a. von 7-zip verwendet und komprimiert in vielen Fällen deutlich besser als Zip, gzip oder bzip2.

PyLZMA funktioniert mit Python 2.1 bis 2.3, sowohl unter Windows, als auch unter Linux und FreeBSD. Zum Kompilieren werden keine zusätzlichen Bibliotheken benötigt.

Downloaden (Source, Binaries) könnt Ihr die aktuelle Version PyLZMA 0.0.3 unter folgender Url: http://www.joachim-bauch.de/projects/python/pylzma/

Feedback willkommen!
Joachim

Verfasst: Donnerstag 2. Dezember 2004, 20:08
von Leonidas
Cool! Hält es aich auch an die Konventionen des bz2 Moduls? Dann könnte man es als dropin verwenden. Aja, und ein Python 2.4 binary für Windows fehlt noch :)

Verfasst: Dienstag 3. Juni 2008, 20:54
von Ubuntuxer
Hi,
ich versuche gerade die Version 0.3.0 zu kompilimiren Ubuntu Hardy zu kompilieren, doch ich bekomme leider folgende Fehlermeldung:
johannes@johannes-pc:~/Desktop/pylzma-0.3.0$ python setup.py build
setup.py:83: UnsupportedPlatformWarning: Multithreading is not supported on the platform "linux2",
please contact mail@joachim-bauch.de for more informations.
please contact mail@joachim-bauch.de for more informations.""" % (sys.platform), UnsupportedPlatformWarning)
running build
running build_py
running build_ext
building 'pylzma' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DWITH_COMPAT=1 -I/usr/include/python2.5 -I. -I/usr/include/python2.5 -c pylzma.c -o build/temp.linux-x86_64-2.5/pylzma.o -Wno-non-virtual-dtor
cc1: Warnung: Kommandozeilenoption "-Wno-non-virtual-dtor" ist gültig für C++/ObjC++, aber nicht für C
pylzma.c:26:20: Fehler: Python.h: No such file or directory
pylzma.c:27:23: Fehler: cStringIO.h: No such file or directory
In file included from pylzma.c:30:
pylzma_compress.h:32: Fehler: expected »=«, »,«, »;«, »asm« or »__attribute__« before »*« token
In file included from pylzma.c:31:
pylzma_decompress.h:34: Fehler: expected »=«, »,«, »;«, »asm« or »__attribute__« before »*« token
In file included from pylzma.c:32:
pylzma_decompressobj.h:33: Fehler: expected specifier-qualifier-list before »PyObject_HEAD«
pylzma_decompressobj.h:42: Fehler: expected »=«, »,«, »;«, »asm« or »__attribute__« before »CDecompressionObject_Type«
In file included from pylzma.c:33:
pylzma_compressobj.h:29: Fehler: expected »=«, »,«, »;«, »asm« or »__attribute__« before »CCompressionObject_Type«
pylzma_compressobj.h:34: Fehler: expected »=«, »,«, »;«, »asm« or »__attribute__« before »*« token
In file included from pylzma.c:34:
pylzma_compressfile.h:33: Fehler: expected »=«, »,«, »;«, »asm« or »__attribute__« before »CCompressionFileObject_Type«
In file included from pylzma.c:36:
pylzma_decompress_compat.h:34: Fehler: expected »=«, »,«, »;«, »asm« or »__attribute__« before »*« token
In file included from pylzma.c:37:
pylzma_decompressobj_compat.h:33: Fehler: expected specifier-qualifier-list before »PyObject_HEAD«
pylzma_decompressobj_compat.h:40: Fehler: expected »=«, »,«, »;«, »asm« or »__attribute__« before »CCompatDecompressionObject_Type«
pylzma_decompressobj_compat.h:45: Fehler: expected »=«, »,«, »;«, »asm« or »__attribute__« before »*« token
pylzma.c:44: Fehler: expected »)« before »*« token
pylzma.c:53: Fehler: expected »=«, »,«, »;«, »asm« or »__attribute__« before »methods«
pylzma.c:67: Warnung: Rückgabetyp ist auf »int« voreingestellt
pylzma.c: In Funktion »DL_EXPORT«:
pylzma.c:67: Fehler: expected declaration specifiers before »initpylzma«
pylzma.c:99: Fehler: expected »{« at end of input
error: command 'gcc' failed with exit status 1

Kann mir da jemand helfen?
Gibt es noch eine andere Möglichkeit über Python 7zip Pakete zu entpacken?
vielen dank schon mal :)

Verfasst: Dienstag 3. Juni 2008, 21:24
von audax
Dir fehlen die Python-Header.

Re: Komprimierung mit PyLZMA

Verfasst: Mittwoch 4. Juni 2008, 07:35
von jens
btw. Da hast du leider ein kleines Spam Problem...

PyLZMA ist echt nett! Wäre toll, wenn es direkt in die Python Distribution aufgenommen werden würde ;)

Verfasst: Mittwoch 4. Juni 2008, 18:23
von Ubuntuxer
vielen dank audax; eigentlich hät ich darauf auch selber kommen können. :wink: