Commit e7eb6640 authored by Andrea Bulgarelli's avatar Andrea Bulgarelli
Browse files

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

parents d208d45a ba2b6376
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@
//1 for motorola
#define ARCH_BIGENDIAN 0

enum CompressionAlgorithms  { NONE, LZH };
enum CompressionAlgorithms  { NONE, LZ4 };

/// define NOFIELDSNAME

+2 −2
Original line number Diff line number Diff line
@@ -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);