mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
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:
@@ -26,7 +26,7 @@
|
||||
#include "common/Module.h"
|
||||
#include "filesystem/File.h"
|
||||
#include "ImageData.h"
|
||||
#include "CompressedData.h"
|
||||
#include "CompressedImageData.h"
|
||||
|
||||
namespace love
|
||||
{
|
||||
@@ -76,11 +76,11 @@ public:
|
||||
virtual ImageData *newImageData(int width, int height, void *data, bool own = false) = 0;
|
||||
|
||||
/**
|
||||
* Creates new CompressedData from FileData.
|
||||
* Creates new CompressedImageData from FileData.
|
||||
* @param data The FileData containing the compressed image data.
|
||||
* @return The new CompressedData.
|
||||
* @return The new CompressedImageData.
|
||||
**/
|
||||
virtual CompressedData *newCompressedData(love::filesystem::FileData *data) = 0;
|
||||
virtual CompressedImageData *newCompressedData(love::filesystem::FileData *data) = 0;
|
||||
|
||||
/**
|
||||
* Determines whether a FileData is Compressed image data or not.
|
||||
|
||||
Reference in New Issue
Block a user