mirror of
https://github.com/love2d/love.git
synced 2026-08-18 11:44:15 +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:
@@ -38,7 +38,7 @@ namespace magpie
|
||||
{
|
||||
|
||||
/**
|
||||
* Interface between CompressedData and the ddsparse library.
|
||||
* Interface between CompressedImageData and the ddsparse library.
|
||||
**/
|
||||
class DDSHandler : public CompressedFormatHandler
|
||||
{
|
||||
@@ -48,11 +48,11 @@ public:
|
||||
|
||||
// Implements CompressedFormatHandler.
|
||||
virtual bool canParse(const filesystem::FileData *data);
|
||||
virtual uint8 *parse(filesystem::FileData *filedata, std::vector<CompressedData::SubImage> &images, size_t &dataSize, CompressedData::Format &format, bool &sRGB);
|
||||
virtual uint8 *parse(filesystem::FileData *filedata, std::vector<CompressedImageData::SubImage> &images, size_t &dataSize, CompressedImageData::Format &format, bool &sRGB);
|
||||
|
||||
private:
|
||||
|
||||
static CompressedData::Format convertFormat(dds::Format ddsformat, bool &sRGB);
|
||||
static CompressedImageData::Format convertFormat(dds::Format ddsformat, bool &sRGB);
|
||||
|
||||
}; // DDSHandler
|
||||
|
||||
|
||||
Reference in New Issue
Block a user