-
Notifications
You must be signed in to change notification settings - Fork 1
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
inspiration/ideas for kompress #10
Comments
This looks interesting https://github.com/PyFilesystem/pyfilesystem2 |
Interesting enough, there are some useful functions in the standard library https://docs.python.org/3/library/shutil.html#shutil.unpack_archive However seems that it only supports |
this way you don't have to unpack it first and can work as if it's a 'virtual' directory related: https://github.com/karlicoss/HPI/issues/20
* core: add ZipPath encapsulating compressed zip files this way you don't have to unpack it first and can work as if it's a 'virtual' directory related: https://github.com/karlicoss/HPI/issues/20
potentially will extract some common interface here like ZipPath relevant to https://github.com/karlicoss/HPI/issues/20
potentially will extract some common interface here like ZipPath relevant to https://github.com/karlicoss/HPI/issues/20
Actually |
Btw seems that there's been some interesting progress here, some great work towards making pathlib.Path more extensibe (although some thing are only available since python 3.12) https://discuss.python.org/t/make-pathlib-extensible |
After a few years, seems that nothing like this exists, so started extracting in a library https://github.com/karlicoss/kompress |
transferred the issue since it has some useful links here |
went through the thread linked above to catch up
|
Ideally I want something like pathlib.Path, but also supporting archives. Ideally it would be transparent, so for the data consumer it doesn't matter if the file is compressed or not.
At the moment I'm using a helper. It's a bit crude, but mostly works. Would be nice to replace it with a proper library though, that's worth extra dependency.
Potential candidates:
uses some sort of non-standard interface, but perhaps possible to implement a
Path
adapterwill probably need to use https://github.com/althonos/fs.archive (although it doesn't support xz at the moment)
only supports zip files? (backport of python's
zipfile.Path
)some non-standard interface, but perhaps more interesting is that it uses this, supports quite a few formats: https://github.com/wummel/patool
Some relevant discussions:
Related:
The text was updated successfully, but these errors were encountered: