jdx/mise · error
format not supported
Error message
{format} format not supported What it means
decompress_file supports single-file decompression only for gz, xz, zst, and bz2. Passing Br (brotli), Lz4, or Sz (snappy) as the format bails with "{format} format not supported" — these formats are recognized in the enum but no decompressor is wired in for single-file use.
Solutions
- Choose a differently compressed asset (e.g. .gz, .xz, .zst, .bz2) for the tool version
- Decompress the file yourself with a dedicated tool (brotli -d, lz4 -d, snunzip) into dest before/instead of calling decompress_file
- If this is inside a backend, change the asset URL or format mapping to a supported compression
- Add an actual decompressor integration upstream if brotli/lz4/snappy single-file support is genuinely needed
Example fix
// before
format = ExtractionFormat::from_ext("lz4")?; // decompress_file -> error
// after
format = ExtractionFormat::from_ext("gz")?; // or decompress externally first Defensive patterns
Strategy: fallback
Validate before calling
if matches!(fmt, ExtractionFormat::Br | ExtractionFormat::Lz4 | ExtractionFormat::Sz) {
// decompress externally or pick a supported asset
} Try / catch
match decompress_file(&input, &dest, fmt) {
Err(e) if e.to_string().contains("format not supported") => {
// fallback: shell out to `brotli -d` / `lz4 -d` or download a gz/xz/zst/bz2 asset
}
other => other?,
} Prevention
- Only call decompress_file for gz/xz/zst/bz2 assets
- Check ExtractionFormat::is_compressed_file() plus explicit Br/Lz4/Sz exclusion first
- Prefer release assets in supported compressions when configuring backends
- Keep a external-decompressor fallback for brotli/lz4/snappy
When it happens
Trigger: Calling decompress_file(input, dest, ExtractionFormat::Br | Lz4 | Sz), typically after ExtractionFormat::from_file_name classified a downloaded .br/.lz4/.sz single-file asset.
Common situations: Downloading a brotli- or lz4-compressed binary from a tool release and letting mise decompress it; backend config pointing at a .lz4 asset where only tar.lz4-style support was assumed.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- unsupported compressed file format
- brew-cask: : unsupported archive type for
- brew-cask: : unsupported archive type for
- content-level SLSA verification only supports archive…
- extract_archive does not support compressed single-file…
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/a90866c084e27d3c.
Report an issue: GitHub.
Appendix: source
Thrown at src/file.rs:1974
}
_ => f(),
}
}
pub(crate) fn decompress_file(input: &Path, dest: &Path, format: ExtractionFormat) -> Result<()> {
if let Some(parent) = dest.parent()
&& !parent.as_os_str().is_empty()
{
create_dir_all(parent)?;
}
run_blocking(|| match format {
ExtractionFormat::Gz => un_gz(input, dest),
ExtractionFormat::Xz => un_xz(input, dest),
ExtractionFormat::Zst => un_zst(input, dest),
ExtractionFormat::Bz2 => un_bz2(input, dest),
ExtractionFormat::Br | ExtractionFormat::Lz4 | ExtractionFormat::Sz => {
bail!("{format} format not supported")
}
_ => bail!("unsupported compressed file format: {}", format),
})
}
#[derive(Debug, Clone, Copy, PartialEq, strum::EnumString, strum::Display)]
pub(crate) enum ExtractionFormat {
#[strum(to_string = "tar.gz", serialize = "tgz")]
TarGz,
#[strum(serialize = "gz")]
Gz,
#[strum(to_string = "tar.xz", serialize = "txz")]
TarXz,
#[strum(serialize = "xz")]
Xz,
#[strum(to_string = "tar.bz2", serialize = "tbz2", serialize = "tbz")]
TarBz2,
#[strum(serialize = "bz2")]View on GitHub (pinned to 533346cc37)