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 = {
        Compressor: undefined,
        Decompressor: undefined,
        ...wasm,
    };
}
/** ZStandard compress */
export const { compressSync } = lib;
/** ZStandard decompress */
export const { decompressSync } = lib;
/** ZStandard compress */
export const { compress } = lib;
/** ZStandard decompress */
export const { decompress } = 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