Class WadFile
Represents a WAD archive
Inheritance
Namespace: LeagueToolkit.Core.Wad
Assembly: LeagueToolkit.dll
Syntax
public sealed class WadFile : IDisposable
Remarks
Use WadBuilder to build WAD files
Constructors
| Improve this Doc View SourceWadFile(FileStream)
Creates a new WadFile object using the specified parameters
Declaration
public WadFile(FileStream stream)
Parameters
Type | Name | Description |
---|---|---|
FileStream | stream | The stream to read the WadFile from |
WadFile(String)
Creates a new WadFile object using the specified parameters
Declaration
public WadFile(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The path of the WadFile |
Properties
| Improve this Doc View SourceChunks
Gets the chunks
Declaration
public IReadOnlyDictionary<ulong, WadChunk> Chunks { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<System.UInt64, WadChunk> |
IsDisposed
Gets a value indicating whether the archive has been disposed of
Declaration
public bool IsDisposed { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Subchunks
Declaration
public ReadOnlyMemory<WadSubchunk> Subchunks { get; }
Property Value
Type | Description |
---|---|
ReadOnlyMemory<WadSubchunk> |
Methods
| Improve this Doc View SourceDispose()
Disposes the WadFile object and the wrapped
Declaration
public void Dispose()
FindChunk(String)
Searches for a chunk with the specified path
Declaration
public WadChunk FindChunk(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The path of the WadChunk |
Returns
Type | Description |
---|---|
WadChunk | The found chunk |
FindChunk(UInt64)
Searches for a chunk with the specified path hash
Declaration
public WadChunk FindChunk(ulong pathHash)
Parameters
Type | Name | Description |
---|---|---|
System.UInt64 | pathHash | The lowercase path of the WadChunk hashed using |
Returns
Type | Description |
---|---|
WadChunk | The found chunk |
LoadChunk(WadChunk)
Loads the raw data of the specified chunk into memory
Declaration
public MemoryOwner<byte> LoadChunk(WadChunk chunk)
Parameters
Type | Name | Description |
---|---|---|
WadChunk | chunk | The chunk to load |
Returns
Type | Description |
---|---|
MemoryOwner<System.Byte> | A |
LoadChunk(String)
Loads the raw data of the specified chunk into memory
Declaration
public MemoryOwner<byte> LoadChunk(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The path of the chunk to load |
Returns
Type | Description |
---|---|
MemoryOwner<System.Byte> | A |
LoadChunk(UInt64)
Loads the raw data of the specified chunk into memory
Declaration
public MemoryOwner<byte> LoadChunk(ulong pathHash)
Parameters
Type | Name | Description |
---|---|---|
System.UInt64 | pathHash | The path hash of the chunk to load |
Returns
Type | Description |
---|---|
MemoryOwner<System.Byte> | A |
LoadChunkDecompressed(WadChunk)
Loads the decompressed data of the specified chunk into memory
Declaration
public MemoryOwner<byte> LoadChunkDecompressed(WadChunk chunk)
Parameters
Type | Name | Description |
---|---|---|
WadChunk | chunk | The chunk to load |
Returns
Type | Description |
---|---|
MemoryOwner<System.Byte> | A |
LoadChunkDecompressed(String)
Loads the decompressed data of the specified chunk into memory
Declaration
public MemoryOwner<byte> LoadChunkDecompressed(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The path of the chunk to load |
Returns
Type | Description |
---|---|
MemoryOwner<System.Byte> | A |
LoadChunkDecompressed(UInt64)
Loads the decompressed data of the specified chunk into memory
Declaration
public MemoryOwner<byte> LoadChunkDecompressed(ulong pathHash)
Parameters
Type | Name | Description |
---|---|---|
System.UInt64 | pathHash | The path hash of the chunk to load |
Returns
Type | Description |
---|---|
MemoryOwner<System.Byte> | A |
OpenChunk(WadChunk)
Opens a decompression stream for the specified chunk
Declaration
public Stream OpenChunk(WadChunk chunk)
Parameters
Type | Name | Description |
---|---|---|
WadChunk | chunk | The chunk to open a stream for |
Returns
Type | Description |
---|---|
Stream | A |
OpenChunk(String)
Opens a decompression stream for the specified chunk
Declaration
public Stream OpenChunk(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The path of the chunk to open a stream for |
Returns
Type | Description |
---|---|
Stream | A |
OpenChunk(UInt64)
Opens a decompression stream for the specified chunk
Declaration
public Stream OpenChunk(ulong pathHash)
Parameters
Type | Name | Description |
---|---|---|
System.UInt64 | pathHash | The path hash of the chunk to open a stream for |
Returns
Type | Description |
---|---|
Stream | A |