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

Write support for deflate64 #28

Open
brianhelba opened this issue Jan 5, 2022 · 6 comments
Open

Write support for deflate64 #28

brianhelba opened this issue Jan 5, 2022 · 6 comments

Comments

@brianhelba
Copy link
Owner

brianhelba commented Jan 5, 2022

Is this library (zipfile-deflate64) capable of writing deflate64 (not just reading)? If not, are there any plans to add write support? The 7z command will work for me for testing, but if I want to generate files on the fly I doubt that would work cross-platform.

Originally posted by @adamjstewart in #19 (comment)

@brianhelba
Copy link
Owner Author

At present, zipfile-deflate64 only supports reading, as that's what my own use case required. However, support for writing DEFLATE64-encoded ZIP files seems reasonable to be within scope of this library.

The problem is implementing (and maintaining) the particulars of DEFLATE64 compression, as this is not provided by zlib/contrib/infback9. Ideally, we could find another compatible library which already implemented such low-level support, and use zipfile-deflate64 to patch together a Python zipfile-compatible interface for invoking it.

@cielavenir
Copy link
Contributor

I tried to check https://github.com/jinfeihan57/p7zip/blob/master/CPP/7zip/Compress , but it seems not simple to adapt the deflate64mode conditional to zlib...

@cielavenir
Copy link
Contributor

miurahr commented in miurahr/py7zr#419

I don't want to support write of deflate64 because it is still proprietary algorithm and inefficient. There is no reason to create new archive with deflate64 instead of zstandard or lzma2.

(Now that codecs7z provides deflate64 write) if his comment is true, it is useless to focus on merging deflate.c and infback9.c. Please write your opinion(s).

@miurahr
Copy link

miurahr commented Aug 2, 2022

There is a compression library for python that provide enhanced deflate, aka. deflate64(tm), https://pypi.org/project/inflate64/
@brianhelba v0.3.0 and later supports write.

@cielavenir
Copy link
Contributor

zipfile 0.0.6.0 supports inflate64 module (note: it is used only when zipfile-deflate64 is not available)

@miurahr
Copy link

miurahr commented Aug 4, 2022

inflate64 implements enhanced deflate procedure by modifying zlib main deflate/inflate codes. These are independent from both infozip/infback9 and p7zip functions. You are welcome to join improving it.

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

3 participants