<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFDataIncreaseLength(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@F@CFDataIncreaseLength"
  },
  "title" : "CFDataIncreaseLength(_:_:)"
}
-->

# CFDataIncreaseLength(_:_:)

Increases the length of a CFMutableData object’s internal byte buffer, zero-filling the extension to the buffer.

```
func CFDataIncreaseLength(_ theData: CFMutableData!, _ extraLength: CFIndex)
```

## Parameters

`theData`

A CFMutableData object. If you pass an immutable CFData object, the behavior is not defined.

`extraLength`

The number of bytes by which to increase the byte buffer.

## Discussion

This function increases the length of a CFMutableData object’s underlying byte buffer to a new size, initializing the new bytes to `0`.

---

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)