{"record":{"id":"c3ec964b34e8c0e0","repo":"cloudflare/quiche","slug":"unsupported-c3ec96","errorCode":"Unsupported","errorMessage":"qlog file {name:?} requires the `gzip` feature on the qlog crate to decode","messagePattern":"qlog file (.+?) requires the `gzip` feature on the qlog crate to decode","errorType":"error_code","errorClass":"io::Error","httpStatus":null,"severity":"error","filePath":"qlog/src/reader.rs","lineNumber":119,"sourceCode":"        let name = path.file_name().and_then(|s| s.to_str()).unwrap_or(\"\");\n\n        // Order matters: `.sqlog.gz` and `.sqlog.zst` must be tested\n        // before `.sqlog` (every compressed suffix also ends with\n        // `.sqlog` if you only look at the last extension).\n        //\n        // Each compound suffix is matched exactly once. The\n        // `#[cfg(feature = \"...\")]` lives inside the `if` body so the\n        // disabled-feature path can return a helpful error rather\n        // than falling through to the unknown-extension branch.\n        if name.ends_with(SQLOG_GZ_EXT) {\n            #[cfg(feature = \"gzip\")]\n            {\n                let reader: Box<dyn std::io::BufRead + Send + Sync> =\n                    Box::new(BufReader::new(flate2::read::GzDecoder::new(file)));\n                return Self::new(reader);\n            }\n            #[cfg(not(feature = \"gzip\"))]\n            return Err(std::io::Error::new(\n                std::io::ErrorKind::Unsupported,\n                format!(\n                    \"qlog file {name:?} requires the `gzip` feature on \\\n                     the qlog crate to decode\"\n                ),\n            )\n            .into());\n        }\n        if name.ends_with(SQLOG_ZST_EXT) {\n            #[cfg(feature = \"zstd\")]\n            {\n                let decoder = zstd::Decoder::new(file)?;\n                let reader: Box<dyn std::io::BufRead + Send + Sync> =\n                    Box::new(BufReader::new(decoder));\n                return Self::new(reader);\n            }\n            #[cfg(not(feature = \"zstd\"))]\n            return Err(std::io::Error::new(","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/cloudflare/quiche/blob/9f96daa2c22a4468b0036fb0a0a3894eee6498b8/qlog/src/reader.rs#L101-L137","documentation":"qlog's with_file can decode gzip-compressed .sqlog.gz files only when the qlog crate was built with the `gzip` feature (which pulls in flate2). Without it, opening such a file returns io::ErrorKind::Unsupported telling you the feature is required.","triggerScenarios":"Calling qlog::reader with a file whose name ends with .sqlog.gz while the qlog dependency was compiled without features = [\"gzip\"].","commonSituations":"Using default qlog features in Cargo.toml and then feeding .gz qlog files (common, since Chrome/tools often gzip qlogs); feature unification turning the feature off in the workspace.","solutions":["Enable the feature in Cargo.toml: qlog = { version = \"...\", features = [\"gzip\"] }","Pre-decompress the file with gunzip and open the resulting .sqlog","Use a different reader that supports gzip independently"],"exampleFix":"// before (Cargo.toml)\nqlog = \"0.x\"\n// after (Cargo.toml)\nqlog = { version = \"0.x\", features = [\"gzip\"] }","handlingStrategy":"fallback","validationCode":"let gz_enabled = cfg!(feature = \"gzip\"); // in a crate that depends on qlog, check via the path suffix\nif name.ends_with(\".sqlog.gz\") && !cfg!(feature = \"qlog/gzip\") { /* decompress externally */ }","typeGuard":null,"tryCatchPattern":"match QlogReader::with_file(&path) {\n    Err(e) if e.kind() == io::ErrorKind::Unsupported => {\n        // decompress with external gunzip and retry\n    }\n    other => other?,\n}","preventionTips":["Enable qlog features [\"gzip\",\"zstd\"] in Cargo.toml so all extensions decode","Detect the .gz extension before calling with_file and decompress if the feature is off","Keep feature flags consistent across workspace members"],"tags":["qlog","gzip","feature-flag","decompression"],"backgroundTag":"feature-not-enabled","analyzedSha":"9f96daa2c22a4468b0036fb0a0a3894eee6498b8","analyzedAt":"2026-09-08T11:27:09.536Z","contentChangedAt":"2026-09-08T11:27:09.536Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}