# Create(byte*, int)

> Initializes a new instance of the DataStreamWriter struct with externally owned memory

## Definition

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

```csharp
public static DataStreamWriter Create(byte* data, int length)
```

### Parameters

**** (\[byte\*]\(https\://learn.microsoft.com/dotnet/api/system.byte)): Pointer to the data**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Length of the data

### Returns

| Type                                                                                      | Description                                                                                                     |
| ----------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| [DataStreamWriter](/engine/6000.7/script-reference/unity/collections/datastreamwriter.md) | A new instance of the [DataStreamWriter](/engine/6000.7/script-reference/unity/collections/datastreamwriter.md) |
