BrawlCrate v0.41
Wii File Editor
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
BrawlLib.Wii.Compression.CompressionHeader Struct Reference

Public Member Functions

bool HasLegitCompression ()
 

Properties

CompressionType Algorithm [get, set]
 
uint Parameter [get, set]
 
bool IsExtendedLZ77 [get, set]
 
bool LargeSize [get]
 
uint ExpandedSize [get, set]
 
VoidPtr Data [get]
 

Member Function Documentation

◆ HasLegitCompression()

bool BrawlLib.Wii.Compression.CompressionHeader.HasLegitCompression ( )
inline
89 {
90 return Enum.IsDefined(typeof(CompressionType), (int) _algorithm[4, 4]) && Algorithm != CompressionType.None;
91 }
CompressionType
Definition: CompressionHeader.cs:9
CompressionType Algorithm
Definition: CompressionHeader.cs:30

Property Documentation

◆ Algorithm

CompressionType BrawlLib.Wii.Compression.CompressionHeader.Algorithm
getset
30 {
31 get
32 {
33 CompressionType c = (CompressionType) _algorithm[4, 4];
34 if (c == CompressionType.LZ77)
35 {
37 {
38 c = CompressionType.ExtendedLZ77;
39 }
40 }
41
42 return c;
43 }
44 set
45 {
46 CompressionType c = value;
47 if (c == CompressionType.ExtendedLZ77)
48 {
49 IsExtendedLZ77 = true;
50 c = CompressionType.LZ77;
51 }
52
53 _algorithm[4, 4] = (byte) c;
54 }
55 }
bool IsExtendedLZ77
Definition: CompressionHeader.cs:64

◆ Data

VoidPtr BrawlLib.Wii.Compression.CompressionHeader.Data
get

◆ ExpandedSize

uint BrawlLib.Wii.Compression.CompressionHeader.ExpandedSize
getset
72 {
73 get => LargeSize ? _extSize : (uint) _size;
74 set
75 {
76 if (value > 0xFFFFFF) //Use extended header for sizes > 24 bits
77 {
78 _extSize = value;
79 _size = 0;
80 }
81 else
82 {
83 _size = value;
84 }
85 }
86 }
bool LargeSize
Definition: CompressionHeader.cs:69

◆ IsExtendedLZ77

bool BrawlLib.Wii.Compression.CompressionHeader.IsExtendedLZ77
getset
64 {
65 get => Parameter != 0;
66 set => Parameter = (uint) (value ? 1 : 0);
67 }
Definition: Parameters.cs:8

◆ LargeSize

bool BrawlLib.Wii.Compression.CompressionHeader.LargeSize
get

◆ Parameter

uint BrawlLib.Wii.Compression.CompressionHeader.Parameter
getset
58 {
59 get => _algorithm[0, 4];
60 set => _algorithm[0, 4] = (byte) value;
61 }

The documentation for this struct was generated from the following file: