Skip to main content

PPMd compression/decompression library

Project description

PPM(Prediction by partial matching) is a compression algorithm which has several variations of implementations. PPMd is the implementation by Dmitry Shkarin. It is used in the RAR by default and by 7-Zip as one of several possible methods.

ppmd, aka. ppmd-cffi, is a python bindings with PPMd implementation by C language. Core codes are derived from p7zip, portable 7-zip implementation, and now only consist of Ppmd7, PPMd ver.H.

Since 7-zip uses PPMd ver.H and RAR uses PPMd ver.I, the ppmd-cffi is considered compatible with 7-zip’s implementation.

Installation

As usual, you can install ppmd-cffi using python standard pip command. CAUTION: Since it is a bindings with C source code, C compiler should be installed on your operating system.

` pip install ppmd-cffi `

All C source codes are bundled with ppmd-cffi package.

Usage

ppmd-cffi provide two classes. Both class supports context manager, ie. with … as .. syntax.

Encoder

Encoder class provide PPMd encoder. It has encode(), flush() and close() methos.

Decoder

Decoder class pvoride PPMd decoder. It has decode() and close() methods.

Please see test code for a detailed usage.

License

  • Copyright (C) 2020 Hiroshi Miura

  • 7-Zip Copyright (C) 1999-2010 Igor Pavlov

  • LZMA SDK Copyright (C) 1999-2010 Igor Pavlov

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ppmd-cffi-0.0.4.tar.gz (33.2 kB view details)

Uploaded Source

File details

Details for the file ppmd-cffi-0.0.4.tar.gz.

File metadata

  • Download URL: ppmd-cffi-0.0.4.tar.gz
  • Upload date:
  • Size: 33.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.6

File hashes

Hashes for ppmd-cffi-0.0.4.tar.gz
Algorithm Hash digest
SHA256 cca805f33d1e32dc444257ec015f68f0cdc0be39e676ac8539ca07b28dbbd9e1
MD5 2069fa96bd048085999e8dbebbc9f4c3
BLAKE2b-256 c0da1f01d71fd176ede6a8b7e427085658c34dcc7a90756c8084eb5b08c46d3d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page