import{a as e,t}from"./chunk-C94x7I9S.mjs";var n=t((t=>{let{promisify:n}=e(`util`),{isUint8Array:r}=e(`util/types`);function i(){try{return e(`../build/Release/zstd.node`)}catch{try{return e(`../build/Debug/zstd.node`)}catch(e){throw e}}}let a=i(),o=n(a.compress),s=n(a.decompress);t.compress=async function(e,t){if(!r(e))throw TypeError(`parameter 'data' must be a Uint8Array.`);if(t!=null&&typeof t!=`number`)throw TypeError(`parameter 'compressionLevel' must be a number.`);try{return await o(e,t??3)}catch(e){throw Error(`zstd: ${e.message}`)}},t.decompress=async function(e){if(!r(e))throw TypeError(`parameter 'data' must be a Uint8Array.`);try{return await s(e)}catch(e){throw Error(`zstd: ${e.message}`)}},t.getDefinedNapiVersion=a.getDefinedNapiVersion}));export default n();export{};
//# sourceMappingURL=lib-BbNAtG4h.mjs.map