/*
 * Flushes all of the data in this stream to the underlying IO.
 *
 * If this writer was constructed with no underlying io object, the compressed
 * data is returned as a string.
 *
 * @return [String, nil]
 * @raise [IOError] if the stream has been closed
 */
static VALUE bz_writer_flush(VALUE obj) {