Issue #16828: Fix error incorrectly raised by bz2.compress('').

Patch by Martin Packman.