{"record":{"id":"da59a53bef49d6bf","repo":"grafana/k6","slug":"unsupported-compression-algorithm-s-supported","errorCode":null,"errorMessage":"unsupported compression algorithm '%s', supported algorithm is 'deflate'","messagePattern":"unsupported compression algorithm '(.+?)', supported algorithm is 'deflate'","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/js/modules/k6/websockets/params.go","lineNumber":77,"sourceCode":"\t\t\t\treturn nil, fmt.Errorf(\"invalid WebSocket tags option: %w\", err)\n\t\t\t}\n\t\tcase \"jar\":\n\t\t\tjarV := params.Get(k)\n\t\t\tif common.IsNullish(jarV) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif v, ok := jarV.Export().(*httpModule.CookieJar); ok {\n\t\t\t\tparsed.cookieJar = v.Jar\n\t\t\t}\n\t\tcase \"compression\":\n\t\t\t// deflate compression algorithm is supported - as defined in RFC7692\n\t\t\t// compression here relies on the implementation in gorilla/websocket package, usage is\n\t\t\t// experimental and may result in decreased performance. package supports\n\t\t\t// only \"no context takeover\" scenario\n\n\t\t\talgoString := strings.TrimSpace(params.Get(k).ToString().String())\n\t\t\tif algoString != \"deflate\" {\n\t\t\t\treturn nil, fmt.Errorf(\"unsupported compression algorithm '%s', supported algorithm is 'deflate'\", algoString)\n\t\t\t}\n\n\t\t\tparsed.enableCompression = true\n\t\tdefault:\n\t\t\treturn nil, fmt.Errorf(\"unknown WebSocket's option %s\", k)\n\t\t}\n\t}\n\n\treturn parsed, nil\n}\n","sourceCodeStart":59,"sourceCodeEnd":88,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/js/modules/k6/websockets/params.go#L59-L88","documentation":"Returned by buildParams when the `compression` entry of the WebSocket options, after trimming whitespace, is not exactly 'deflate'. The experimental permessage-deflate support (RFC 7692, no-context-takeover only, via gorilla/websocket) recognizes that single algorithm name; any other string is rejected before the connection is dialed.","triggerScenarios":"Thrown at internal/js/modules/k6/websockets/params.go:77 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use { compression: 'deflate' } to enable compression","Omit the compression option to disable it","Match the casing exactly — 'Deflate' or 'DEFLATE' are not accepted"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ffac6f245854c1b8adc6a69857c76a15f90022","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}