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

Compression file size #11

Open
RichardKimJH opened this issue May 23, 2019 · 3 comments
Open

Compression file size #11

RichardKimJH opened this issue May 23, 2019 · 3 comments

Comments

@RichardKimJH
Copy link

Thank you for the good code.

I tested it with the attached sample program.

The compressed file is slightly larger than the Windows default compression.

Is there a reason?

@wqweto
Copy link
Owner

wqweto commented May 23, 2019

The ASM thunk compressor uses only static Huffman trees. You can read this and this comment in original PuTTY sshzlib.c source.

I might add dynamic tree in the future "borrowing" implementation from libdeflate but currently the incentive is not very great unless someone provides a Pull Request with this implemented.

I'll post an issue now tracking progress on dynamic Huffman trees.

@tannerhelland
Copy link
Contributor

tannerhelland commented May 23, 2019

Alternatively, what about a compile-time option to just use libdeflate instead of the thunk for deflate/inflate tasks? Just make the caller supply a path to libdeflate.dll, and use a tiny DispCallFunc wrapper for the relevant declares.

Obviously this defeats the "one file" nature of cZipArchive, but libdeflate is a tiny dependency (52 kb as of v1.2) and the benefits to deflate speed, deflate ratio, and inflate speed would be enormous. cZipArchive would then produce zip files with smaller size (and better perf) than e.g. Shell32 zip wrappers.

(This suggestion is nakedly selfish as I already use libdeflate across a variety of projects, but cZipArchive is still my preferred choice for zip file management in VB6. Combining the two would be perfection IMO!)

@wqweto
Copy link
Owner

wqweto commented May 23, 2019

I'll post an issue tracking progress on the conditional compilation for libdeflate [de]compressor dependency then :-))

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