C# 클래스 FyreVM.Quetzal

Implements the Quetzal saved-game file specification by holding a list of typed data chunks which can be read from or written to streams.
http://www.ifarchive.org/if-archive/infocom/interpreters/specification/savefile_14.txt
파일 보기 프로젝트 열기: ChicagoDave/Zifmia 1 사용 예제들

공개 메소드들

메소드 설명
CompressMemory ( byte original, int origStart, int origLength, byte changed, int changedStart, int changedLength ) : byte[]

Compresses a block of memory by comparing it with the original version from the game file.

Contains ( string type ) : bool

Checks whether the Quetzal file contains a given chunk type.

DecompressMemory ( byte original, byte delta ) : byte[]

Reconstitutes a changed block of memory by applying a compressed set of differences to the original block from the game file.

FromStream ( Stream stream ) : Quetzal

Loads a collection of chunks from a Quetzal file.

Duplicate chunks are not supported by this class. Only the last chunk of a given type will be available.

Quetzal ( ) : System

Initializes a new chunk collection.

WriteToStream ( Stream stream ) : void

Writes the chunks to a Quetzal file.

this ( string type ) : byte[]

Gets or sets typed data chunks.

비공개 메소드들

메소드 설명
StrToID ( string type ) : uint

메소드 상세

CompressMemory() 공개 정적인 메소드

Compresses a block of memory by comparing it with the original version from the game file.
public static CompressMemory ( byte original, int origStart, int origLength, byte changed, int changedStart, int changedLength ) : byte[]
original byte An array containing the original block of memory.
origStart int The offset within the array where the original block /// starts.
origLength int The length of the original block, in bytes.
changed byte An array containing the changed block to be compressed.
changedStart int The offset within the array where the changed /// block starts.
changedLength int The length of the changed block. This may be /// greater than , but may not be less.
리턴 byte[]

Contains() 공개 메소드

Checks whether the Quetzal file contains a given chunk type.
public Contains ( string type ) : bool
type string The 4-character type identifier.
리턴 bool

DecompressMemory() 공개 정적인 메소드

Reconstitutes a changed block of memory by applying a compressed set of differences to the original block from the game file.
public static DecompressMemory ( byte original, byte delta ) : byte[]
original byte The original block of memory.
delta byte The RLE-compressed set of differences, /// prefixed with a 4-byte length. This length may be larger than /// the original block, but not smaller.
리턴 byte[]

FromStream() 공개 정적인 메소드

Loads a collection of chunks from a Quetzal file.
Duplicate chunks are not supported by this class. Only the last chunk of a given type will be available.
public static FromStream ( Stream stream ) : Quetzal
stream Stream The stream to read from.
리턴 Quetzal

Quetzal() 공개 메소드

Initializes a new chunk collection.
public Quetzal ( ) : System
리턴 System

WriteToStream() 공개 메소드

Writes the chunks to a Quetzal file.
public WriteToStream ( Stream stream ) : void
stream Stream The stream to write to.
리턴 void

this() 공개 메소드

Gets or sets typed data chunks.
public this ( string type ) : byte[]
type string The 4-character type identifier.
리턴 byte[]