mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
20 lines
402 B
C++
20 lines
402 B
C++
#include "globals.h"
|
|
#include "bytes.h"
|
|
|
|
static void test_roundtrip()
|
|
{
|
|
std::string sourceText = "This is some data.";
|
|
std::vector<uint8_t> source(sourceText.begin(), sourceText.end());
|
|
|
|
auto compressed = compress(source);
|
|
auto decompressed = decompress(compressed);
|
|
|
|
assert(decompressed == source);
|
|
}
|
|
|
|
int main(int argc, const char* argv[])
|
|
{
|
|
test_roundtrip();
|
|
return 0;
|
|
}
|