Apple Bug Friday! 61

2007-06-01 17:03:09 -08:00

This bug is Mac OS X should include pbzip2. It was filed on 2007-05-25 at 01:01 PDT.


Summary:

Mac OS X should include the parallelized bzip2 front-end pbzip2, as well as the standard bzip2 front-end.

Steps to Reproduce:

  1. Create a Terminal window or xterm process.
  2. Type “pbzip2”.

Expected Results:

Parallel BZIP2 v1.0.1 - by: Jeff Gilchrist [http://compression.ca]
[Mar. 20, 2007]             (uses libbzip2 by Julian Seward)

Actual Results:

zsh: command not found: pbzip2

or

bash: pbzip2: No such file or directory

or

tcsh: pbzip2: Command not found.

Regression:

None. No Apple-manufactured operating system has ever included pbzip2, in no small part because pbzip2 is newer than Tiger, and Tiger is the most recent OS.

Notes:

pbzip2 is a threaded version of bzip2. The output is different (as a consequence of different order of execution), but still compatible with the official bunzip2. File sizes do not change significantly.

Here are my unscientific results on my four-core Mac Pro:

time bzip2 < ~/Documents/bigger-headers.txt > bigger-headers.txt.bz2
bzip2 < ~/Documents/bigger-headers.txt > bigger-headers.txt.bz2  23.76s user 0.32s system 98% cpu 24.551 total
time ./pbzip2 -c ~/Documents/bigger-headers.txt > bigger-headers.txt.bz2
./pbzip2 -c ~/Documents/bigger-headers.txt > bigger-headers.txt.bz2  29.04s user 1.75s system 377% cpu 8.157 total

pbzip2 reduced the time taken from 24½ seconds down to 8, for an input file of 100 MiB worth of concatenated header files that I keep around for just this sort of testing. That’s a time savings of more than two-thirds.

It’s not a drop-in replacement for bzip2 just yet (for one thing, it doesn’t support stdin—that’s on the to-do list), but it’d still be handy to have on multi-core Macs.

2 Responses to “Apple Bug Friday! 61”

  1. Simone Manganelli Says:

    Do you happen to know which zip compression method Mac OS X uses when you select “Create Archive” in the Finder?

  2. Peter Hosey Says:

    Nope.

Leave a Reply

Do not delete the second sentence.


Warning: Undefined array key "ntt_saved_comment_text" in /home/public/blog/wp-content/plugins/negative-turing-test/negative-turing-test.php on line 143