mirror of https://github.com/AxioDL/lzokay.git
Update test.cpp for API change
This commit is contained in:
parent
82e4029131
commit
343f9707f6
7
test.cpp
7
test.cpp
|
@ -12,14 +12,15 @@ int compress_and_decompress(const uint8_t* data, std::size_t length) {
|
|||
|
||||
std::size_t compressed_size = lzokay::compress_worst_size(length);
|
||||
std::unique_ptr<uint8_t[]> compressed(new uint8_t[compressed_size]);
|
||||
error = lzokay::compress(data, length, compressed.get(), compressed_size, dict);
|
||||
error = lzokay::compress(data, length, compressed.get(), compressed_size,
|
||||
compressed_size, dict);
|
||||
if (error < lzokay::EResult::Success)
|
||||
return 1;
|
||||
|
||||
std::unique_ptr<uint8_t[]> decompressed(new uint8_t[length]);
|
||||
std::size_t decompressed_size = length;
|
||||
std::size_t decompressed_size;
|
||||
error = lzokay::decompress(compressed.get(), compressed_size,
|
||||
decompressed.get(), decompressed_size);
|
||||
decompressed.get(), length, decompressed_size);
|
||||
if (error < lzokay::EResult::Success)
|
||||
return 1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue