let lib;
try {
    lib = await import('./napi.js');
}
catch (ex) {
    // only emit warning if running in node, checking for process is not enough since some polyfills define it
    if (typeof process == 'object' &&
        typeof process.emitWarning == 'function' &&
        typeof process.versions?.node == 'string') {
        process.emitWarning(`Failed to load napi bindings, falling back to wasm bindings: ${ex.message}`, undefined, 'ZSTD');
    }
    const wasm = await import('./wasm/index.js');
    lib = {
        ...wasm,
        Compressor: undefined,
        Decompressor: undefined,
        WebCompressor: wasm.WebCompressor,
        WebDecompressor: wasm.WebDecompressor,
    };
}
/** ZStandard compress */
export const { compressSync } = lib;
/** ZStandard decompress */
export const { decompressSync } = lib;
/** ZStandard compress */
export const { compress } = lib;
/** ZStandard decompress */
export const { decompress } = lib;
/** Web stream ZStandard compressor */
export const { compressor } = lib;
/** Web stream ZStandard decompressor */
export const { decompressor } = lib;
/** Web stream ZStandard compress transformer */
export const { WebCompressor } = lib;
/** Web stream ZStandard decompress transformer */
export const { WebDecompressor } = lib;
/** NodeJs Transform stream compressor */
export const { Compressor } = lib;
/** NodeJs Transform stream decompressor */
export const { Decompressor } = lib;
/** The type of the current module. */
export const TYPE = lib.TYPE;
/** The version of the zstd library. */
export const { ZSTD_VERSION } = lib;
export default null;
//# sourceMappingURL=index.js.map