{"record":{"id":"1584cf93f5156f42","repo":"oven-sh/bun","slug":"invalidcompresseddata","errorCode":"InvalidCompressedData","errorMessage":"InflateFailed","messagePattern":"InflateFailed","errorType":"error_code","errorClass":"DecompressError","httpStatus":null,"severity":"error","filePath":"src/http_jsc/websocket_client/WebSocketDeflate.rs","lineNumber":91,"sourceCode":"}\n\n// Constants from zlib.h\nconst Z_DEFAULT_COMPRESSION: c_int = 6;\nconst Z_DEFAULT_STRATEGY: c_int = 0;\nconst Z_DEFAULT_MEM_LEVEL: c_int = 8;\n\n// Buffer size for compression/decompression operations\nconst COMPRESSION_BUFFER_SIZE: usize = 4096;\n\n// Maximum decompressed message size (128 MB)\nconst MAX_DECOMPRESSED_SIZE: usize = 128 * 1024 * 1024;\n\n// DEFLATE trailer bytes added by Z_SYNC_FLUSH\nconst DEFLATE_TRAILER: [u8; 4] = [0x00, 0x00, 0xff, 0xff];\n\n#[derive(thiserror::Error, strum::IntoStaticStr, Debug)]\npub enum DecompressError {\n    #[error(\"InflateFailed\")]\n    InflateFailed,\n    #[error(\"OutOfMemory\")]\n    OutOfMemory,\n    #[error(\"TooLarge\")]\n    TooLarge,\n}\n\n#[derive(thiserror::Error, strum::IntoStaticStr, Debug)]\npub enum CompressError {\n    #[error(\"DeflateFailed\")]\n    DeflateFailed,\n    #[error(\"OutOfMemory\")]\n    OutOfMemory,\n}\n\nimpl PerMessageDeflate {\n    pub(crate) fn init(params: Params) -> crate::Result<Box<Self>> {\n        // Initialize compressor (deflate)","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/src/http_jsc/websocket_client/WebSocketDeflate.rs#L73-L109","documentation":"Error \"InflateFailed\" thrown in oven-sh/bun.","triggerScenarios":"Thrown at src/http_jsc/websocket_client/WebSocketDeflate.rs:91 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}