Skip to content

Function: decompressPayloadSync() ​

ts
function decompressPayloadSync(buf: Buffer): Buffer;

Decompresses gzip-prefixed bytes synchronously, preserving plain bytes unchanged.

Parameters ​

ParameterTypeDescription
bufBufferSerialized bytes, with or without the gz: marker.

Returns ​

Buffer

Decompressed bytes or the original plain-byte buffer.