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.
Compress a directory into a compound file format. Decompress a compound file back into a directory. Installation You can install cfbpy via pip:
pip install cfbpy
Here’s how you can use cfbpy
to compress and decompress files:
from cfbpy import CompoundFile
cf = CompoundFile()
cf.compress('path/to/directory', 'path/to/output.cfb')
from cfbpy import CompoundFile
cf = CompoundFile()
cf.decompress('path/to/input.cfb', 'path/to/extracted_directory')
- compress(src, dest): Compresses the contents of the
src
directory into a compound file atdest
. - decompress(src, dest): Decompresses the compound file from
src
to the directorydest
.
This project is licensed under the MIT License - see the LICENSE file for details.
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.