Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support compressed data #1

Open
cdeil opened this issue Jul 21, 2021 · 1 comment
Open

Support compressed data #1

cdeil opened this issue Jul 21, 2021 · 1 comment

Comments

@cdeil
Copy link
Member

cdeil commented Jul 21, 2021

Whisper files often have many zeros if not the whole archives are filled, so any compression algo can give large savings.

We should support at least reading gzip and bzip2 files using the built-ins in Python:
https://docs.python.org/3/library/archiving.html

Probably the implementation should read and decompress using BytesIO and then any processing should run on that, and at the end of the read function that bytes buffer is garbage collected.

@cdeil
Copy link
Member Author

cdeil commented Apr 24, 2022

Support for gzip added in d616adf

If we add others (e.g. bzip2) we should be compatible with the pandas API for compressed files:
https://github.com/pandas-dev/pandas/blob/4bfe3d07b4858144c219b9346329027024102ab6/pandas/_typing.py#L246-L248

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant