ChunkFactory
Namespace: Casasoft.IF.GBlorbLib
The ChunkFactory class is responsible for creating instances of different types of chunks based on the provided data and offset. It reads the chunk name from the data and returns an appropriate chunk object.
public static class ChunkFactory
Inheritance Object → ChunkFactory
Methods
CreateChunk(Byte[], Int32)
Creates an instance of a chunk based on the provided data and offset.
public static IChunk CreateChunk(Byte[] data, int offset)
Parameters
data
Byte[]
The byte array containing the chunk data.
offset
Int32
The offset within the data where the chunk starts.
Returns
IChunk
An instance of a class that implements the IChunk interface.