mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-08 10:07:02 -06:00
Added Extra Codec, for easier integration into existing 7-Zip installations
This commit is contained in:
3
CPP/7zip/Bundles/Codec_zstd/StdAfx.cpp
Normal file
3
CPP/7zip/Bundles/Codec_zstd/StdAfx.cpp
Normal file
@@ -0,0 +1,3 @@
|
||||
// StdAfx.cpp
|
||||
|
||||
#include "StdAfx.h"
|
||||
8
CPP/7zip/Bundles/Codec_zstd/StdAfx.h
Normal file
8
CPP/7zip/Bundles/Codec_zstd/StdAfx.h
Normal file
@@ -0,0 +1,8 @@
|
||||
// StdAfx.h
|
||||
|
||||
#ifndef __STDAFX_H
|
||||
#define __STDAFX_H
|
||||
|
||||
#include "../../../Common/Common.h"
|
||||
|
||||
#endif
|
||||
27
CPP/7zip/Bundles/Codec_zstd/makefile
Normal file
27
CPP/7zip/Bundles/Codec_zstd/makefile
Normal file
@@ -0,0 +1,27 @@
|
||||
PROG = zstd.dll
|
||||
DEF_FILE = ../../Compress/Codec.def
|
||||
CFLAGS = $(CFLAGS)
|
||||
|
||||
#EXPORTS
|
||||
# CreateObject PRIVATE
|
||||
# GetNumberOfMethods PRIVATE
|
||||
# GetMethodProperty PRIVATE
|
||||
|
||||
7ZIP_COMMON_OBJS = \
|
||||
$O\StreamUtils.obj \
|
||||
|
||||
COMPRESS_OBJS = \
|
||||
$O\CodecExports.obj \
|
||||
$O\DllExportsCompress.obj \
|
||||
|
||||
C_OBJS = \
|
||||
$O\Alloc.obj \
|
||||
|
||||
!include "../../zstd.mak"
|
||||
ZSTD_OBJS = $(ZSTD_OBJS) \
|
||||
$O\fse_compress.obj \
|
||||
$O\huf_compress.obj \
|
||||
$O\zbuff_compress.obj \
|
||||
$O\zstd_compress.obj \
|
||||
|
||||
!include "../../7zip.mak"
|
||||
5
CPP/7zip/Bundles/Codec_zstd/resource.rc
Normal file
5
CPP/7zip/Bundles/Codec_zstd/resource.rc
Normal file
@@ -0,0 +1,5 @@
|
||||
#include "../../MyVersionInfo.rc"
|
||||
|
||||
MY_VERSION_INFO_DLL("7z ZStandard Plugin", "zstd")
|
||||
|
||||
101 ICON "../../Archive/Icons/7z.ico"
|
||||
@@ -31,8 +31,8 @@ CDecoder::CDecoder ():
|
||||
_inBufSizeAllocated (0),
|
||||
_outBufSizeAllocated (0),
|
||||
|
||||
_inBufSize (ZBUFF_recommendedDInSize()),
|
||||
_outBufSize (ZBUFF_recommendedDOutSize())
|
||||
_inBufSize (ZBUFF_recommendedDInSize() * 30),
|
||||
_outBufSize (ZBUFF_recommendedDOutSize()* 30)
|
||||
{
|
||||
_props.clear ();
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@ CEncoder::CEncoder():
|
||||
_inSize (0),
|
||||
_inBufSizeAllocated (0),
|
||||
_outBufSizeAllocated (0),
|
||||
_inBufSize (ZBUFF_recommendedCInSize()),
|
||||
_outBufSize (ZBUFF_recommendedCOutSize()),
|
||||
_inBufSize (ZBUFF_recommendedCInSize() * 30),
|
||||
_outBufSize (ZBUFF_recommendedCOutSize() * 30),
|
||||
_inSizeProcessed (0),
|
||||
_outSizeProcessed (0)
|
||||
{
|
||||
|
||||
@@ -11,8 +11,22 @@
|
||||
#include "ZstdEncoder.h"
|
||||
#endif
|
||||
|
||||
#ifndef EXTERNAL_CODEC
|
||||
REGISTER_CODEC_E(
|
||||
ZSTD,
|
||||
NCompress::NZSTD::CDecoder(),
|
||||
NCompress::NZSTD::CEncoder(),
|
||||
0x4F71101, "ZSTD")
|
||||
#else
|
||||
static void *CreateCodecOut() { return (void *)(ICompressCoder *)(new NCompress::NZSTD::CEncoder); }
|
||||
static void *CreateCodec() { return (void *)(ICompressCoder *)(new NCompress::NZSTD::CDecoder); }
|
||||
static CCodecInfo g_CodecsInfo[1] = {
|
||||
CreateCodec,
|
||||
CreateCodecOut,
|
||||
0x4F71101,
|
||||
"ZSTD",
|
||||
1,
|
||||
false
|
||||
};
|
||||
REGISTER_CODECS(ZSTD)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user