#[cfg(feature = "bzip-impl-libbzip2")]
pub mod _internal_ffi {
    use bzip2::read::BzDecoder;

    pub type BzipImpl<T> = BzDecoder<T>;
}
#[cfg(feature = "bzip-impl-bzip2-rs")]
pub mod _internal_pure {
    use bzip2_rs::DecoderReader;

    pub type BzipImpl<T> = DecoderReader<T>;
}

#[cfg(all(feature = "bzip-impl-bzip2-rs", feature = "bzip-impl-libbzip2"))]
compile_error!("Only one bzip2 implementation can be used. Please select bzip-impl-bzip2-rs or bzip-impl-libbzip2, but not both.");

#[cfg(not(any(feature = "bzip-impl-bzip2-rs", feature = "bzip-impl-libbzip2")))]
compile_error!("A bzip2 implementation is required. Please select either bzip-impl-bzip2-rs or bzip-impl-libbzip2.");

#[cfg(all(target_arch = "wasm32", feature = "bzip-impl-libbzip2"))]
compile_error!("bzip-impl-libbzip2 is not compatible with WebAssembly targets. Please use bzip-impl-bzip2-rs instead.");

#[cfg(feature = "bzip-impl-libbzip2")]
pub type BzipDecoder<T> = _internal_ffi::BzipImpl<T>;
#[cfg(feature = "bzip-impl-bzip2-rs")]
pub type BzipDecoder<T> = _internal_pure::BzipImpl<T>;