Skip to content

Latest commit

 

History

History
51 lines (33 loc) · 1.25 KB

README.md

File metadata and controls

51 lines (33 loc) · 1.25 KB

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:

pip install cfbpy

Usage

Here’s how you can use cfbpy to compress and decompress files:

Compress a Directory

from cfbpy import CompoundFile

cf = CompoundFile()
cf.compress('path/to/directory', 'path/to/output.cfb')

Decompress a Compound File

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.