<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppleArchive",
  "identifier" : "/documentation/AppleArchive/ArchiveEncryptionContext/init(profile:compressionAlgorithm:compressionBlockSize:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Apple Archive"
    ],
    "preciseIdentifier" : "s:12AppleArchive0B17EncryptionContextC7profile20compressionAlgorithm0F9BlockSizeA2C7ProfileV_AA0B11CompressionVSitcfc"
  },
  "title" : "init(profile:compressionAlgorithm:compressionBlockSize:)"
}
-->

# init(profile:compressionAlgorithm:compressionBlockSize:)

Returns a new encryption context from the specified profile, compression algorithm, and block size.

```
init(profile: ArchiveEncryptionContext.Profile, compressionAlgorithm: ArchiveCompression, compressionBlockSize: Int = 1<<20)
```

## Parameters

`profile`

The profile to use to create the encryption context.

`compressionAlgorithm`

The compression algorithm.

`compressionBlockSize`

The size of the independently compressed blocks.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)