# ConvertExistingDataToNativeBitArray(void*, int, AllocatorHandle)

> Returns a bit array with content aliasing a buffer.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Collections.LowLevel.Unsafe](/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe.md)
* **Assembly:** UnityEngine.ManagedKernelModule

```csharp
public static NativeBitArray ConvertExistingDataToNativeBitArray(void* ptr, int sizeInBytes, AllocatorManager.AllocatorHandle allocator)
```

### Parameters

**** (\[void\*]\(https\://learn.microsoft.com/dotnet/api/system.void)): A buffer.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Size of the buffer in bytes. Must be a multiple of 8.**** (\[AllocatorHandle]\(/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle)): The allocator that was used to create the buffer.

### Returns

| Type                                                                                  | Description                                 |
| ------------------------------------------------------------------------------------- | ------------------------------------------- |
| [NativeBitArray](/engine/6000.7/script-reference/unity/collections/nativebitarray.md) | A bit array with content aliasing a buffer. |
