{"record":{"id":"d108c27ab25be89a","repo":"pola-rs/polars","slug":"the-crate-was-compiled-without-ipc-compression-us-d108c2","errorCode":null,"errorMessage":"The crate was compiled without IPC compression. Use `io_ipc_compression` to write compressed IPC.","messagePattern":"The crate was compiled without IPC compression\\. Use `io_ipc_compression` to write compressed IPC\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/polars-arrow/src/io/ipc/compression.rs","lineNumber":67,"sourceCode":"}\n\n#[cfg(feature = \"io_ipc_compression\")]\n#[cfg_attr(docsrs, doc(cfg(feature = \"io_ipc_compression\")))]\npub fn compress_zstd(\n    input_buf: &[u8],\n    output_buf: &mut (impl std::io::Write + ?Sized),\n    level: ZstdLevel,\n) -> PolarsResult<()> {\n    zstd::stream::copy_encode(input_buf, output_buf, level.compression_level())\n        .map_err(|e| e.into())\n}\n\n#[cfg(not(feature = \"io_ipc_compression\"))]\npub fn compress_lz4(\n    _input_buf: &[u8],\n    _output_buf: &mut (impl std::io::Write + ?Sized),\n) -> PolarsResult<()> {\n    panic!(\n        \"The crate was compiled without IPC compression. Use `io_ipc_compression` to write compressed IPC.\"\n    )\n}\n\n#[cfg(not(feature = \"io_ipc_compression\"))]\npub fn compress_zstd(\n    _input_buf: &[u8],\n    _output_buf: &mut (impl std::io::Write + ?Sized),\n    _level: ZstdLevel,\n) -> PolarsResult<()> {\n    panic!(\n        \"The crate was compiled without IPC compression. Use `io_ipc_compression` to write compressed IPC.\"\n    )\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/pola-rs/polars/blob/9b5d73fd00236295624374b075d16b1fe6ec6df9/crates/polars-arrow/src/io/ipc/compression.rs#L49-L85","documentation":"panic in polars-arrow's IPC writer: compress_lz4 (or zstd) was called but the crate was compiled without the io_ipc_compression feature, so the function is a stub that panics. Rebuild polars-arrow with the feature enabled or write uncompressed IPC.","triggerScenarios":"This panic/expect fires when execution reaches an unguarded state described by: \"The crate was compiled without IPC compression. Use `io_ipc_compression` to write compressed IPC.\". Typical triggers: unsupported dtype or feature-gated code path reached at runtime, invalid user input or environment variable value, calling API methods in the wrong order or on mismatched types, or data (lengths, offsets, ranges) violating the function's preconditions.","commonSituations":"Encountered when input data or configuration does not meet the preconditions of the throwing code path (\"The crate was compiled without IPC compression. Use `io_ipc_compression` to write compressed IPC.\"). Common cases: missing Cargo feature flags, mismatched dtypes/lengths between arrays or series, out-of-range temporal values, malformed environment variables, or operations on unsupported/complex nested types.","solutions":["Enable the `io_ipc_compression` cargo feature on polars-arrow (and polars) so LZ4/Zstd IPC compression support is compiled in.","Write the IPC file without compression (Compression::None) if you cannot enable the feature.","Check that the feature is enabled in the top-level crate's feature flags, not only in a transitive dependency."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9b5d73fd00236295624374b075d16b1fe6ec6df9","analyzedAt":"2026-08-19T12:15:06.350Z","contentChangedAt":"2026-08-19T12:15:06.350Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}