InfoZip (unzip-part) ported to RDOS class

This forums is for OS project announcements including project openings, new releases, update notices, test requests, and job openings (both paying and volunteer).
Post Reply
rdos
Member
Member
Posts: 3286
Joined: Wed Oct 01, 2008 1:55 pm

InfoZip (unzip-part) ported to RDOS class

Post by rdos »

I recently ported InfoZips unzip utility to RDOS. This was by far one of the worse ports I've ever done. The code-base was made to be portable to a long line of OSes, and at least half of the code seemed OS-dependent in some way. Not only that, the code was hard to read because of strange macros (and ifdefs) all over. It took me 2-3 weeks to turn this mess into a usable C++ class for RDOS. Naturally, I won't send patches to the original code as this is improductive given the low quality of the code. It will be a fork.

The original code used the typical PK_ERROR_* interface, with every function returning an error code or success (0). However, it turned out that with the loggings that was part of the code, it was possible to redo the code to use only success/failure with no drawbacks I can see. IOW, the error-codes was more or less obsolete when the reasons in clear-text could be logged to user / log-file (or whatever), or just ignored.

The current code-base also has support for parallel (multithreaded) extraction of files, and naturally is fully reentrant. It can also verify file checksums to see if an extract is necesary or not.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Re: InfoZip (unzip-part) ported to RDOS class

Post by JamesM »

Certainly sounds more like a rewrite than a port!
Post Reply