aboutsummaryrefslogtreecommitdiff
path: root/mp/src/common/lzma
diff options
context:
space:
mode:
authorJohn Schoenick <[email protected]>2015-09-09 18:35:41 -0700
committerJohn Schoenick <[email protected]>2015-09-09 18:35:41 -0700
commit0d8dceea4310fde5706b3ce1c70609d72a38efdf (patch)
treec831ef32c2c801a5c5a80401736b52c7b5a528ec /mp/src/common/lzma
parentUpdated the SDK with the latest code from the TF and HL2 branches. (diff)
downloadsource-sdk-2013-master.tar.xz
source-sdk-2013-master.zip
Updated the SDK with the latest code from the TF and HL2 branches.HEADmaster
Diffstat (limited to 'mp/src/common/lzma')
-rw-r--r--mp/src/common/lzma/lzma.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/mp/src/common/lzma/lzma.h b/mp/src/common/lzma/lzma.h
new file mode 100644
index 00000000..01bd1ef9
--- /dev/null
+++ b/mp/src/common/lzma/lzma.h
@@ -0,0 +1,53 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: LZMA Glue. Designed for Tool time Encoding/Decoding.
+//
+// LZMA Codec interface for engine. Based largely on LzmaUtil.c in SDK
+//
+// LZMA SDK 9.38 beta
+// 2015-01-03 : Igor Pavlov : Public domain
+// http://www.7-zip.org/
+//
+//====================================================================================//
+
+#ifndef LZMA_H
+#define LZMA_H
+
+#ifdef _WIN32
+#pragma once
+#endif
+
+//-----------------------------------------------------------------------------
+// These routines are designed for TOOL TIME encoding/decoding on the PC!
+// They have not been made to encode/decode on the PPC and lack big endian awarnesss.
+// Lightweight GAME TIME Decoding is part of tier1.lib, via CLZMA.
+//-----------------------------------------------------------------------------
+
+//-----------------------------------------------------------------------------
+// Encoding glue. Returns non-null Compressed buffer if successful.
+// Caller must free.
+//-----------------------------------------------------------------------------
+unsigned char *LZMA_Compress(
+unsigned char *pInput,
+unsigned int inputSize,
+unsigned int *pOutputSize );
+
+//-----------------------------------------------------------------------------
+// Decoding glue. Returns TRUE if succesful.
+//-----------------------------------------------------------------------------
+bool LZMA_Uncompress(
+unsigned char *pInput,
+unsigned char **ppOutput,
+unsigned int *pOutputSize );
+
+//-----------------------------------------------------------------------------
+// Decoding helper, returns TRUE if buffer is LZMA compressed.
+//-----------------------------------------------------------------------------
+bool LZMA_IsCompressed( unsigned char *pInput );
+
+//-----------------------------------------------------------------------------
+// Decoding helper, returns non-zero size of data when uncompressed, otherwise 0.
+//-----------------------------------------------------------------------------
+unsigned int LZMA_GetActualSize( unsigned char *pInput );
+
+#endif