C# Class CrystalMpq.MpqFileStream

Exposes Stream with the data contained in an MpqFile.
Inheritance: Stream
Afficher le fichier Open project: sgraf812/crystalmpq Class Usage Examples

Méthodes publiques

Méthode Description
Close ( ) : void
Flush ( ) : void
Read ( byte buffer, int offset, int count ) : int

Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.

ReadByte ( ) : int
Seek ( long offset, SeekOrigin origin ) : long
SetLength ( long value ) : void
Write ( byte buffer, int offset, int count ) : void

Private Methods

Méthode Description
ApplyBsd0Patch ( PatchInfoHeader &patchInfoHeader, PatchHeader &patchHeader, uint patchLength, byte originalData ) : byte[]
ApplyCopyPatch ( PatchInfoHeader &patchInfoHeader, PatchHeader &patchHeader, uint patchLength, byte originalData ) : byte[]
ApplyPatch ( PatchInfoHeader patchInfoHeader, Stream baseStream ) : byte[]
MpqFileStream ( MpqFile file, Stream baseStream = null ) : System.Diagnostics
Read ( byte buffer, int count ) : int
ReadBlock ( int block ) : void
ReadBlockOffsets ( MpqArchive archive, uint hash, long offset, int count ) : uint[]
ReadPatchInfoHeader ( MpqArchive archive, long offset ) : PatchInfoHeader
TestPatchHeader ( MpqArchive archive, long offset ) : bool
UnpackRle ( uint compressedLength ) : byte[]
UpdateBuffer ( ) : void

Method Details

Close() public final méthode

public final Close ( ) : void
Résultat void

Flush() public final méthode

public final Flush ( ) : void
Résultat void

Read() public final méthode

Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
public final Read ( byte buffer, int offset, int count ) : int
buffer byte An array of bytes. When this method returns, the buffer contains the specified byte array with the values between and ( + - 1) replaced by the bytes read from the current source.
offset int The zero-based byte offset in at which to begin storing the data read from the current stream.
count int The maximum number of bytes to be read from the current stream.
Résultat int

ReadByte() public final méthode

public final ReadByte ( ) : int
Résultat int

Seek() public final méthode

public final Seek ( long offset, SeekOrigin origin ) : long
offset long
origin SeekOrigin
Résultat long

SetLength() public final méthode

public final SetLength ( long value ) : void
value long
Résultat void

Write() public final méthode

public final Write ( byte buffer, int offset, int count ) : void
buffer byte
offset int
count int
Résultat void