Skip to content
Snippets Groups Projects
Commit e7eb6640 authored by Andrea Bulgarelli's avatar Andrea Bulgarelli
Browse files

Merge branch 'master' of github.com:ASTRO-BO/PacketLib

parents d208d45a ba2b6376
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,7 @@
//1 for motorola
#define ARCH_BIGENDIAN 0
enum CompressionAlgorithms { NONE, LZH };
enum CompressionAlgorithms { NONE, LZ4 };
/// define NOFIELDSNAME
......
......@@ -141,7 +141,7 @@ ByteStreamPtr PacketLib::ByteStream::compress(enum CompressionAlgorithms algorit
switch(algorithmType)
{
case LZH:
case LZ4:
{
byte* buff = new byte[LZ4_compressBound(size())];
int buffsize = LZ4_compressHC2((const char*)stream, (char*)buff, size(), compressionLevel);
......@@ -180,7 +180,7 @@ ByteStreamPtr PacketLib::ByteStream::decompress(enum CompressionAlgorithms algor
b = stream;
break;
}
case LZH:
case LZ4:
{
byte* tmpbuff = new byte[dmax];
int buffsize = LZ4_decompress_safe((const char*)stream, (char*)tmpbuff, size(), dmax);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment