Skip to main content

A re-implementation of the IFF chunk module for reading chunked file data.

Project description

PyChunkCore

Overview

PyChunkCore is an advanced chunk-processing module that serves as a drop-in replacement for Python's deprecated chunk module. It extends the functionality by integrating pychunk, making it compatible with legacy and modern systems.

Key Features

✅ Fully compatible with Python 3.12 and 3.13+
✅ Implements both chunk and pychunk in a unified package
✅ Supports big-endian and little-endian file parsing
✅ Provides enhanced performance and additional utilities
✅ Acts as a seamless bridge for aifc and other legacy modules


Installation

Install via pip:

pip install pychunkcore

Or install from source:

git clone https://github.com/your-username/PyChunkCore.git
cd PyChunkCore
pip install .

Usage

Basic Example

from pyaifchunk.core_chunk import Chunk

with open("example.wav", "rb") as file:
    chunk = Chunk(file)
    print("Chunk Name:", chunk.getname())
    print("Chunk Size:", chunk.getsize())
    data = chunk.read()
    chunk.close()

Handling AIFF Files (aifc Module Compatibility)

from pyaifchunk.core_aifc import open as aifcopen # PyChunkCore ensures aifc works properly

with aifcopen("example.aiff", "rb") as af:
    print("Audio Params:", af.getparams())
    print("Sample Width:", af.getsampwidth())

Compatibility

PyChunkCore is designed to work with Python 3.12+, ensuring compatibility with modules like aifc that previously relied on chunk.

Supported Platforms

✅ Windows
✅ Linux
✅ macOS


Contributing

We welcome contributions! To contribute:

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature-new.
  3. Make your changes and commit: git commit -m "Added new feature".
  4. Push to the branch: git push origin feature-new.
  5. Submit a pull request!

License

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

This program 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 General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

See the LICENSE file for more details. See the LICENSE file for details.


Contact

📧 Email: swskye17@gmail.com
🐍 GitHub: skye

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

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

Source Distribution

pyaifchunk-1.0.tar.gz (25.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyaifchunk-1.0-py3-none-any.whl (24.5 kB view details)

Uploaded Python 3

File details

Details for the file pyaifchunk-1.0.tar.gz.

File metadata

  • Download URL: pyaifchunk-1.0.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for pyaifchunk-1.0.tar.gz
Algorithm Hash digest
SHA256 11337aff0392686050a2c0f0e7b13cd371eeda17b7148aa61642bfd0d8e7e6d3
MD5 57e878c20aa378fe785bc528df513b69
BLAKE2b-256 ad1c2776d71ffe952d5b1e760c94eee0d7acede4e26287c4025b0161cf6ca855

See more details on using hashes here.

File details

Details for the file pyaifchunk-1.0-py3-none-any.whl.

File metadata

  • Download URL: pyaifchunk-1.0-py3-none-any.whl
  • Upload date:
  • Size: 24.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for pyaifchunk-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ebac8f4c539838f5b9d127a0e8b6565f659f10f628382e0f97f241dd5978efec
MD5 9abdf1959fbefba23eead322bdd3350e
BLAKE2b-256 b9dd4e563a1124dce89a15da0b0936c0146d2e9132940d4bf290ab61a8c6466d

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