summaryrefslogtreecommitdiffstats
path: root/CPP/7zip/Compress/LzmaRegister.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/7zip/Compress/LzmaRegister.cpp')
-rwxr-xr-xCPP/7zip/Compress/LzmaRegister.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/CPP/7zip/Compress/LzmaRegister.cpp b/CPP/7zip/Compress/LzmaRegister.cpp
new file mode 100755
index 0000000..9c67eaf
--- /dev/null
+++ b/CPP/7zip/Compress/LzmaRegister.cpp
@@ -0,0 +1,20 @@
+// LzmaRegister.cpp
+
+#include "StdAfx.h"
+
+#include "../Common/RegisterCodec.h"
+
+#include "LzmaDecoder.h"
+
+static void *CreateCodec() { return (void *)(ICompressCoder *)(new NCompress::NLzma::CDecoder); }
+#ifndef EXTRACT_ONLY
+#include "LzmaEncoder.h"
+static void *CreateCodecOut() { return (void *)(ICompressCoder *)(new NCompress::NLzma::CEncoder); }
+#else
+#define CreateCodecOut 0
+#endif
+
+static CCodecInfo g_CodecInfo =
+ { CreateCodec, CreateCodecOut, 0x030101, L"LZMA", 1, false };
+
+REGISTER_CODEC(LZMA)