Skip to content
New issue

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

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

Already on GitHub? # to your account

Deno has panicked. brotliCompressSync #24572

Closed
MrCarbone opened this issue Jul 13, 2024 · 1 comment · Fixed by #24850
Closed

Deno has panicked. brotliCompressSync #24572

MrCarbone opened this issue Jul 13, 2024 · 1 comment · Fixed by #24850
Assignees
Labels
bug Something isn't working correctly

Comments

@MrCarbone
Copy link

MrCarbone commented Jul 13, 2024

Version: Deno 1.45.2
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.

Platform: windows x86_64
Version: 1.45.2
Args: ["C:\\Deno\\deno.exe", "run", "-A", "--watch", "api.ts"]

thread 'main' panicked at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\brotli-6.0.0\src\enc\encode.rs:1443:9:
Unimplemented: need to set 9.5 here
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

File: code

import { brotliCompressSync, constants } from "node:zlib";
const e = brotliCompressSync("abc", {
    params:{
        [constants.BROTLI_PARAM_QUALITY]: 10
    }
});
console.log(e);

( There is a problem with the value of 10 )

@MrCarbone MrCarbone changed the title Deno has panicked. Deno has panicked. brotliCompressSync Jul 13, 2024
@marvinhagemeister marvinhagemeister added the bug Something isn't working correctly label Jul 15, 2024
@marvinhagemeister
Copy link
Contributor

The panic is caused by this line in the brotli crate: https://github.com/dropbox/rust-brotli/blob/37d403b437c3cbd1c686871a4167290aab401704/src/enc/encode.rs#L1469

if quality == 10 {
  unimplemented!("need to set 9.5 here");
}

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working correctly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants