summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/emile/emile_compress.c12
-rw-r--r--src/modules/evas/image_savers/tgv/evas_image_save_tgv.c10
2 files changed, 13 insertions, 9 deletions
diff --git a/src/lib/emile/emile_compress.c b/src/lib/emile/emile_compress.c
index 0d2e605795..e744d3f93f 100644
--- a/src/lib/emile/emile_compress.c
+++ b/src/lib/emile/emile_compress.c
@@ -52,9 +52,9 @@ emile_compress(const Eina_Binbuf *data,
52 switch (t) 52 switch (t)
53 { 53 {
54 case EMILE_LZ4: 54 case EMILE_LZ4:
55 length = LZ4_compress((const char *)eina_binbuf_string_get(data), 55 length = LZ4_compress_default
56 compact, 56 ((const char *)eina_binbuf_string_get(data), compact,
57 eina_binbuf_length_get(data)); 57 eina_binbuf_length_get(data), length);
58 /* It is going to be smaller and should never fail, if it does you are in deep poo. */ 58 /* It is going to be smaller and should never fail, if it does you are in deep poo. */
59 temp = realloc(compact, length); 59 temp = realloc(compact, length);
60 if (temp) compact = temp; 60 if (temp) compact = temp;
@@ -64,9 +64,9 @@ emile_compress(const Eina_Binbuf *data,
64 break; 64 break;
65 65
66 case EMILE_LZ4HC: 66 case EMILE_LZ4HC:
67 length = LZ4_compressHC((const char *)eina_binbuf_string_get(data), 67 length = LZ4_compress_HC
68 compact, 68 ((const char *)eina_binbuf_string_get(data), compact,
69 eina_binbuf_length_get(data)); 69 eina_binbuf_length_get(data), length, 16);
70 temp = realloc(compact, length); 70 temp = realloc(compact, length);
71 if (temp) compact = temp; 71 if (temp) compact = temp;
72 72
diff --git a/src/modules/evas/image_savers/tgv/evas_image_save_tgv.c b/src/modules/evas/image_savers/tgv/evas_image_save_tgv.c
index aa0a82b943..9fee4de364 100644
--- a/src/modules/evas/image_savers/tgv/evas_image_save_tgv.c
+++ b/src/modules/evas/image_savers/tgv/evas_image_save_tgv.c
@@ -125,7 +125,8 @@ _save_direct_tgv(RGBA_Image *im, const char *file, int compress)
125 buffer_size = LZ4_compressBound(etc_data_size); 125 buffer_size = LZ4_compressBound(etc_data_size);
126 buffer = malloc(buffer_size); 126 buffer = malloc(buffer_size);
127 if (!buffer) goto on_error; 127 if (!buffer) goto on_error;
128 data_size = LZ4_compressHC((char *) data, (char *) buffer, etc_data_size); 128 data_size = LZ4_compress_HC
129 ((char *)data, (char *)buffer, etc_data_size, buffer_size, 16);
129 } 130 }
130 else 131 else
131 { 132 {
@@ -486,8 +487,11 @@ evas_image_save_file_tgv(RGBA_Image *im,
486 487
487 if (compress) 488 if (compress)
488 { 489 {
489 wlen = LZ4_compressHC((char *) buffer, (char *) comp, 490 wlen = LZ4_compress_HC
490 block_count * etc_block_size); 491 ((char *)buffer, (char *)comp,
492 block_count * etc_block_size,
493 LZ4_compressBound(block_count * etc_block_size),
494 16);
491 } 495 }
492 else 496 else
493 { 497 {