eet: Switch from obsolete LZ4_uncompress function to LZ4_decompress_fast

The function is declared as obsolete and in some newer headers it is no
longer defined. The new function is the same besides the name change.
This commit is contained in:
Stefan Schmidt 2014-12-10 14:34:42 +01:00
parent 2e977a1e50
commit 6b27d7add2
2 changed files with 9 additions and 9 deletions

View File

@ -945,8 +945,8 @@ eet_data_image_etc2_decode(const void *data,
if (compress)
{
expand_length = LZ4_uncompress(data_start, buffer,
block_count * etc_block_size);
expand_length = LZ4_decompress_fast(data_start, buffer,
block_count * etc_block_size);
// That's an overhead for now, need to be fixed
if (expand_length != block_length)
goto on_error;
@ -2465,8 +2465,8 @@ _eet_data_image_decode_inside(const void *data,
{
case EET_COMPRESSION_VERYFAST:
case EET_COMPRESSION_SUPERFAST:
if (LZ4_uncompress((const char *)body,
(char *)d, w * h * 4)
if (LZ4_decompress_fast((const char *)body,
(char *)d, w * h * 4)
!= (size - 32)) return 0;
break;
default:
@ -2491,8 +2491,8 @@ _eet_data_image_decode_inside(const void *data,
dtmp = malloc(src_w * src_h * 4);
if (!dtmp) return 0;
if (LZ4_uncompress((const char *)body,
dtmp, w * h * 4)
if (LZ4_decompress_fast((const char *)body,
dtmp, w * h * 4)
!= (size - 32))
{
free(dtmp);

View File

@ -2034,7 +2034,7 @@ eet_read_cipher(Eet_File *ef,
{
case EET_COMPRESSION_VERYFAST:
case EET_COMPRESSION_SUPERFAST:
ret = LZ4_uncompress(tmp_data, data, dlen);
ret = LZ4_decompress_fast(tmp_data, data, dlen);
if (ret != compr_size)
{
if (free_tmp)
@ -2153,7 +2153,7 @@ eet_read_direct(Eet_File *ef,
{
case EET_COMPRESSION_VERYFAST:
case EET_COMPRESSION_SUPERFAST:
ret = LZ4_uncompress(data, tmp, size);
ret = LZ4_decompress_fast(data, tmp, size);
if (ret != compr_size)
{
free(tmp);
@ -2268,7 +2268,7 @@ eet_alias_get(Eet_File *ef,
{
case EET_COMPRESSION_VERYFAST:
case EET_COMPRESSION_SUPERFAST:
ret = LZ4_uncompress(data, tmp, size);
ret = LZ4_decompress_fast(data, tmp, size);
if (ret != compr_size)
{
free(tmp);