/opt/canhelp/node_modules/jose/dist/webapi/lib
NameSizeModeActions
aesgcmkw.js6000644editdlrm
aeskw.js11890644editdlrm
asn1.js87170644editdlrm
base64.js6730644editdlrm
buffer_utils.js13450644editdlrm
check_key_type.js47680644editdlrm
content_encryption.js76360644editdlrm
crypto_key.js45660644editdlrm
deflate.js15250644editdlrm
ecdhes.js20290644editdlrm
helpers.js5960644editdlrm
invalid_key_input.js9740644editdlrm
is_key_like.js4930644editdlrm
jwk_to_key.js40090644editdlrm
jwt_claims_set.js82080644editdlrm
key_management.js80750644editdlrm
key_to_jwk.js9430644editdlrm
normalize_key.js52830644editdlrm
pbes2kw.js16140644editdlrm
rsaes.js9300644editdlrm
signing.js25210644editdlrm
type_checks.js14700644editdlrm
validate_algorithms.js3560644editdlrm
validate_crit.js15830644editdlrm
Edit: /opt/canhelp/node_modules/jose/dist/webapi/lib/deflate.js (1525B)
import { JOSENotSupported, JWEInvalid } from '../util/errors.js'; import { concat } from './buffer_utils.js'; function supported(name) { if (typeof globalThis[name] === 'undefined') { throw new JOSENotSupported(`JWE "zip" (Compression Algorithm) Header Parameter requires the ${name} API.`); } } export async function compress(input) { supported('CompressionStream'); const cs = new CompressionStream('deflate-raw'); const writer = cs.writable.getWriter(); writer.write(input).catch(() => { }); writer.close().catch(() => { }); const chunks = []; const reader = cs.readable.getReader(); for (;;) { const { value, done } = await reader.read(); if (done) break; chunks.push(value); } return concat(...chunks); } export async function decompress(input, maxLength) { supported('DecompressionStream'); const ds = new DecompressionStream('deflate-raw'); const writer = ds.writable.getWriter(); writer.write(input).catch(() => { }); writer.close().catch(() => { }); const chunks = []; let length = 0; const reader = ds.readable.getReader(); for (;;) { const { value, done } = await reader.read(); if (done) break; chunks.push(value); length += value.byteLength; if (maxLength !== Infinity && length > maxLength) { throw new JWEInvalid('Decompressed plaintext exceeded the configured limit'); } } return concat(...chunks); }