Added love.math.compress(data, format [, level]) and love.math.decompress(compresseddata) / love.math.decompress(compressedstring, format).

Renamed the love.image CompressedData type to CompressedImageData.

love.math.compress returns a love.math CompressedData object which holds the newly compressed data. Currently supported formats are "lz4" and "zlib". Note that the formats are not file formats and don't compress filesystem hierarchies.
This commit is contained in:
Alex Szpakowski
2015-03-23 11:28:14 -03:00
parent 4d92d00aff
commit a29b349014
45 changed files with 3895 additions and 395 deletions
+1 -1
View File
@@ -94,7 +94,7 @@ int w_Image_getData(lua_State *L)
Image *i = luax_checkimage(L, 1);
if (i->isCompressed())
luax_pushtype(L, IMAGE_COMPRESSED_DATA_ID, i->getCompressedData());
luax_pushtype(L, IMAGE_COMPRESSED_IMAGE_DATA_ID, i->getCompressedData());
else
luax_pushtype(L, IMAGE_IMAGE_DATA_ID, i->getImageData());