Commit 3ff069eb authored by Nadeem Vawda's avatar Nadeem Vawda

Issue #6715: Add module for compression using the LZMA algorithm.

parent 551ac957
......@@ -5,7 +5,8 @@ Data Compression and Archiving
******************************
The modules described in this chapter support data compression with the zlib,
gzip, and bzip2 algorithms, and the creation of ZIP- and tar-format archives.
gzip, bzip2 and lzma algorithms, and the creation of ZIP- and tar-format
archives.
.. toctree::
......@@ -13,5 +14,6 @@ gzip, and bzip2 algorithms, and the creation of ZIP- and tar-format archives.
zlib.rst
gzip.rst
bz2.rst
lzma.rst
zipfile.rst
tarfile.rst
......@@ -12,7 +12,7 @@
This module provides a comprehensive interface for compressing and
decompressing data using the bzip2 compression algorithm.
For related file formats, see the :mod:`gzip`, :mod:`zipfile`, and
For related file formats, see the :mod:`gzip`, :mod:`lzma`, :mod:`zipfile`, and
:mod:`tarfile` modules.
The :mod:`bz2` module contains:
......
......@@ -21,7 +21,7 @@ Note that additional file formats which can be decompressed by the
:program:`gzip` and :program:`gunzip` programs, such as those produced by
:program:`compress` and :program:`pack`, are not supported by this module.
For other archive formats, see the :mod:`bz2`, :mod:`zipfile`, and
For related file formats, see the :mod:`bz2`, :mod:`lzma`, :mod:`zipfile`, and
:mod:`tarfile` modules.
The module defines the following items:
......
This diff is collapsed.
......@@ -23,7 +23,7 @@ decryption of encrypted files in ZIP archives, but it currently cannot
create an encrypted file. Decryption is extremely slow as it is
implemented in native Python rather than C.
For other archive formats, see the :mod:`bz2`, :mod:`gzip`, and
For related file formats, see the :mod:`bz2`, :mod:`gzip`, :mod:`lzma`, and
:mod:`tarfile` modules.
The module defines the following items:
......
......@@ -18,8 +18,8 @@ order. This documentation doesn't attempt to cover all of the permutations;
consult the zlib manual at http://www.zlib.net/manual.html for authoritative
information.
For reading and writing ``.gz`` files see the :mod:`gzip` module. For
other related file formats, see the :mod:`bz2`, :mod:`zipfile`, and
For reading and writing ``.gz`` files see the :mod:`gzip` module. For other
related file formats, see the :mod:`bz2`, :mod:`lzma`, :mod:`zipfile`, and
:mod:`tarfile` modules.
The available exception and functions in this module are:
......
This diff is collapsed.
This diff is collapsed.
......@@ -399,6 +399,8 @@ Core and Builtins
Library
-------
- Issue #6715: Add a module 'lzma' for compression using the LZMA algorithm.
- Issue #13487: Make inspect.getmodule robust against changes done to
sys.modules while it is iterating over it.
......
This diff is collapsed.
This diff is collapsed.
......@@ -92,6 +92,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_bz2", "_bz2.vcproj", "{73F
{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_lzma", "_lzma.vcproj", "{F9D71780-F393-11E0-BE50-0800200C9A66}"
ProjectSection(ProjectDependencies) = postProject
{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "select", "select.vcproj", "{18CAE28C-B454-46C1-87A0-493D91D97F03}"
ProjectSection(ProjectDependencies) = postProject
{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
......@@ -421,6 +426,22 @@ Global
{73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|Win32.Build.0 = Release|Win32
{73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|x64.ActiveCfg = Release|x64
{73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|x64.Build.0 = Release|x64
{F9D71780-F393-11E0-BE50-0800200C9A66}.Debug|Win32.ActiveCfg = Debug|Win32
{F9D71780-F393-11E0-BE50-0800200C9A66}.Debug|Win32.Build.0 = Debug|Win32
{F9D71780-F393-11E0-BE50-0800200C9A66}.Debug|x64.ActiveCfg = Debug|x64
{F9D71780-F393-11E0-BE50-0800200C9A66}.Debug|x64.Build.0 = Debug|x64
{F9D71780-F393-11E0-BE50-0800200C9A66}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
{F9D71780-F393-11E0-BE50-0800200C9A66}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
{F9D71780-F393-11E0-BE50-0800200C9A66}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
{F9D71780-F393-11E0-BE50-0800200C9A66}.PGInstrument|x64.Build.0 = PGInstrument|x64
{F9D71780-F393-11E0-BE50-0800200C9A66}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
{F9D71780-F393-11E0-BE50-0800200C9A66}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
{F9D71780-F393-11E0-BE50-0800200C9A66}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
{F9D71780-F393-11E0-BE50-0800200C9A66}.PGUpdate|x64.Build.0 = PGUpdate|x64
{F9D71780-F393-11E0-BE50-0800200C9A66}.Release|Win32.ActiveCfg = Release|Win32
{F9D71780-F393-11E0-BE50-0800200C9A66}.Release|Win32.Build.0 = Release|Win32
{F9D71780-F393-11E0-BE50-0800200C9A66}.Release|x64.ActiveCfg = Release|x64
{F9D71780-F393-11E0-BE50-0800200C9A66}.Release|x64.Build.0 = Release|x64
{18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|Win32.ActiveCfg = Debug|Win32
{18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|Win32.Build.0 = Debug|Win32
{18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|x64.ActiveCfg = Debug|x64
......
......@@ -56,6 +56,10 @@
Name="bz2Dir"
Value="$(externalsDir)\bzip2-1.0.5"
/>
<UserMacro
Name="lzmaDir"
Value="$(externalsDir)\xz-5.0.3"
/>
<UserMacro
Name="opensslDir"
Value="$(externalsDir)\openssl-1.0.0a"
......
......@@ -133,6 +133,12 @@ _bz2
All of this managed to build libbz2.lib in
bzip2-1.0.5\$platform-$configuration\, which the Python project links in.
_lzma
Python wrapper for the liblzma compression library.
Download the pre-built Windows binaries from http://tukaani.org/xz/, and
extract to ..\xz-5.0.3. If you are using a more recent version of liblzma,
it will be necessary to rename the directory from xz-<VERSION> to xz-5.0.3.
_ssl
Python wrapper for the secure sockets library.
......
......@@ -41,3 +41,8 @@ if not exist sqlite-3.7.4 (
rd /s/q sqlite-source-3.6.21
svn export http://svn.python.org/projects/external/sqlite-3.7.4
)
@rem lzma
if not exist xz-5.0.3 (
svn export http://svn.python.org/projects/external/xz-5.0.3
)
......@@ -1279,6 +1279,13 @@ class PyBuildExt(build_ext):
else:
missing.append('_bz2')
# LZMA compression support.
if self.compiler.find_library_file(lib_dirs, 'lzma'):
exts.append( Extension('_lzma', ['_lzmamodule.c'],
libraries = ['lzma']) )
else:
missing.append('_lzma')
# Interface to the Expat XML parser
#
# Expat was written by James Clark and is now maintained by a group of
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment