> For the complete documentation index, see [llms.txt](https://kinematicsoup.gitbook.io/scene-fusion/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kinematicsoup.gitbook.io/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfnullterraincompressor.md).

# Class sfNullTerrainCompressor

Namespace: [KS.SceneFusion.Client.Unity.Editor](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor.md)\
Assembly: KSUnity-Source.dll

Null terrain compressor that (de)serializes data without (de)compressing it.

```csharp
public class sfNullTerrainCompressor : sfITerrainCompressor
```

#### Inheritance

object ← [sfNullTerrainCompressor](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfnullterraincompressor.md)

#### Implements

[sfITerrainCompressor](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfiterraincompressor.md)

## Methods

### DecodeAlphamap(byte\[], int, int, int) <a href="#ks_scenefusion_client_unity_editor_sfnullterraincompressor_decodealphamap_system_byte___system_int32" id="ks_scenefusion_client_unity_editor_sfnullterraincompressor_decodealphamap_system_byte___system_int32"></a>

Decodes alphamap data.

```csharp
public float[,,] DecodeAlphamap(byte[] data, int width, int height, int numLayers)
```

#### Parameters

`data` byte\[]

Data to decode.

`width` int

Width of the region the data is for.

`height` int

Height of the region the data is for.

`numLayers` int

Number of alphamap layers.

#### Returns

float\[,,]

Decoded alphamap data

### DecodeDetailLayer(byte\[], int, int) <a href="#ks_scenefusion_client_unity_editor_sfnullterraincompressor_decodedetaillayer_system_byte___system_in" id="ks_scenefusion_client_unity_editor_sfnullterraincompressor_decodedetaillayer_system_byte___system_in"></a>

Decodes detail layer data.

```csharp
public int[,] DecodeDetailLayer(byte[] data, int width, int height)
```

#### Parameters

`data` byte\[]

Data to decode.

`width` int

Width of the region the data is for.

`height` int

Height of the region the data is for.

#### Returns

int\[,]

Decoded detail layer data

### DecodeHeightmap(byte\[], int, int) <a href="#ks_scenefusion_client_unity_editor_sfnullterraincompressor_decodeheightmap_system_byte___system_int3" id="ks_scenefusion_client_unity_editor_sfnullterraincompressor_decodeheightmap_system_byte___system_int3"></a>

Decodes heightmap data.

```csharp
public float[,] DecodeHeightmap(byte[] data, int width, int height)
```

#### Parameters

`data` byte\[]

Data to decode.

`width` int

Width of the region the data is for.

`height` int

Height of the region the data is for.

#### Returns

float\[,]

Decoded heightmap data

### DecodeTrees(byte\[]) <a href="#ks_scenefusion_client_unity_editor_sfnullterraincompressor_decodetrees_system_byte" id="ks_scenefusion_client_unity_editor_sfnullterraincompressor_decodetrees_system_byte"></a>

Decodes tree data.

```csharp
public byte[] DecodeTrees(byte[] data)
```

#### Parameters

`data` byte\[]

Data to decode.

#### Returns

byte\[]

Decoded tree data

### EncodeAlphamap(float\[,,]) <a href="#ks_scenefusion_client_unity_editor_sfnullterraincompressor_encodealphamap_system_single_0__0__0" id="ks_scenefusion_client_unity_editor_sfnullterraincompressor_encodealphamap_system_single_0__0__0"></a>

Encodes alphamap data.

```csharp
public byte[] EncodeAlphamap(float[,,] alphamapData)
```

#### Parameters

`alphamapData` float\[,,]

#### Returns

byte\[]

Encoded data

### EncodeDetailLayer(int\[,]) <a href="#ks_scenefusion_client_unity_editor_sfnullterraincompressor_encodedetaillayer_system_int32_0__0" id="ks_scenefusion_client_unity_editor_sfnullterraincompressor_encodedetaillayer_system_int32_0__0"></a>

Encodes detail layer data.

```csharp
public byte[] EncodeDetailLayer(int[,] detailLayerData)
```

#### Parameters

`detailLayerData` int\[,]

#### Returns

byte\[]

Encoded data

### EncodeHeightmap(float\[,]) <a href="#ks_scenefusion_client_unity_editor_sfnullterraincompressor_encodeheightmap_system_single_0__0" id="ks_scenefusion_client_unity_editor_sfnullterraincompressor_encodeheightmap_system_single_0__0"></a>

```csharp
public byte[] EncodeHeightmap(float[,] heightmapData)
```

#### Parameters

`heightmapData` float\[,]

#### Returns

byte\[]

### EncodeTrees(byte\[]) <a href="#ks_scenefusion_client_unity_editor_sfnullterraincompressor_encodetrees_system_byte" id="ks_scenefusion_client_unity_editor_sfnullterraincompressor_encodetrees_system_byte"></a>

Encodes tree data.

```csharp
public byte[] EncodeTrees(byte[] data)
```

#### Parameters

`data` byte\[]

Data to encode.

#### Returns

byte\[]

Encoded tree data
