about summary refs log tree commit diff
path: root/src/engine/shared/compression.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/shared/compression.cpp')
-rw-r--r--src/engine/shared/compression.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/engine/shared/compression.cpp b/src/engine/shared/compression.cpp
index f14e1cc4..40fe28c4 100644
--- a/src/engine/shared/compression.cpp
+++ b/src/engine/shared/compression.cpp
@@ -4,9 +4,9 @@
 
 #include "compression.h"
 
-// Format: ESDDDDDD EDDDDDDD EDD...  Extended, Data, Sign
-unsigned char *CVariableInt::Pack(unsigned char *pDst, int i) 
-{ 
+// Format: ESDDDDDD EDDDDDDD EDD... Extended, Data, Sign
+unsigned char *CVariableInt::Pack(unsigned char *pDst, int i)
+{
 	*pDst = (i>>25)&0x40; // set sign bit if i<0
 	i = i^(i>>31); // if(i<0) i = ~i
 
@@ -27,16 +27,16 @@ unsigned char *CVariableInt::Pack(unsigned char *pDst, int i)
 	}
 
 	pDst++;
-	return pDst; 
-} 
- 
+	return pDst;
+}
+
 const unsigned char *CVariableInt::Unpack(const unsigned char *pSrc, int *pInOut)
-{ 
-	int Sign = (*pSrc>>6)&1; 
-	*pInOut = *pSrc&0x3F; 
+{
+	int Sign = (*pSrc>>6)&1;
+	*pInOut = *pSrc&0x3F;
 
 	do
-	{ 
+	{
 		if(!(*pSrc&0x80)) break;
 		pSrc++;
 		*pInOut |= (*pSrc&(0x7F))<<(6);
@@ -56,8 +56,8 @@ const unsigned char *CVariableInt::Unpack(const unsigned char *pSrc, int *pInOut
 
 	pSrc++;
 	*pInOut ^= -Sign; // if(sign) *i = ~(*i)
-	return pSrc; 
-} 
+	return pSrc;
+}
 
 
 long CVariableInt::Decompress(const void *pSrc_, int Size, void *pDst_)