◆ Compact()
static int BrawlLib.Wii.Compression.Differential.Compact |
( |
VoidPtr |
srcAddr, |
|
|
int |
srcLen, |
|
|
Stream |
outStream, |
|
|
ResourceNode |
r, |
|
|
bool |
extendedFormat |
|
) |
| |
|
inlinestatic |
20 {
22 $"Compressing {r.Name}, please wait...", false))
23 {
24 return new Differential().Compress(srcAddr, srcLen, outStream, prog);
25 }
26 }
ResourceNode RootNode
Definition: ResourceNode.cs:175
Form _mainForm
Definition: ResourceNode.cs:130
◆ Compress()
int BrawlLib.Wii.Compression.Differential.Compress |
( |
VoidPtr |
srcAddr, |
|
|
int |
srcLen, |
|
|
Stream |
outStream, |
|
|
IProgressTracker |
progress |
|
) |
| |
|
inline |
◆ Expand()
29 {
30 uint total = 0;
31 VoidPtr ceil = dstAddress + dstLen;
32
33 if (header->Parameter != 1)
34 {
35 byte* pSrc = (byte*) header->Data;
36 byte* pDst = (byte*) dstAddress;
37 do
38 {
39 total += *pSrc++;
40 *pDst++ = (byte) total;
41 } while (pSrc < (byte*) ceil);
42 }
43 else
44 {
47 do
48 {
49 total += *pSrc++;
50 *pDst++ = (ushort) total;
51 } while ((byte*) pSrc < (byte*) ceil);
52 }
53 }
Definition: BigEndianTypes.cs:192
The documentation for this class was generated from the following file:
- BrawlLib/Wii/Compression/Differential.cs