Debian Codegraph @

PKG-INFO

raw
1 Metadata-Version: 2.4
2 Name: pyppmd
3 Version: 1.3.1
4 Summary: PPMd compression/decompression library
5 Author-email: Hiroshi Miura <[email protected]>
6 License: LGPL-2.1-or-later
7 Project-URL: Source, https://github.com/miurahr/pyppmd
8 Project-URL: Homepage, https://pyppmd.readthedocs.io/
9 Project-URL: Documentation, https://pyppmd.readthedocs.io/en/stable/
10 Project-URL: Bug Tracker, https://github.com/miurahr/pyppmd/issues
11 Project-URL: Changelog, https://pyppmd.readthedocs.io/en/latest/changelog.html
12 Classifier: Development Status :: 5 - Production/Stable
13 Classifier: Operating System :: MacOS :: MacOS X
14 Classifier: Operating System :: Microsoft :: Windows
15 Classifier: Operating System :: POSIX
16 Classifier: Operating System :: POSIX :: Linux
17 Classifier: Programming Language :: Python
18 Classifier: Programming Language :: Python :: 3
19 Classifier: Programming Language :: Python :: 3.10
20 Classifier: Programming Language :: Python :: 3.11
21 Classifier: Programming Language :: Python :: 3.12
22 Classifier: Programming Language :: Python :: 3.13
23 Classifier: Programming Language :: Python :: 3.14
24 Classifier: Programming Language :: Python :: 3 :: Only
25 Classifier: Programming Language :: Python :: Implementation :: CPython
26 Classifier: Programming Language :: Python :: Implementation :: PyPy
27 Classifier: Topic :: Software Development :: Libraries :: Python Modules
28 Requires-Python: >=3.10
29 Description-Content-Type: text/x-rst
30 License-File: LICENSE
31 Provides-Extra: test
32 Requires-Dist: pytest>=6.0; extra == "test"
33 Requires-Dist: pytest-benchmark; extra == "test"
34 Requires-Dist: pytest-cov; extra == "test"
35 Requires-Dist: pytest-timeout; extra == "test"
36 Requires-Dist: hypothesis; extra == "test"
37 Requires-Dist: coverage[toml]>=5.2; extra == "test"
38 Provides-Extra: check
39 Requires-Dist: mypy>=1.10.0; extra == "check"
40 Requires-Dist: check-manifest; extra == "check"
41 Requires-Dist: flake8; extra == "check"
42 Requires-Dist: flake8-isort; extra == "check"
43 Requires-Dist: flake8-black; extra == "check"
44 Requires-Dist: readme-renderer; extra == "check"
45 Requires-Dist: pygments; extra == "check"
46 Provides-Extra: docs
47 Requires-Dist: sphinx; extra == "docs"
48 Requires-Dist: sphinx_rtd_theme; extra == "docs"
49 Provides-Extra: fuzzer
50 Requires-Dist: atheris; extra == "fuzzer"
51 Requires-Dist: hypothesis; extra == "fuzzer"
52 Dynamic: license-file
53
54 PyPPMd
55 ======
56
57
58 .. image:: https://badge.fury.io/py/pyppmd.svg
59 :target: https://badge.fury.io/py/pyppmd
60
61 .. image:: https://img.shields.io/conda/vn/conda-forge/pyppmd
62 :target: https://anaconda.org/conda-forge/pyppmd
63
64 .. image:: https://readthedocs.org/projects/pyppmd/badge/?version=latest
65 :target: https://pyppmd.readthedocs.io/en/latest/?badge=latest
66
67 .. image:: https://dev.azure.com/miurahr/CodeBerg/_apis/build/status%2FCodeBerg-pyppmd-CI?branchName=main
68 :target: https://dev.azure.com/miurahr/CodeBerg/_build/latest?definitionId=29&branchName=main
69
70 Introduction
71 ------------
72
73 ``pyppmd`` module provides classes and functions for compressing and decompressing text data,
74 using PPM(Prediction by partial matching) compression algorithm which has several variations of implementations.
75 PPMd is the implementation by Dmitry Shkarin.
76 PyPPMD use Igor Pavlov's range coder introduced in 7-zip.
77
78 The API is similar to Python's bz2/lzma/zlib module.
79
80 Some parts of th codes are derived from ``7-zip``, ``pyzstd`` and ``ppmd-cffi``.
81
82
83 Development status
84 ------------------
85
86 A project status is considered as ``Stable``.
87
88 Extra input byte
89 ----------------
90
91 ``PPMd`` algorithm and implementation is designed to use ``Extra`` input byte.
92 The encoder will omit a last null (b"\0") byte when last byte is b"\0".
93 You may need to provide an extra null byte when you don't get expected size of
94 extracted data.
95
96 You can do like as:
97
98 .. code-block::
99
100 dec = pyppmd.Ppmd7Decoder(max_order=6, mem_size=16 << 10)
101 result = dec.decode(compressed, length)
102 if len(result) < length:
103 if dec.needs_input:
104 # ppmd need an extra null byte
105 result += dec.decode(b"\0", length - len(result))
106 else:
107 result += dec.decode(b"", length - len(result))
108
109
110 .. warning::
111 When use it on MSYS2/MINGW64 environment, you should set environment variable ``SETUPTOOLS_USE_DISTUTILS=stdlib``
112
113 Copyright and License
114 ---------------------
115
116 Some codes are derived from p7zip/7zip and pyzstd project.
117 Details are shown in LicenseNotices.rst
118
119 - SPDX-License-Identifier: LGPL-2.1-or-later
120 - SPDX-URL: https://spdx.org/licenses/LGPL-2.1-or-later.html
121
122 PyPPMd is licensed under GNU Lesser General Public License v2.1 or later.
123
124 - Copyright (C) 2020-2023 Hiroshi Miura
125 - Copyright (C) 2020-2021 Ma Lin
126 - Copyright (C) 2010-2012 Lockless Inc.
127 - Copyright (C) 1999-2017 Igor Pavlov
128
129 This library is free software; you can redistribute it and/or
130 modify it under the terms of the GNU Lesser General Public
131 License as published by the Free Software Foundation; either
132 version 2.1 of the License, or (at your option) any later version.
133
134 This library is distributed in the hope that it will be useful,
135 but WITHOUT ANY WARRANTY; without even the implied warranty of
136 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
137 Lesser General Public License for more details.
138
139 You should have received a copy of the GNU Lesser General Public
140 License along with this library; if not, write to the Free Software
141 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA