From the Ant distribution of the BZIP2 code, with a more efficient input stream bulk read().