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:
- Fork the repository.
- Create a new branch:
git checkout -b feature-new. - Make your changes and commit:
git commit -m "Added new feature". - Push to the branch:
git push origin feature-new. - 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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11337aff0392686050a2c0f0e7b13cd371eeda17b7148aa61642bfd0d8e7e6d3
|
|
| MD5 |
57e878c20aa378fe785bc528df513b69
|
|
| BLAKE2b-256 |
ad1c2776d71ffe952d5b1e760c94eee0d7acede4e26287c4025b0161cf6ca855
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebac8f4c539838f5b9d127a0e8b6565f659f10f628382e0f97f241dd5978efec
|
|
| MD5 |
9abdf1959fbefba23eead322bdd3350e
|
|
| BLAKE2b-256 |
b9dd4e563a1124dce89a15da0b0936c0146d2e9132940d4bf290ab61a8c6466d
|