mirror of
https://github.com/CTCaer/hekate.git
synced 2024-11-10 04:21:45 +00:00
lz: Return uncompressed size
This commit is contained in:
parent
32e58d2bb3
commit
100d6cc4a5
2 changed files with 5 additions and 3 deletions
|
@ -125,7 +125,7 @@ static int _LZ_ReadVarSize( unsigned int * x, const unsigned char * buf )
|
||||||
* insize - Number of input bytes.
|
* insize - Number of input bytes.
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
void LZ_Uncompress( const unsigned char *in, unsigned char *out,
|
unsigned int LZ_Uncompress( const unsigned char *in, unsigned char *out,
|
||||||
unsigned int insize )
|
unsigned int insize )
|
||||||
{
|
{
|
||||||
unsigned char marker, symbol;
|
unsigned char marker, symbol;
|
||||||
|
@ -134,7 +134,7 @@ void LZ_Uncompress( const unsigned char *in, unsigned char *out,
|
||||||
/* Do we have anything to uncompress? */
|
/* Do we have anything to uncompress? */
|
||||||
if( insize < 1 )
|
if( insize < 1 )
|
||||||
{
|
{
|
||||||
return;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get marker symbol from input stream */
|
/* Get marker symbol from input stream */
|
||||||
|
@ -176,4 +176,6 @@ void LZ_Uncompress( const unsigned char *in, unsigned char *out,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while( inpos < insize );
|
while( inpos < insize );
|
||||||
|
|
||||||
|
return outpos;
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ extern "C" {
|
||||||
* Function prototypes
|
* Function prototypes
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
void LZ_Uncompress( const unsigned char *in, unsigned char *out,
|
unsigned int LZ_Uncompress( const unsigned char *in, unsigned char *out,
|
||||||
unsigned int insize );
|
unsigned int insize );
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue