Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node:zlib Brotli decompression hangs #27729

Closed
printfn opened this issue Jan 19, 2025 · 0 comments · Fixed by #27815
Closed

node:zlib Brotli decompression hangs #27729

printfn opened this issue Jan 19, 2025 · 0 comments · Fixed by #27815

Comments

@printfn
Copy link

printfn commented Jan 19, 2025

Version: Deno 2.1.6

import { promisify } from 'node:util';
import { brotliCompress, brotliDecompress } from 'node:zlib';

async function main() {
    const d = '{}';
    const compressedData = await promisify(brotliCompress)(d);
    const data = await promisify(brotliDecompress)(compressedData);
    return JSON.parse(data.toString('utf-8'));
}

await main();

This errors with:

error: Top-level await promise never resolved
await main();
^
    at <anonymous> (file:///main.ts:11:1)

Running the code in the repl shows that it hangs in brotliDecompress.

@bartlomieju bartlomieju changed the title Brotli decompression hangs node:zlib Brotli decompression hangs Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants