# Data

    extension Data

- `gzipCompressed(level:)`

  Compresses the data using gzip compression. Adapted from: https://github.com/1024jp/GzipSwift/blob/main/Sources/Gzip/Data%2BGzip.swift

  Throws

  `GzipError` if compression fails.

  #### Declaration

  Swift

      public func gzipCompressed(level: Int32 = Z_DEFAULT_COMPRESSION) throws -> Data

  #### Parameters

  `level` | Compression level.

  #### Return Value

  The compressed data.

© 2026 Mixpanel. All rights reserved. (Last updated: 2026-04-07)

Generated by jazzy ♪♫ v0.15.4, a Realm project.