Skip to content

Function: decompressMessageEvent() ​

ts
function decompressMessageEvent(event: MessageEventLike<WebSocketBinaryData>, format?: WebSocketCompressionFormat): Promise<MessageEventLike<string>>;

Decode a binary WebSocket message using DecompressionStream. The runtime must provide this API; compressed messages cannot be decoded without it.

Parameters ​

ParameterTypeDefault value
eventMessageEventLike<WebSocketBinaryData>undefined
format?WebSocketCompressionFormat'gzip'

Returns ​

Promise<MessageEventLike<string>>

Built by Siebly. Open source SDKs for exchange APIs.