7z SDK: It sucks.


While working on another project today, I found myself in the need of a standard archive C++ class carrying a format with a decent compression ratio. I decided on starting with 7-Zip: I use the software itself, it’s very well-written, so I assumed the SDK must be very-well organized. I was terribly wrong.

Taking a look into the SDK, the spacing used can be described as “awkward” at best, using repetitive if/else conditional statements instead of a simple switch/case, pointless definition of functions such as “PrintError” (The equivalent of using printf), etc.

In the end, I ended up choosing gzip, which was designed to be used with file IO, something I wasn’t using; Gzip Helper worked perfectly for working directly with buffer streams. CodeGuru to the rescue!

(And for those wondering, the gzip format beats out LZMA in [de]compression speed, and comes darn close in compression ratio[1])


No Responses Yet to “7z SDK: It sucks.”

  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: