IChunk
Namespace: Casasoft.IF.GBlorbLib
Represents a chunk of data with a name, length, and address.
public interface IChunk
Attributes NullableContextAttribute
Properties
Name
Gets or sets the name of the chunk.
public abstract string Name { get; set; }
Property Value
Length
Gets or sets the length of the chunk.
public abstract int Length { get; set; }
Property Value
Address
Gets or sets the address of the chunk.
public abstract int Address { get; set; }
Property Value
ResourceID
Gets or sets the resource ID of the chunk.
public abstract int ResourceID { get; set; }
Property Value
Methods
Write(Byte[], Int32)
Writes data to the chunk at the specified offset.
void Write(Byte[] data, int offset)
Parameters
data
Byte[]
The data to write.
offset
Int32
The offset at which to start writing.
FillZero(Byte[], Int32)
Fills the specified byte array with zero at the given offset if the chunk length is odd.
void FillZero(Byte[] data, int offset)
Parameters
data
Byte[]
The byte array to fill with zero.
offset
Int32
The offset within the byte array where the zero should be written.
Export(String)
Exports the chunk to a file.
void Export(string filename)
Parameters
filename
String
The name of the file to export to.
IsResource()
Determines whether the chunk is a resource.
bool IsResource()
Returns
Boolean
True if the chunk is a resource; otherwise, false.
ResourceType()
Gets the resource type of the chunk.
string ResourceType()
Returns
String
Type of the resource in the chunk, empty if the chunk is not a resorce
FileExtension()
Gets the file extension associated with the chunk.
string FileExtension()
Returns
String
The file extension as a string.