C# 클래스 TagTool.Cache.ResourceCache

A .dat file containing resource data (e.g. resources.dat).
파일 보기 프로젝트 열기: TheGuardians/TagTool 1 사용 예제들

공개 메소드들

메소드 설명
Add ( Stream inStream, byte data, uint &compressedSize ) : int

Adds a resource to the cache.

AddRaw ( Stream inStream, byte rawData ) : int

Adds a raw, pre-compressed resource to the cache.

Compress ( Stream inStream, int resourceIndex, byte data ) : uint

Compresses and saves data for a resource.

Decompress ( Stream inStream, int resourceIndex, uint compressedSize, Stream outStream ) : void

Decompresses a resource.

ExtractRaw ( Stream inStream, int resourceIndex, uint compressedSize ) : byte[]

Extracts raw, compressed resource data.

ImportRaw ( Stream inStream, int resourceIndex, byte data ) : void

Overwrites a resource with raw, pre-compressed data.

ResourceCache ( Stream stream ) : System

Loads a resource cache from a stream.

UpdateResourceTable ( BinaryWriter writer ) : void

비공개 메소드들

메소드 설명
Load ( Stream stream ) : void
NewResource ( ) : int
ResizeResource ( BinaryWriter writer, int resourceIndex, uint minSize ) : uint

메소드 상세

Add() 공개 메소드

Adds a resource to the cache.
public Add ( Stream inStream, byte data, uint &compressedSize ) : int
inStream Stream The stream open on the resource cache.
data byte The data to compress.
compressedSize uint On return, the size of the compressed data.
리턴 int

AddRaw() 공개 메소드

Adds a raw, pre-compressed resource to the cache.
public AddRaw ( Stream inStream, byte rawData ) : int
inStream Stream The stream open on the resource cache.
rawData byte The raw data to add.
리턴 int

Compress() 공개 메소드

Compresses and saves data for a resource.
public Compress ( Stream inStream, int resourceIndex, byte data ) : uint
inStream Stream The stream open on the resource data. It must have read/write access.
resourceIndex int The index of the resource to edit.
data byte The data to compress.
리턴 uint

Decompress() 공개 메소드

Decompresses a resource.
public Decompress ( Stream inStream, int resourceIndex, uint compressedSize, Stream outStream ) : void
inStream Stream The stream open on the resource cache.
resourceIndex int The index of the resource to decompress.
compressedSize uint Total size of the compressed data, including chunk headers.
outStream Stream The stream to write the decompressed resource data to.
리턴 void

ExtractRaw() 공개 메소드

Extracts raw, compressed resource data.
public ExtractRaw ( Stream inStream, int resourceIndex, uint compressedSize ) : byte[]
inStream Stream The stream open on the resource cache.
resourceIndex int The index of the resource to decompress.
compressedSize uint Total size of the compressed data, including chunk headers.
리턴 byte[]

ImportRaw() 공개 메소드

Overwrites a resource with raw, pre-compressed data.
public ImportRaw ( Stream inStream, int resourceIndex, byte data ) : void
inStream Stream The stream open on the resource cache.
resourceIndex int The index of the resource to overwrite.
data byte The raw, pre-compressed data to overwrite it with.
리턴 void

ResourceCache() 공개 메소드

Loads a resource cache from a stream.
public ResourceCache ( Stream stream ) : System
stream Stream The stream to read from.
리턴 System

UpdateResourceTable() 공개 메소드

public UpdateResourceTable ( BinaryWriter writer ) : void
writer System.IO.BinaryWriter
리턴 void