1

Closed

Add BZip2 compression capability to the library

description

WinZip, and maybe some other zip utilities, can create zipfiles with entries that are compressed with BZip2, rather than Deflate.
 
Add BZIP2 capability to DotNetZip, along with appropriate tests.
 
Also add a bzip2.exe utility to the utilities package, and while you're at it, add a gzip.exe utility, too. And extend the WinZip GUI tool to be able to optionally produce zip files that use BZIP2 compression.
 
And add a test project for the BZIP library. Test against itself, and also against unxutils bzip2.exe
Closed Jul 30, 2011 at 7:38 PM by Cheeso
implemented in changeset 81328. This feature will first be available in v1.9.1.6

comments

redrum42 wrote Jul 25, 2011 at 1:12 AM

It would also be nice if people had the ability to exclude this ability at compile time. For example:

if BZIP2

// bzip2 specific code here

endif

In other words, for people using your library but who don't want to include the BZip2 code. Does this make sense?

Cheeso wrote Jul 25, 2011 at 2:21 PM

Yes, the suggestion for a conditional-compile makes sense. I'll see if I can add that. I'll have to think about it. It's simple to exclude code at compile time with the constant. But the BZIP2 stuff is provided in a distinct DLL, which currently is ilmerged into Ionic.Zip.dll. I'll have to see about re-organizing the project to support the conditional build and inclusion of BZIP2. I'm sure it could be done with some msbuild magic, but I don't know that magic, or how Visual Studio will tolerate it.

An alternate way to do it would be to not use IlMerge, and instead use linked source modules in the Zip Partial Dll project.

I'll look into it.