# IMQOptions.useGzip property · @imqueue/core

Source: https://imqueue.org/api/core/latest/core.imqoptions.usegzip/
Published: 2026-08-04
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/core 3.3.2 — generated reference, not hand-written

Enable message compression for serialization. Increases a worker CPU load but decreases network traffic between workers and the queue host. Defaults to `false`.

**Signature:**

```typescript
useGzip?: boolean;
```

## Remarks

Must be set identically on every producer and consumer of a queue: a mismatch makes deserialization fail, which emits an `error` event with the event name `OnMessage` and drops the message — permanently, even under [IMQOptions.safeDelivery](https://imqueue.org/api/core/latest/core.imqoptions.safedelivery/), because the worker key is released immediately afterwards.

Applies to queue messages only. [IMessageQueue.publish()](https://imqueue.org/api/core/latest/core.imessagequeue.publish/) and [IMessageQueue.subscribe()](https://imqueue.org/api/core/latest/core.imessagequeue.subscribe/) payloads are always plain JSON.

