mirror of
https://github.com/denoland/deno.git
synced 2025-01-21 04:52:26 -05:00
Merge 09576d7ddc
into 5e9b3712de
This commit is contained in:
commit
194f852573
1 changed files with 12 additions and 1 deletions
|
@ -204,8 +204,19 @@ export function brotliCompressSync(
|
||||||
return Buffer.from(TypedArrayPrototypeSubarray(output, 0, len));
|
return Buffer.from(TypedArrayPrototypeSubarray(output, 0, len));
|
||||||
}
|
}
|
||||||
|
|
||||||
export function brotliDecompress(input) {
|
export function brotliDecompress(
|
||||||
|
input,
|
||||||
|
options,
|
||||||
|
callback,
|
||||||
|
) {
|
||||||
const buf = toU8(input);
|
const buf = toU8(input);
|
||||||
|
|
||||||
|
if (typeof options === "function") {
|
||||||
|
callback = options;
|
||||||
|
options = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
// note: `options` argument is currently not used
|
||||||
return PromisePrototypeCatch(
|
return PromisePrototypeCatch(
|
||||||
PromisePrototypeThen(
|
PromisePrototypeThen(
|
||||||
op_brotli_decompress_async(buf),
|
op_brotli_decompress_async(buf),
|
||||||
|
|
Loading…
Add table
Reference in a new issue