https://github.com/killerwhalee/cfbpy
cfbpy is a Python package that allows you to compress and decompress compound file binary formats, similar to how zip/unzip works for regular zip files. It provides an easy-to-use interface for handling compound files.
https://github.com/killerwhalee/cfbpy
compound compound-document compound-file-binary python python-library python3
Last synced: 5 months ago
JSON representation
cfbpy is a Python package that allows you to compress and decompress compound file binary formats, similar to how zip/unzip works for regular zip files. It provides an easy-to-use interface for handling compound files.
- Host: GitHub
- URL: https://github.com/killerwhalee/cfbpy
- Owner: killerwhalee
- License: mit
- Created: 2024-08-02T07:03:55.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-14T02:33:54.000Z (over 1 year ago)
- Last Synced: 2025-09-13T14:21:52.967Z (9 months ago)
- Topics: compound, compound-document, compound-file-binary, python, python-library, python3
- Language: Python
- Homepage: https://pypi.org/project/cfbpy/
- Size: 38.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cfbpy
`cfbpy` is a Python package that allows you to compress and decompress compound file binary formats,
similar to how zip/unzip works for regular zip files.
It provides an easy-to-use interface for handling compound files through the CompoundFile class.
## Features
Compress a directory into a compound file format.
Decompress a compound file back into a directory.
Installation
You can install cfbpy via pip:
```bash
pip install cfbpy
```
## Usage
Here’s how you can use `cfbpy` to compress and decompress files:
### Compress a Directory
```python
from cfbpy import CompoundFile
cf = CompoundFile()
cf.compress('path/to/directory', 'path/to/output.cfb')
```
### Decompress a Compound File
```python
from cfbpy import CompoundFile
cf = CompoundFile()
cf.decompress('path/to/input.cfb', 'path/to/extracted_directory')
```
## Methods
- compress(src, dest): Compresses the contents of the `src` directory into a compound file at `dest`.
- decompress(src, dest): Decompresses the compound file from `src` to the directory `dest`.
## License
This project is licensed under the MIT License - see the LICENSE file for details.
## Contributing
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.