aboutsummaryrefslogtreecommitdiff
path: root/mp/src/public/tier1/lzmaDecoder.h
diff options
context:
space:
mode:
authorJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
committerJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
commit39ed87570bdb2f86969d4be821c94b722dc71179 (patch)
treeabc53757f75f40c80278e87650ea92808274aa59 /mp/src/public/tier1/lzmaDecoder.h
downloadsource-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz
source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip
First version of the SOurce SDK 2013
Diffstat (limited to 'mp/src/public/tier1/lzmaDecoder.h')
-rw-r--r--mp/src/public/tier1/lzmaDecoder.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/mp/src/public/tier1/lzmaDecoder.h b/mp/src/public/tier1/lzmaDecoder.h
new file mode 100644
index 00000000..eb501c10
--- /dev/null
+++ b/mp/src/public/tier1/lzmaDecoder.h
@@ -0,0 +1,42 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// LZMA Decoder. Designed for run time decoding.
+//
+// LZMA SDK 4.43 Copyright (c) 1999-2006 Igor Pavlov (2006-05-01)
+// http://www.7-zip.org/
+//
+//=====================================================================================//
+
+#ifndef _LZMADECODER_H
+#define _LZMADECODER_H
+#pragma once
+
+#if !defined( _X360 )
+#define LZMA_ID (('A'<<24)|('M'<<16)|('Z'<<8)|('L'))
+#else
+#define LZMA_ID (('L'<<24)|('Z'<<16)|('M'<<8)|('A'))
+#endif
+
+// bind the buffer for correct identification
+#pragma pack(1)
+struct lzma_header_t
+{
+ unsigned int id;
+ unsigned int actualSize; // always little endian
+ unsigned int lzmaSize; // always little endian
+ unsigned char properties[5];
+};
+#pragma pack()
+
+class CLZMA
+{
+public:
+ unsigned int Uncompress( unsigned char *pInput, unsigned char *pOutput );
+ bool IsCompressed( unsigned char *pInput );
+ unsigned int GetActualSize( unsigned char *pInput );
+
+private:
+};
+
+#endif
+