home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.compression
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!sigma
- From: sigma@degas.ipl.rpi.edu (Kevin Martin)
- Subject: Re: zipsplit with pkzip204c Was: Re: Unix release? (Was etc.
- Message-ID: <9cl333-@rpi.edu>
- Nntp-Posting-Host: degas.ipl.rpi.edu
- References: <1993Jan14.051725.19618@ucsu.Colorado.EDU> <Jan19.211317.17236@halcon.dpi.udec.cl> <1jk4c1INN9fu@gap.caltech.edu>
- Date: Sat, 23 Jan 1993 04:13:06 GMT
- Lines: 22
-
- madler@cco.caltech.edu (Mark Adler) writes:
- >Or perhaps you think that the other zipsplit optimizes the chunks
- >better. I don't know what algorithm the other zipsplit uses, but
- >our's uses a simple "greedy" algorithm that achieves the optimum in
- >nearly all cases with typical distributions of entry sizes. The
- >chunk optimization is an NP-complete problem, so there are lots of
- >approximate approaches to the solution.
-
- This is what's called the Knapsack Problem. It's NP-complete, but since
- your knapsack is usually relatively small compared to the total size of the
- files, an early-out algorithm which avoids combinations which will
- obviously not fit actually has to check very few combinations. Even with
- four hundred files, I've never had to check more than 30000 combinations
- (well, my program does - not myself by hand) to get a perfect fit.
-
- "Perfect" in the sense that no clusters are wasted, which also simplifies
- things.
-
- --
- Kevin Martin
- sigma@ipl.rpi.edu
- "I told you I'd shoot, but you didn't believe me! WHY didn't you BELIEVE me?!"
-