mirror of
https://github.com/jakcron/nstool
synced 2024-11-15 10:16:42 +00:00
14 lines
542 B
C++
14 lines
542 B
C++
|
#include <compress/lz4.h>
|
||
|
#include "lz4/lz4.h"
|
||
|
|
||
|
void compress::lz4::compressData(const uint8_t* src, uint32_t src_len, uint8_t* dst, uint32_t dst_capacity, uint32_t& compressed_size)
|
||
|
{
|
||
|
compressed_size = LZ4_compress_default((const char*)src, (char*)dst, (int)src_len, (int)dst_capacity);
|
||
|
}
|
||
|
|
||
|
void compress::lz4::decompressData(const uint8_t* src, uint32_t src_len, uint8_t* dst, uint32_t dst_capacity, uint32_t& decompressed_size)
|
||
|
{
|
||
|
decompressed_size = LZ4_decompress_safe((const char*)src, (char*)dst, (int)src_len, (int)dst_capacity);
|
||
|
}
|
||
|
|
||
|
|