FireBirdLib - Topfield TMS PVR TAP Programming Library
UncompressedLoaderSize.c
Go to the documentation of this file.
1
#include "
libFireBird.h
"
2
#include "
FBLib_compression.h
"
3
4
dword
UncompressedLoaderSize
(
byte
*pSrc)
5
{
6
TRACEENTER
();
7
8
word compSize, uncompSize;
9
dword outSize = 0;
10
11
if
(!pSrc)
12
{
13
TRACEEXIT
();
14
return
0;
15
}
16
17
uncompSize =
LOAD_WORDLE
(pSrc + 0);
18
compSize =
LOAD_WORDLE
(pSrc + 2);
19
20
while
(uncompSize != 0xfefe)
21
{
22
if
(uncompSize > 0x8000)
23
{
24
//Uncompressed data block size too large
25
TRACEEXIT
();
26
27
return
0;
28
}
29
pSrc += (4 + compSize);
30
outSize += uncompSize;
31
32
uncompSize =
LOAD_WORDLE
(pSrc + 0);
33
compSize =
LOAD_WORDLE
(pSrc + 2);
34
}
35
36
TRACEEXIT
();
37
return
outSize;
38
}
FBLib_compression.h
LOAD_WORDLE
#define LOAD_WORDLE(x)
Definition:
FBLib_compression.h:26
UncompressedLoaderSize
dword UncompressedLoaderSize(byte *pSrc)
Definition:
UncompressedLoaderSize.c:4
libFireBird.h
TRACEEXIT
#define TRACEEXIT()
Definition:
libFireBird.h:1244
TRACEENTER
#define TRACEENTER()
Definition:
libFireBird.h:1243
compression
UncompressedLoaderSize.c
Generated on Fri Apr 29 2022 13:34:00 for FireBirdLib - Topfield TMS PVR TAP Programming Library by
1.9.3