mirror of
https://github.com/love2d/love-android.git
synced 2026-08-21 21:15:34 +02:00
preparing update of physfs
This commit is contained in:
@@ -0,0 +1,504 @@
|
||||
# Microsoft Developer Studio Project File - Name="AloneLZMA" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=AloneLZMA - Win32 DebugU
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "AloneLZMA.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "AloneLZMA.mak" CFG="AloneLZMA - Win32 DebugU"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "AloneLZMA - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "AloneLZMA - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "AloneLZMA - Win32 ReleaseU" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "AloneLZMA - Win32 DebugU" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "AloneLZMA - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\\" /D "NDEBUG" /D "_MBCS" /D "WIN32" /D "_CONSOLE" /D "COMPRESS_MF_MT" /D "BENCH_MT" /FAcs /Yu"StdAfx.h" /FD /c
|
||||
# ADD BASE RSC /l 0x419 /d "NDEBUG"
|
||||
# ADD RSC /l 0x419 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"c:\UTIL\lzma.exe" /opt:NOWIN98
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "AloneLZMA - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\..\\" /D "_DEBUG" /D "_MBCS" /D "WIN32" /D "_CONSOLE" /D "COMPRESS_MF_MT" /D "BENCH_MT" /Yu"StdAfx.h" /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x419 /d "_DEBUG"
|
||||
# ADD RSC /l 0x419 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"c:\UTIL\lzma.exe" /pdbtype:sept
|
||||
|
||||
!ELSEIF "$(CFG)" == "AloneLZMA - Win32 ReleaseU"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "ReleaseU"
|
||||
# PROP BASE Intermediate_Dir "ReleaseU"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "ReleaseU"
|
||||
# PROP Intermediate_Dir "ReleaseU"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "EXCLUDE_COM" /D "NO_REGISTRY" /D "FORMAT_7Z" /D "FORMAT_BZIP2" /D "FORMAT_ZIP" /D "FORMAT_TAR" /D "FORMAT_GZIP" /D "COMPRESS_LZMA" /D "COMPRESS_BCJ_X86" /D "COMPRESS_BCJ2" /D "COMPRESS_COPY" /D "COMPRESS_MF_PAT" /D "COMPRESS_MF_BT" /D "COMPRESS_PPMD" /D "COMPRESS_DEFLATE" /D "COMPRESS_IMPLODE" /D "COMPRESS_BZIP2" /D "CRYPTO_ZIP" /Yu"StdAfx.h" /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\\" /D "NDEBUG" /D "UNICODE" /D "_UNICODE" /D "WIN32" /D "_CONSOLE" /D "COMPRESS_MF_MT" /D "BENCH_MT" /Yu"StdAfx.h" /FD /c
|
||||
# ADD BASE RSC /l 0x419 /d "NDEBUG"
|
||||
# ADD RSC /l 0x419 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"c:\UTIL\7za2.exe" /opt:NOWIN98
|
||||
# SUBTRACT BASE LINK32 /pdb:none
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"c:\UTIL\lzma.exe" /opt:NOWIN98
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "AloneLZMA - Win32 DebugU"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "DebugU"
|
||||
# PROP BASE Intermediate_Dir "DebugU"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "DebugU"
|
||||
# PROP Intermediate_Dir "DebugU"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "EXCLUDE_COM" /D "NO_REGISTRY" /D "FORMAT_7Z" /D "FORMAT_BZIP2" /D "FORMAT_ZIP" /D "FORMAT_TAR" /D "FORMAT_GZIP" /D "COMPRESS_LZMA" /D "COMPRESS_BCJ_X86" /D "COMPRESS_BCJ2" /D "COMPRESS_COPY" /D "COMPRESS_MF_PAT" /D "COMPRESS_MF_BT" /D "COMPRESS_PPMD" /D "COMPRESS_DEFLATE" /D "COMPRESS_IMPLODE" /D "COMPRESS_BZIP2" /D "CRYPTO_ZIP" /D "_MBCS" /Yu"StdAfx.h" /FD /GZ /c
|
||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\\" /D "_DEBUG" /D "_UNICODE" /D "UNICODE" /D "WIN32" /D "_CONSOLE" /D "COMPRESS_MF_MT" /D "BENCH_MT" /Yu"StdAfx.h" /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x419 /d "_DEBUG"
|
||||
# ADD RSC /l 0x419 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"c:\UTIL\7za2.exe" /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"c:\UTIL\lzma.exe" /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "AloneLZMA - Win32 Release"
|
||||
# Name "AloneLZMA - Win32 Debug"
|
||||
# Name "AloneLZMA - Win32 ReleaseU"
|
||||
# Name "AloneLZMA - Win32 DebugU"
|
||||
# Begin Group "Spec"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\StdAfx.cpp
|
||||
# ADD CPP /Yc"StdAfx.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\StdAfx.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Compress"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Group "LZMA"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\LZMA\LZMA.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\LZMA\LZMADecoder.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\LZMA\LZMADecoder.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\LZMA\LZMAEncoder.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\LZMA\LZMAEncoder.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "RangeCoder"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\RangeCoder\RangeCoder.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\RangeCoder\RangeCoderBit.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\RangeCoder\RangeCoderBit.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\RangeCoder\RangeCoderBitTree.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\RangeCoder\RangeCoderOpt.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "LZ"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\LZ\LZOutWindow.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\LZ\LZOutWindow.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Group
|
||||
# Begin Group "Windows"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\FileIO.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\FileIO.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\Synchronization.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\Synchronization.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\System.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\System.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\Thread.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Common"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\CommandLineParser.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\CommandLineParser.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\CRC.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\Defs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\Defs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\IntToString.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\IntToString.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\MyCom.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\MyString.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\MyString.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\MyVector.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\MyVector.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\MyWindows.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\NewHandler.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\NewHandler.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\StringConvert.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\StringConvert.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\StringToInt.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\StringToInt.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\Types.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "7zip Common"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\FileStreams.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\FileStreams.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\InBuffer.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\InBuffer.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\OutBuffer.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\OutBuffer.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\StreamUtils.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\StreamUtils.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "C"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Group "C-Lz"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Compress\Lz\MatchFinder.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Compress\Lz\MatchFinder.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Compress\Lz\MatchFinderMt.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Compress\Lz\MatchFinderMt.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Threads.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Threads.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "LZMA_C"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Compress\Lzma\LzmaDecode.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Compress\Lzma\LzmaDecode.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Compress\Lzma\LzmaTypes.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Branch"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Compress\Branch\BranchTypes.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Compress\Branch\BranchX86.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Compress\Branch\BranchX86.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\7zCrc.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\7zCrc.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Alloc.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Alloc.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Types.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\ICoder.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\LzmaAlone.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\LzmaBench.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\LzmaBench.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\LzmaBenchCon.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\LzmaBenchCon.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\LzmaRam.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\LzmaRam.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\LzmaRamDecode.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\LzmaRamDecode.h
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
@@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "AloneLZMA"=.\AloneLZMA.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
@@ -0,0 +1,554 @@
|
||||
// LzmaAlone.cpp
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "../../../Common/MyWindows.h"
|
||||
#include "../../../Common/MyInitGuid.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined(_WIN32) || defined(OS2) || defined(MSDOS)
|
||||
#include <fcntl.h>
|
||||
#include <io.h>
|
||||
#define MY_SET_BINARY_MODE(file) _setmode(_fileno(file), O_BINARY)
|
||||
#else
|
||||
#define MY_SET_BINARY_MODE(file)
|
||||
#endif
|
||||
|
||||
#include "../../../Common/CommandLineParser.h"
|
||||
#include "../../../Common/StringConvert.h"
|
||||
#include "../../../Common/StringToInt.h"
|
||||
|
||||
#include "../../Common/FileStreams.h"
|
||||
#include "../../Common/StreamUtils.h"
|
||||
|
||||
#include "../LZMA/LZMADecoder.h"
|
||||
#include "../LZMA/LZMAEncoder.h"
|
||||
|
||||
#include "LzmaBenchCon.h"
|
||||
#include "LzmaRam.h"
|
||||
|
||||
#ifdef COMPRESS_MF_MT
|
||||
#include "../../../Windows/System.h"
|
||||
#endif
|
||||
|
||||
#include "../../MyVersion.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include "LzmaRamDecode.h"
|
||||
}
|
||||
|
||||
using namespace NCommandLineParser;
|
||||
|
||||
#ifdef _WIN32
|
||||
bool g_IsNT = false;
|
||||
static inline bool IsItWindowsNT()
|
||||
{
|
||||
OSVERSIONINFO versionInfo;
|
||||
versionInfo.dwOSVersionInfoSize = sizeof(versionInfo);
|
||||
if (!::GetVersionEx(&versionInfo))
|
||||
return false;
|
||||
return (versionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT);
|
||||
}
|
||||
#endif
|
||||
|
||||
static const char *kCantAllocate = "Can not allocate memory";
|
||||
static const char *kReadError = "Read error";
|
||||
static const char *kWriteError = "Write error";
|
||||
|
||||
namespace NKey {
|
||||
enum Enum
|
||||
{
|
||||
kHelp1 = 0,
|
||||
kHelp2,
|
||||
kMode,
|
||||
kDictionary,
|
||||
kFastBytes,
|
||||
kMatchFinderCycles,
|
||||
kLitContext,
|
||||
kLitPos,
|
||||
kPosBits,
|
||||
kMatchFinder,
|
||||
kMultiThread,
|
||||
kEOS,
|
||||
kStdIn,
|
||||
kStdOut,
|
||||
kFilter86
|
||||
};
|
||||
}
|
||||
|
||||
static const CSwitchForm kSwitchForms[] =
|
||||
{
|
||||
{ L"?", NSwitchType::kSimple, false },
|
||||
{ L"H", NSwitchType::kSimple, false },
|
||||
{ L"A", NSwitchType::kUnLimitedPostString, false, 1 },
|
||||
{ L"D", NSwitchType::kUnLimitedPostString, false, 1 },
|
||||
{ L"FB", NSwitchType::kUnLimitedPostString, false, 1 },
|
||||
{ L"MC", NSwitchType::kUnLimitedPostString, false, 1 },
|
||||
{ L"LC", NSwitchType::kUnLimitedPostString, false, 1 },
|
||||
{ L"LP", NSwitchType::kUnLimitedPostString, false, 1 },
|
||||
{ L"PB", NSwitchType::kUnLimitedPostString, false, 1 },
|
||||
{ L"MF", NSwitchType::kUnLimitedPostString, false, 1 },
|
||||
{ L"MT", NSwitchType::kUnLimitedPostString, false, 0 },
|
||||
{ L"EOS", NSwitchType::kSimple, false },
|
||||
{ L"SI", NSwitchType::kSimple, false },
|
||||
{ L"SO", NSwitchType::kSimple, false },
|
||||
{ L"F86", NSwitchType::kPostChar, false, 0, 0, L"+" }
|
||||
};
|
||||
|
||||
static const int kNumSwitches = sizeof(kSwitchForms) / sizeof(kSwitchForms[0]);
|
||||
|
||||
static void PrintHelp()
|
||||
{
|
||||
fprintf(stderr, "\nUsage: LZMA <e|d> inputFile outputFile [<switches>...]\n"
|
||||
" e: encode file\n"
|
||||
" d: decode file\n"
|
||||
" b: Benchmark\n"
|
||||
"<Switches>\n"
|
||||
" -a{N}: set compression mode - [0, 1], default: 1 (max)\n"
|
||||
" -d{N}: set dictionary - [0,30], default: 23 (8MB)\n"
|
||||
" -fb{N}: set number of fast bytes - [5, 273], default: 128\n"
|
||||
" -mc{N}: set number of cycles for match finder\n"
|
||||
" -lc{N}: set number of literal context bits - [0, 8], default: 3\n"
|
||||
" -lp{N}: set number of literal pos bits - [0, 4], default: 0\n"
|
||||
" -pb{N}: set number of pos bits - [0, 4], default: 2\n"
|
||||
" -mf{MF_ID}: set Match Finder: [bt2, bt3, bt4, hc4], default: bt4\n"
|
||||
" -mt{N}: set number of CPU threads\n"
|
||||
" -eos: write End Of Stream marker\n"
|
||||
" -si: read data from stdin\n"
|
||||
" -so: write data to stdout\n"
|
||||
);
|
||||
}
|
||||
|
||||
static void PrintHelpAndExit(const char *s)
|
||||
{
|
||||
fprintf(stderr, "\nError: %s\n\n", s);
|
||||
PrintHelp();
|
||||
throw -1;
|
||||
}
|
||||
|
||||
static void IncorrectCommand()
|
||||
{
|
||||
PrintHelpAndExit("Incorrect command");
|
||||
}
|
||||
|
||||
static void WriteArgumentsToStringList(int numArguments, const char *arguments[],
|
||||
UStringVector &strings)
|
||||
{
|
||||
for(int i = 1; i < numArguments; i++)
|
||||
strings.Add(MultiByteToUnicodeString(arguments[i]));
|
||||
}
|
||||
|
||||
static bool GetNumber(const wchar_t *s, UInt32 &value)
|
||||
{
|
||||
value = 0;
|
||||
if (MyStringLen(s) == 0)
|
||||
return false;
|
||||
const wchar_t *end;
|
||||
UInt64 res = ConvertStringToUInt64(s, &end);
|
||||
if (*end != L'\0')
|
||||
return false;
|
||||
if (res > 0xFFFFFFFF)
|
||||
return false;
|
||||
value = UInt32(res);
|
||||
return true;
|
||||
}
|
||||
|
||||
int main2(int n, const char *args[])
|
||||
{
|
||||
#ifdef _WIN32
|
||||
g_IsNT = IsItWindowsNT();
|
||||
#endif
|
||||
|
||||
fprintf(stderr, "\nLZMA " MY_VERSION_COPYRIGHT_DATE "\n");
|
||||
|
||||
if (n == 1)
|
||||
{
|
||||
PrintHelp();
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool unsupportedTypes = (sizeof(Byte) != 1 || sizeof(UInt32) < 4 || sizeof(UInt64) < 4);
|
||||
if (unsupportedTypes)
|
||||
{
|
||||
fprintf(stderr, "Unsupported base types. Edit Common/Types.h and recompile");
|
||||
return 1;
|
||||
}
|
||||
|
||||
UStringVector commandStrings;
|
||||
WriteArgumentsToStringList(n, args, commandStrings);
|
||||
CParser parser(kNumSwitches);
|
||||
try
|
||||
{
|
||||
parser.ParseStrings(kSwitchForms, commandStrings);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
IncorrectCommand();
|
||||
}
|
||||
|
||||
if(parser[NKey::kHelp1].ThereIs || parser[NKey::kHelp2].ThereIs)
|
||||
{
|
||||
PrintHelp();
|
||||
return 0;
|
||||
}
|
||||
const UStringVector &nonSwitchStrings = parser.NonSwitchStrings;
|
||||
|
||||
int paramIndex = 0;
|
||||
if (paramIndex >= nonSwitchStrings.Size())
|
||||
IncorrectCommand();
|
||||
const UString &command = nonSwitchStrings[paramIndex++];
|
||||
|
||||
bool dictionaryIsDefined = false;
|
||||
UInt32 dictionary = (UInt32)-1;
|
||||
if(parser[NKey::kDictionary].ThereIs)
|
||||
{
|
||||
UInt32 dicLog;
|
||||
if (!GetNumber(parser[NKey::kDictionary].PostStrings[0], dicLog))
|
||||
IncorrectCommand();
|
||||
dictionary = 1 << dicLog;
|
||||
dictionaryIsDefined = true;
|
||||
}
|
||||
UString mf = L"BT4";
|
||||
if (parser[NKey::kMatchFinder].ThereIs)
|
||||
mf = parser[NKey::kMatchFinder].PostStrings[0];
|
||||
|
||||
UInt32 numThreads = (UInt32)-1;
|
||||
|
||||
#ifdef COMPRESS_MF_MT
|
||||
if (parser[NKey::kMultiThread].ThereIs)
|
||||
{
|
||||
UInt32 numCPUs = NWindows::NSystem::GetNumberOfProcessors();
|
||||
const UString &s = parser[NKey::kMultiThread].PostStrings[0];
|
||||
if (s.IsEmpty())
|
||||
numThreads = numCPUs;
|
||||
else
|
||||
if (!GetNumber(s, numThreads))
|
||||
IncorrectCommand();
|
||||
}
|
||||
#endif
|
||||
|
||||
if (command.CompareNoCase(L"b") == 0)
|
||||
{
|
||||
const UInt32 kNumDefaultItereations = 1;
|
||||
UInt32 numIterations = kNumDefaultItereations;
|
||||
{
|
||||
if (paramIndex < nonSwitchStrings.Size())
|
||||
if (!GetNumber(nonSwitchStrings[paramIndex++], numIterations))
|
||||
numIterations = kNumDefaultItereations;
|
||||
}
|
||||
return LzmaBenchCon(stderr, numIterations, numThreads, dictionary);
|
||||
}
|
||||
|
||||
if (numThreads == (UInt32)-1)
|
||||
numThreads = 1;
|
||||
|
||||
bool encodeMode = false;
|
||||
if (command.CompareNoCase(L"e") == 0)
|
||||
encodeMode = true;
|
||||
else if (command.CompareNoCase(L"d") == 0)
|
||||
encodeMode = false;
|
||||
else
|
||||
IncorrectCommand();
|
||||
|
||||
bool stdInMode = parser[NKey::kStdIn].ThereIs;
|
||||
bool stdOutMode = parser[NKey::kStdOut].ThereIs;
|
||||
|
||||
CMyComPtr<ISequentialInStream> inStream;
|
||||
CInFileStream *inStreamSpec = 0;
|
||||
if (stdInMode)
|
||||
{
|
||||
inStream = new CStdInFileStream;
|
||||
MY_SET_BINARY_MODE(stdin);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (paramIndex >= nonSwitchStrings.Size())
|
||||
IncorrectCommand();
|
||||
const UString &inputName = nonSwitchStrings[paramIndex++];
|
||||
inStreamSpec = new CInFileStream;
|
||||
inStream = inStreamSpec;
|
||||
if (!inStreamSpec->Open(GetSystemString(inputName)))
|
||||
{
|
||||
fprintf(stderr, "\nError: can not open input file %s\n",
|
||||
(const char *)GetOemString(inputName));
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
CMyComPtr<ISequentialOutStream> outStream;
|
||||
COutFileStream *outStreamSpec = NULL;
|
||||
if (stdOutMode)
|
||||
{
|
||||
outStream = new CStdOutFileStream;
|
||||
MY_SET_BINARY_MODE(stdout);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (paramIndex >= nonSwitchStrings.Size())
|
||||
IncorrectCommand();
|
||||
const UString &outputName = nonSwitchStrings[paramIndex++];
|
||||
outStreamSpec = new COutFileStream;
|
||||
outStream = outStreamSpec;
|
||||
if (!outStreamSpec->Create(GetSystemString(outputName), true))
|
||||
{
|
||||
fprintf(stderr, "\nError: can not open output file %s\n",
|
||||
(const char *)GetOemString(outputName));
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (parser[NKey::kFilter86].ThereIs)
|
||||
{
|
||||
// -f86 switch is for x86 filtered mode: BCJ + LZMA.
|
||||
if (parser[NKey::kEOS].ThereIs || stdInMode)
|
||||
throw "Can not use stdin in this mode";
|
||||
UInt64 fileSize;
|
||||
inStreamSpec->File.GetLength(fileSize);
|
||||
if (fileSize > 0xF0000000)
|
||||
throw "File is too big";
|
||||
UInt32 inSize = (UInt32)fileSize;
|
||||
Byte *inBuffer = 0;
|
||||
if (inSize != 0)
|
||||
{
|
||||
inBuffer = (Byte *)MyAlloc((size_t)inSize);
|
||||
if (inBuffer == 0)
|
||||
throw kCantAllocate;
|
||||
}
|
||||
|
||||
UInt32 processedSize;
|
||||
if (ReadStream(inStream, inBuffer, (UInt32)inSize, &processedSize) != S_OK)
|
||||
throw "Can not read";
|
||||
if ((UInt32)inSize != processedSize)
|
||||
throw "Read size error";
|
||||
|
||||
Byte *outBuffer = 0;
|
||||
size_t outSizeProcessed;
|
||||
if (encodeMode)
|
||||
{
|
||||
// we allocate 105% of original size for output buffer
|
||||
size_t outSize = (size_t)fileSize / 20 * 21 + (1 << 16);
|
||||
if (outSize != 0)
|
||||
{
|
||||
outBuffer = (Byte *)MyAlloc((size_t)outSize);
|
||||
if (outBuffer == 0)
|
||||
throw kCantAllocate;
|
||||
}
|
||||
if (!dictionaryIsDefined)
|
||||
dictionary = 1 << 23;
|
||||
int res = LzmaRamEncode(inBuffer, inSize, outBuffer, outSize, &outSizeProcessed,
|
||||
dictionary, parser[NKey::kFilter86].PostCharIndex == 0 ? SZ_FILTER_YES : SZ_FILTER_AUTO);
|
||||
if (res != 0)
|
||||
{
|
||||
fprintf(stderr, "\nEncoder error = %d\n", (int)res);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t outSize;
|
||||
if (LzmaRamGetUncompressedSize(inBuffer, inSize, &outSize) != 0)
|
||||
throw "data error";
|
||||
if (outSize != 0)
|
||||
{
|
||||
outBuffer = (Byte *)MyAlloc(outSize);
|
||||
if (outBuffer == 0)
|
||||
throw kCantAllocate;
|
||||
}
|
||||
int res = LzmaRamDecompress(inBuffer, inSize, outBuffer, outSize, &outSizeProcessed, malloc, free);
|
||||
if (res != 0)
|
||||
throw "LzmaDecoder error";
|
||||
}
|
||||
if (WriteStream(outStream, outBuffer, (UInt32)outSizeProcessed, &processedSize) != S_OK)
|
||||
throw kWriteError;
|
||||
MyFree(outBuffer);
|
||||
MyFree(inBuffer);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
UInt64 fileSize;
|
||||
if (encodeMode)
|
||||
{
|
||||
NCompress::NLZMA::CEncoder *encoderSpec = new NCompress::NLZMA::CEncoder;
|
||||
CMyComPtr<ICompressCoder> encoder = encoderSpec;
|
||||
|
||||
if (!dictionaryIsDefined)
|
||||
dictionary = 1 << 23;
|
||||
|
||||
UInt32 posStateBits = 2;
|
||||
UInt32 litContextBits = 3; // for normal files
|
||||
// UInt32 litContextBits = 0; // for 32-bit data
|
||||
UInt32 litPosBits = 0;
|
||||
// UInt32 litPosBits = 2; // for 32-bit data
|
||||
UInt32 algorithm = 1;
|
||||
UInt32 numFastBytes = 128;
|
||||
UInt32 matchFinderCycles = 16 + numFastBytes / 2;
|
||||
bool matchFinderCyclesDefined = false;
|
||||
|
||||
bool eos = parser[NKey::kEOS].ThereIs || stdInMode;
|
||||
|
||||
if(parser[NKey::kMode].ThereIs)
|
||||
if (!GetNumber(parser[NKey::kMode].PostStrings[0], algorithm))
|
||||
IncorrectCommand();
|
||||
|
||||
if(parser[NKey::kFastBytes].ThereIs)
|
||||
if (!GetNumber(parser[NKey::kFastBytes].PostStrings[0], numFastBytes))
|
||||
IncorrectCommand();
|
||||
matchFinderCyclesDefined = parser[NKey::kMatchFinderCycles].ThereIs;
|
||||
if (matchFinderCyclesDefined)
|
||||
if (!GetNumber(parser[NKey::kMatchFinderCycles].PostStrings[0], matchFinderCycles))
|
||||
IncorrectCommand();
|
||||
if(parser[NKey::kLitContext].ThereIs)
|
||||
if (!GetNumber(parser[NKey::kLitContext].PostStrings[0], litContextBits))
|
||||
IncorrectCommand();
|
||||
if(parser[NKey::kLitPos].ThereIs)
|
||||
if (!GetNumber(parser[NKey::kLitPos].PostStrings[0], litPosBits))
|
||||
IncorrectCommand();
|
||||
if(parser[NKey::kPosBits].ThereIs)
|
||||
if (!GetNumber(parser[NKey::kPosBits].PostStrings[0], posStateBits))
|
||||
IncorrectCommand();
|
||||
|
||||
PROPID propIDs[] =
|
||||
{
|
||||
NCoderPropID::kDictionarySize,
|
||||
NCoderPropID::kPosStateBits,
|
||||
NCoderPropID::kLitContextBits,
|
||||
NCoderPropID::kLitPosBits,
|
||||
NCoderPropID::kAlgorithm,
|
||||
NCoderPropID::kNumFastBytes,
|
||||
NCoderPropID::kMatchFinder,
|
||||
NCoderPropID::kEndMarker,
|
||||
NCoderPropID::kNumThreads,
|
||||
NCoderPropID::kMatchFinderCycles,
|
||||
};
|
||||
const int kNumPropsMax = sizeof(propIDs) / sizeof(propIDs[0]);
|
||||
|
||||
PROPVARIANT properties[kNumPropsMax];
|
||||
for (int p = 0; p < 6; p++)
|
||||
properties[p].vt = VT_UI4;
|
||||
|
||||
properties[0].ulVal = (UInt32)dictionary;
|
||||
properties[1].ulVal = (UInt32)posStateBits;
|
||||
properties[2].ulVal = (UInt32)litContextBits;
|
||||
properties[3].ulVal = (UInt32)litPosBits;
|
||||
properties[4].ulVal = (UInt32)algorithm;
|
||||
properties[5].ulVal = (UInt32)numFastBytes;
|
||||
|
||||
properties[6].vt = VT_BSTR;
|
||||
properties[6].bstrVal = (BSTR)(const wchar_t *)mf;
|
||||
|
||||
properties[7].vt = VT_BOOL;
|
||||
properties[7].boolVal = eos ? VARIANT_TRUE : VARIANT_FALSE;
|
||||
|
||||
properties[8].vt = VT_UI4;
|
||||
properties[8].ulVal = (UInt32)numThreads;
|
||||
|
||||
// it must be last in property list
|
||||
properties[9].vt = VT_UI4;
|
||||
properties[9].ulVal = (UInt32)matchFinderCycles;
|
||||
|
||||
int numProps = kNumPropsMax;
|
||||
if (!matchFinderCyclesDefined)
|
||||
numProps--;
|
||||
|
||||
if (encoderSpec->SetCoderProperties(propIDs, properties, numProps) != S_OK)
|
||||
IncorrectCommand();
|
||||
encoderSpec->WriteCoderProperties(outStream);
|
||||
|
||||
if (eos || stdInMode)
|
||||
fileSize = (UInt64)(Int64)-1;
|
||||
else
|
||||
inStreamSpec->File.GetLength(fileSize);
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
Byte b = Byte(fileSize >> (8 * i));
|
||||
if (outStream->Write(&b, 1, 0) != S_OK)
|
||||
{
|
||||
fprintf(stderr, kWriteError);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
HRESULT result = encoder->Code(inStream, outStream, 0, 0, 0);
|
||||
if (result == E_OUTOFMEMORY)
|
||||
{
|
||||
fprintf(stderr, "\nError: Can not allocate memory\n");
|
||||
return 1;
|
||||
}
|
||||
else if (result != S_OK)
|
||||
{
|
||||
fprintf(stderr, "\nEncoder error = %X\n", (unsigned int)result);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
NCompress::NLZMA::CDecoder *decoderSpec = new NCompress::NLZMA::CDecoder;
|
||||
CMyComPtr<ICompressCoder> decoder = decoderSpec;
|
||||
const UInt32 kPropertiesSize = 5;
|
||||
Byte properties[kPropertiesSize];
|
||||
UInt32 processedSize;
|
||||
if (ReadStream(inStream, properties, kPropertiesSize, &processedSize) != S_OK)
|
||||
{
|
||||
fprintf(stderr, kReadError);
|
||||
return 1;
|
||||
}
|
||||
if (processedSize != kPropertiesSize)
|
||||
{
|
||||
fprintf(stderr, kReadError);
|
||||
return 1;
|
||||
}
|
||||
if (decoderSpec->SetDecoderProperties2(properties, kPropertiesSize) != S_OK)
|
||||
{
|
||||
fprintf(stderr, "SetDecoderProperties error");
|
||||
return 1;
|
||||
}
|
||||
fileSize = 0;
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
Byte b;
|
||||
if (inStream->Read(&b, 1, &processedSize) != S_OK)
|
||||
{
|
||||
fprintf(stderr, kReadError);
|
||||
return 1;
|
||||
}
|
||||
if (processedSize != 1)
|
||||
{
|
||||
fprintf(stderr, kReadError);
|
||||
return 1;
|
||||
}
|
||||
fileSize |= ((UInt64)b) << (8 * i);
|
||||
}
|
||||
if (decoder->Code(inStream, outStream, 0, &fileSize, 0) != S_OK)
|
||||
{
|
||||
fprintf(stderr, "Decoder error");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
if (outStreamSpec != NULL)
|
||||
{
|
||||
if (outStreamSpec->Close() != S_OK)
|
||||
{
|
||||
fprintf(stderr, "File closing error");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int n, const char *args[])
|
||||
{
|
||||
try { return main2(n, args); }
|
||||
catch(const char *s)
|
||||
{
|
||||
fprintf(stderr, "\nError: %s\n", s);
|
||||
return 1;
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
fprintf(stderr, "\nError\n");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,48 @@
|
||||
// LzmaBench.h
|
||||
|
||||
#ifndef __LZMABENCH_H
|
||||
#define __LZMABENCH_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include "../../../Common/Types.h"
|
||||
#ifdef EXTERNAL_LZMA
|
||||
#include "../../UI/Common/LoadCodecs.h"
|
||||
#endif
|
||||
|
||||
struct CBenchInfo
|
||||
{
|
||||
UInt64 GlobalTime;
|
||||
UInt64 GlobalFreq;
|
||||
UInt64 UserTime;
|
||||
UInt64 UserFreq;
|
||||
UInt64 UnpackSize;
|
||||
UInt64 PackSize;
|
||||
UInt32 NumIterations;
|
||||
CBenchInfo(): NumIterations(0) {}
|
||||
};
|
||||
|
||||
struct IBenchCallback
|
||||
{
|
||||
virtual HRESULT SetEncodeResult(const CBenchInfo &info, bool final) = 0;
|
||||
virtual HRESULT SetDecodeResult(const CBenchInfo &info, bool final) = 0;
|
||||
};
|
||||
|
||||
UInt64 GetUsage(const CBenchInfo &benchOnfo);
|
||||
UInt64 GetRatingPerUsage(const CBenchInfo &info, UInt64 rating);
|
||||
UInt64 GetCompressRating(UInt32 dictionarySize, UInt64 elapsedTime, UInt64 freq, UInt64 size);
|
||||
UInt64 GetDecompressRating(UInt64 elapsedTime, UInt64 freq, UInt64 outSize, UInt64 inSize, UInt32 numIterations);
|
||||
|
||||
HRESULT LzmaBench(
|
||||
#ifdef EXTERNAL_LZMA
|
||||
CCodecs *codecs,
|
||||
#endif
|
||||
UInt32 numThreads, UInt32 dictionarySize, IBenchCallback *callback);
|
||||
|
||||
const int kBenchMinDicLogSize = 18;
|
||||
|
||||
UInt64 GetBenchMemoryUsage(UInt32 numThreads, UInt32 dictionary);
|
||||
|
||||
bool CrcInternalTest();
|
||||
HRESULT CrcBench(UInt32 numThreads, UInt32 bufferSize, UInt64 &speed);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,311 @@
|
||||
// LzmaBenchCon.cpp
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "LzmaBench.h"
|
||||
#include "LzmaBenchCon.h"
|
||||
#include "../../../Common/IntToString.h"
|
||||
|
||||
#if defined(BENCH_MT) || defined(_WIN32)
|
||||
#include "../../../Windows/System.h"
|
||||
#endif
|
||||
|
||||
#ifdef BREAK_HANDLER
|
||||
#include "../../UI/Console/ConsoleClose.h"
|
||||
#endif
|
||||
#include "../../../Common/MyCom.h"
|
||||
|
||||
struct CTotalBenchRes
|
||||
{
|
||||
UInt64 NumIterations;
|
||||
UInt64 Rating;
|
||||
UInt64 Usage;
|
||||
UInt64 RPU;
|
||||
void Init() { NumIterations = 0; Rating = 0; Usage = 0; RPU = 0; }
|
||||
void Normalize()
|
||||
{
|
||||
if (NumIterations == 0)
|
||||
return;
|
||||
Rating /= NumIterations;
|
||||
Usage /= NumIterations;
|
||||
RPU /= NumIterations;
|
||||
NumIterations = 1;
|
||||
}
|
||||
void SetMid(const CTotalBenchRes &r1, const CTotalBenchRes &r2)
|
||||
{
|
||||
Rating = (r1.Rating + r2.Rating) / 2;
|
||||
Usage = (r1.Usage + r2.Usage) / 2;
|
||||
RPU = (r1.RPU + r2.RPU) / 2;
|
||||
NumIterations = (r1.NumIterations + r2.NumIterations) / 2;
|
||||
}
|
||||
};
|
||||
|
||||
struct CBenchCallback: public IBenchCallback
|
||||
{
|
||||
CTotalBenchRes EncodeRes;
|
||||
CTotalBenchRes DecodeRes;
|
||||
FILE *f;
|
||||
void Init() { EncodeRes.Init(); DecodeRes.Init(); }
|
||||
void Normalize() { EncodeRes.Normalize(); DecodeRes.Normalize(); }
|
||||
UInt32 dictionarySize;
|
||||
HRESULT SetEncodeResult(const CBenchInfo &info, bool final);
|
||||
HRESULT SetDecodeResult(const CBenchInfo &info, bool final);
|
||||
};
|
||||
|
||||
static void NormalizeVals(UInt64 &v1, UInt64 &v2)
|
||||
{
|
||||
while (v1 > 1000000)
|
||||
{
|
||||
v1 >>= 1;
|
||||
v2 >>= 1;
|
||||
}
|
||||
}
|
||||
|
||||
static UInt64 MyMultDiv64(UInt64 value, UInt64 elapsedTime, UInt64 freq)
|
||||
{
|
||||
UInt64 elTime = elapsedTime;
|
||||
NormalizeVals(freq, elTime);
|
||||
if (elTime == 0)
|
||||
elTime = 1;
|
||||
return value * freq / elTime;
|
||||
}
|
||||
|
||||
static void PrintNumber(FILE *f, UInt64 value, int size)
|
||||
{
|
||||
char s[32];
|
||||
ConvertUInt64ToString(value, s);
|
||||
fprintf(f, " ");
|
||||
for (int len = (int)strlen(s); len < size; len++)
|
||||
fprintf(f, " ");
|
||||
fprintf(f, "%s", s);
|
||||
}
|
||||
|
||||
static void PrintRating(FILE *f, UInt64 rating)
|
||||
{
|
||||
PrintNumber(f, rating / 1000000, 6);
|
||||
}
|
||||
|
||||
static void PrintResults(FILE *f, UInt64 usage, UInt64 rpu, UInt64 rating)
|
||||
{
|
||||
PrintNumber(f, (usage + 5000) / 10000, 5);
|
||||
PrintRating(f, rpu);
|
||||
PrintRating(f, rating);
|
||||
}
|
||||
|
||||
|
||||
static void PrintResults(FILE *f, const CBenchInfo &info, UInt64 rating, CTotalBenchRes &res)
|
||||
{
|
||||
UInt64 speed = MyMultDiv64(info.UnpackSize, info.GlobalTime, info.GlobalFreq);
|
||||
PrintNumber(f, speed / 1024, 7);
|
||||
UInt64 usage = GetUsage(info);
|
||||
UInt64 rpu = GetRatingPerUsage(info, rating);
|
||||
PrintResults(f, usage, rpu, rating);
|
||||
res.NumIterations++;
|
||||
res.RPU += rpu;
|
||||
res.Rating += rating;
|
||||
res.Usage += usage;
|
||||
}
|
||||
|
||||
static void PrintTotals(FILE *f, const CTotalBenchRes &res)
|
||||
{
|
||||
fprintf(f, " ");
|
||||
PrintResults(f, res.Usage, res.RPU, res.Rating);
|
||||
}
|
||||
|
||||
|
||||
HRESULT CBenchCallback::SetEncodeResult(const CBenchInfo &info, bool final)
|
||||
{
|
||||
#ifdef BREAK_HANDLER
|
||||
if (NConsoleClose::TestBreakSignal())
|
||||
return E_ABORT;
|
||||
#endif
|
||||
|
||||
if (final)
|
||||
{
|
||||
UInt64 rating = GetCompressRating(dictionarySize, info.GlobalTime, info.GlobalFreq, info.UnpackSize);
|
||||
PrintResults(f, info, rating, EncodeRes);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static const char *kSep = " | ";
|
||||
|
||||
|
||||
HRESULT CBenchCallback::SetDecodeResult(const CBenchInfo &info, bool final)
|
||||
{
|
||||
#ifdef BREAK_HANDLER
|
||||
if (NConsoleClose::TestBreakSignal())
|
||||
return E_ABORT;
|
||||
#endif
|
||||
if (final)
|
||||
{
|
||||
UInt64 rating = GetDecompressRating(info.GlobalTime, info.GlobalFreq, info.UnpackSize, info.PackSize, info.NumIterations);
|
||||
fprintf(f, kSep);
|
||||
CBenchInfo info2 = info;
|
||||
info2.UnpackSize *= info2.NumIterations;
|
||||
info2.PackSize *= info2.NumIterations;
|
||||
info2.NumIterations = 1;
|
||||
PrintResults(f, info2, rating, DecodeRes);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static void PrintRequirements(FILE *f, const char *sizeString, UInt64 size, const char *threadsString, UInt32 numThreads)
|
||||
{
|
||||
fprintf(f, "\nRAM %s ", sizeString);
|
||||
PrintNumber(f, (size >> 20), 5);
|
||||
fprintf(f, " MB, # %s %3d", threadsString, (unsigned int)numThreads);
|
||||
}
|
||||
|
||||
HRESULT LzmaBenchCon(
|
||||
#ifdef EXTERNAL_LZMA
|
||||
CCodecs *codecs,
|
||||
#endif
|
||||
FILE *f, UInt32 numIterations, UInt32 numThreads, UInt32 dictionary)
|
||||
{
|
||||
if (!CrcInternalTest())
|
||||
return S_FALSE;
|
||||
#ifdef BENCH_MT
|
||||
UInt64 ramSize = NWindows::NSystem::GetRamSize(); //
|
||||
UInt32 numCPUs = NWindows::NSystem::GetNumberOfProcessors();
|
||||
PrintRequirements(f, "size: ", ramSize, "CPU hardware threads:", numCPUs);
|
||||
if (numThreads == (UInt32)-1)
|
||||
numThreads = numCPUs;
|
||||
if (numThreads > 1)
|
||||
numThreads &= ~1;
|
||||
if (dictionary == (UInt32)-1)
|
||||
{
|
||||
int dicSizeLog;
|
||||
for (dicSizeLog = 25; dicSizeLog > kBenchMinDicLogSize; dicSizeLog--)
|
||||
if (GetBenchMemoryUsage(numThreads, ((UInt32)1 << dicSizeLog)) + (8 << 20) <= ramSize)
|
||||
break;
|
||||
dictionary = (1 << dicSizeLog);
|
||||
}
|
||||
#else
|
||||
if (dictionary == (UInt32)-1)
|
||||
dictionary = (1 << 22);
|
||||
numThreads = 1;
|
||||
#endif
|
||||
|
||||
PrintRequirements(f, "usage:", GetBenchMemoryUsage(numThreads, dictionary), "Benchmark threads: ", numThreads);
|
||||
|
||||
CBenchCallback callback;
|
||||
callback.Init();
|
||||
callback.f = f;
|
||||
|
||||
fprintf(f, "\n\nDict Compressing | Decompressing\n ");
|
||||
int j;
|
||||
for (j = 0; j < 2; j++)
|
||||
{
|
||||
fprintf(f, " Speed Usage R/U Rating");
|
||||
if (j == 0)
|
||||
fprintf(f, kSep);
|
||||
}
|
||||
fprintf(f, "\n ");
|
||||
for (j = 0; j < 2; j++)
|
||||
{
|
||||
fprintf(f, " KB/s %% MIPS MIPS");
|
||||
if (j == 0)
|
||||
fprintf(f, kSep);
|
||||
}
|
||||
fprintf(f, "\n\n");
|
||||
for (UInt32 i = 0; i < numIterations; i++)
|
||||
{
|
||||
const int kStartDicLog = 22;
|
||||
int pow = (dictionary < ((UInt32)1 << kStartDicLog)) ? kBenchMinDicLogSize : kStartDicLog;
|
||||
while (((UInt32)1 << pow) > dictionary)
|
||||
pow--;
|
||||
for (; ((UInt32)1 << pow) <= dictionary; pow++)
|
||||
{
|
||||
fprintf(f, "%2d:", pow);
|
||||
callback.dictionarySize = (UInt32)1 << pow;
|
||||
HRESULT res = LzmaBench(
|
||||
#ifdef EXTERNAL_LZMA
|
||||
codecs,
|
||||
#endif
|
||||
numThreads, callback.dictionarySize, &callback);
|
||||
fprintf(f, "\n");
|
||||
RINOK(res);
|
||||
}
|
||||
}
|
||||
callback.Normalize();
|
||||
fprintf(f, "----------------------------------------------------------------\nAvr:");
|
||||
PrintTotals(f, callback.EncodeRes);
|
||||
fprintf(f, " ");
|
||||
PrintTotals(f, callback.DecodeRes);
|
||||
fprintf(f, "\nTot:");
|
||||
CTotalBenchRes midRes;
|
||||
midRes.SetMid(callback.EncodeRes, callback.DecodeRes);
|
||||
PrintTotals(f, midRes);
|
||||
fprintf(f, "\n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
struct CTempValues
|
||||
{
|
||||
UInt64 *Values;
|
||||
CTempValues(UInt32 num) { Values = new UInt64[num]; }
|
||||
~CTempValues() { delete []Values; }
|
||||
};
|
||||
|
||||
HRESULT CrcBenchCon(FILE *f, UInt32 numIterations, UInt32 numThreads, UInt32 dictionary)
|
||||
{
|
||||
if (!CrcInternalTest())
|
||||
return S_FALSE;
|
||||
|
||||
#ifdef BENCH_MT
|
||||
UInt64 ramSize = NWindows::NSystem::GetRamSize();
|
||||
UInt32 numCPUs = NWindows::NSystem::GetNumberOfProcessors();
|
||||
PrintRequirements(f, "size: ", ramSize, "CPU hardware threads:", numCPUs);
|
||||
if (numThreads == (UInt32)-1)
|
||||
numThreads = numCPUs;
|
||||
#else
|
||||
numThreads = 1;
|
||||
#endif
|
||||
if (dictionary == (UInt32)-1)
|
||||
dictionary = (1 << 24);
|
||||
|
||||
CTempValues speedTotals(numThreads);
|
||||
fprintf(f, "\n\nSize");
|
||||
for (UInt32 ti = 0; ti < numThreads; ti++)
|
||||
{
|
||||
fprintf(f, " %5d", ti + 1);
|
||||
speedTotals.Values[ti] = 0;
|
||||
}
|
||||
fprintf(f, "\n\n");
|
||||
|
||||
UInt64 numSteps = 0;
|
||||
for (UInt32 i = 0; i < numIterations; i++)
|
||||
{
|
||||
for (int pow = 10; pow < 32; pow++)
|
||||
{
|
||||
UInt32 bufSize = (UInt32)1 << pow;
|
||||
if (bufSize > dictionary)
|
||||
break;
|
||||
fprintf(f, "%2d: ", pow);
|
||||
UInt64 speed;
|
||||
for (UInt32 ti = 0; ti < numThreads; ti++)
|
||||
{
|
||||
#ifdef BREAK_HANDLER
|
||||
if (NConsoleClose::TestBreakSignal())
|
||||
return E_ABORT;
|
||||
#endif
|
||||
RINOK(CrcBench(ti + 1, bufSize, speed));
|
||||
PrintNumber(f, (speed >> 20), 5);
|
||||
speedTotals.Values[ti] += speed;
|
||||
}
|
||||
fprintf(f, "\n");
|
||||
numSteps++;
|
||||
}
|
||||
}
|
||||
if (numSteps != 0)
|
||||
{
|
||||
fprintf(f, "\nAvg:");
|
||||
for (UInt32 ti = 0; ti < numThreads; ti++)
|
||||
PrintNumber(f, ((speedTotals.Values[ti] / numSteps) >> 20), 5);
|
||||
fprintf(f, "\n");
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
// LzmaBenchCon.h
|
||||
|
||||
#ifndef __LZMABENCHCON_H
|
||||
#define __LZMABENCHCON_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include "../../../Common/Types.h"
|
||||
#ifdef EXTERNAL_LZMA
|
||||
#include "../../UI/Common/LoadCodecs.h"
|
||||
#endif
|
||||
HRESULT LzmaBenchCon(
|
||||
#ifdef EXTERNAL_LZMA
|
||||
CCodecs *codecs,
|
||||
#endif
|
||||
FILE *f, UInt32 numIterations, UInt32 numThreads, UInt32 dictionary);
|
||||
|
||||
HRESULT CrcBenchCon(FILE *f, UInt32 numIterations, UInt32 numThreads, UInt32 dictionary);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,226 @@
|
||||
// LzmaRam.cpp
|
||||
|
||||
#include "StdAfx.h"
|
||||
#include "../../../Common/Types.h"
|
||||
#include "../LZMA/LZMADecoder.h"
|
||||
#include "../LZMA/LZMAEncoder.h"
|
||||
#include "LzmaRam.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include "../../../../C/Compress/Branch/BranchX86.h"
|
||||
}
|
||||
|
||||
class CInStreamRam:
|
||||
public ISequentialInStream,
|
||||
public CMyUnknownImp
|
||||
{
|
||||
const Byte *Data;
|
||||
size_t Size;
|
||||
size_t Pos;
|
||||
public:
|
||||
MY_UNKNOWN_IMP
|
||||
void Init(const Byte *data, size_t size)
|
||||
{
|
||||
Data = data;
|
||||
Size = size;
|
||||
Pos = 0;
|
||||
}
|
||||
STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
|
||||
};
|
||||
|
||||
STDMETHODIMP CInStreamRam::Read(void *data, UInt32 size, UInt32 *processedSize)
|
||||
{
|
||||
if (size > (Size - Pos))
|
||||
size = (UInt32)(Size - Pos);
|
||||
for (UInt32 i = 0; i < size; i++)
|
||||
((Byte *)data)[i] = Data[Pos + i];
|
||||
Pos += size;
|
||||
if(processedSize != NULL)
|
||||
*processedSize = size;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
class COutStreamRam:
|
||||
public ISequentialOutStream,
|
||||
public CMyUnknownImp
|
||||
{
|
||||
size_t Size;
|
||||
public:
|
||||
Byte *Data;
|
||||
size_t Pos;
|
||||
bool Overflow;
|
||||
void Init(Byte *data, size_t size)
|
||||
{
|
||||
Data = data;
|
||||
Size = size;
|
||||
Pos = 0;
|
||||
Overflow = false;
|
||||
}
|
||||
void SetPos(size_t pos)
|
||||
{
|
||||
Overflow = false;
|
||||
Pos = pos;
|
||||
}
|
||||
MY_UNKNOWN_IMP
|
||||
HRESULT WriteByte(Byte b)
|
||||
{
|
||||
if (Pos >= Size)
|
||||
{
|
||||
Overflow = true;
|
||||
return E_FAIL;
|
||||
}
|
||||
Data[Pos++] = b;
|
||||
return S_OK;
|
||||
}
|
||||
STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
|
||||
};
|
||||
|
||||
STDMETHODIMP COutStreamRam::Write(const void *data, UInt32 size, UInt32 *processedSize)
|
||||
{
|
||||
UInt32 i;
|
||||
for (i = 0; i < size && Pos < Size; i++)
|
||||
Data[Pos++] = ((const Byte *)data)[i];
|
||||
if(processedSize != NULL)
|
||||
*processedSize = i;
|
||||
if (i != size)
|
||||
{
|
||||
Overflow = true;
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
#define SZ_RAM_E_FAIL (1)
|
||||
#define SZ_RAM_E_OUTOFMEMORY (2)
|
||||
#define SZE_OUT_OVERFLOW (3)
|
||||
|
||||
int LzmaRamEncode(
|
||||
const Byte *inBuffer, size_t inSize,
|
||||
Byte *outBuffer, size_t outSize, size_t *outSizeProcessed,
|
||||
UInt32 dictionarySize, ESzFilterMode filterMode)
|
||||
{
|
||||
#ifndef _NO_EXCEPTIONS
|
||||
try {
|
||||
#endif
|
||||
|
||||
*outSizeProcessed = 0;
|
||||
const size_t kIdSize = 1;
|
||||
const size_t kLzmaPropsSize = 5;
|
||||
const size_t kMinDestSize = kIdSize + kLzmaPropsSize + 8;
|
||||
if (outSize < kMinDestSize)
|
||||
return SZE_OUT_OVERFLOW;
|
||||
NCompress::NLZMA::CEncoder *encoderSpec = new NCompress::NLZMA::CEncoder;
|
||||
CMyComPtr<ICompressCoder> encoder = encoderSpec;
|
||||
|
||||
PROPID propIDs[] =
|
||||
{
|
||||
NCoderPropID::kAlgorithm,
|
||||
NCoderPropID::kDictionarySize,
|
||||
NCoderPropID::kNumFastBytes,
|
||||
};
|
||||
const int kNumProps = sizeof(propIDs) / sizeof(propIDs[0]);
|
||||
PROPVARIANT properties[kNumProps];
|
||||
properties[0].vt = VT_UI4;
|
||||
properties[1].vt = VT_UI4;
|
||||
properties[2].vt = VT_UI4;
|
||||
properties[0].ulVal = (UInt32)2;
|
||||
properties[1].ulVal = (UInt32)dictionarySize;
|
||||
properties[2].ulVal = (UInt32)64;
|
||||
|
||||
if (encoderSpec->SetCoderProperties(propIDs, properties, kNumProps) != S_OK)
|
||||
return 1;
|
||||
|
||||
COutStreamRam *outStreamSpec = new COutStreamRam;
|
||||
if (outStreamSpec == 0)
|
||||
return SZ_RAM_E_OUTOFMEMORY;
|
||||
CMyComPtr<ISequentialOutStream> outStream = outStreamSpec;
|
||||
CInStreamRam *inStreamSpec = new CInStreamRam;
|
||||
if (inStreamSpec == 0)
|
||||
return SZ_RAM_E_OUTOFMEMORY;
|
||||
CMyComPtr<ISequentialInStream> inStream = inStreamSpec;
|
||||
|
||||
outStreamSpec->Init(outBuffer, outSize);
|
||||
if (outStreamSpec->WriteByte(0) != S_OK)
|
||||
return SZE_OUT_OVERFLOW;
|
||||
|
||||
if (encoderSpec->WriteCoderProperties(outStream) != S_OK)
|
||||
return SZE_OUT_OVERFLOW;
|
||||
if (outStreamSpec->Pos != kIdSize + kLzmaPropsSize)
|
||||
return 1;
|
||||
|
||||
int i;
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
UInt64 t = (UInt64)(inSize);
|
||||
if (outStreamSpec->WriteByte((Byte)((t) >> (8 * i))) != S_OK)
|
||||
return SZE_OUT_OVERFLOW;
|
||||
}
|
||||
|
||||
Byte *filteredStream = 0;
|
||||
|
||||
bool useFilter = (filterMode != SZ_FILTER_NO);
|
||||
if (useFilter)
|
||||
{
|
||||
if (inSize != 0)
|
||||
{
|
||||
filteredStream = (Byte *)MyAlloc(inSize);
|
||||
if (filteredStream == 0)
|
||||
return SZ_RAM_E_OUTOFMEMORY;
|
||||
memmove(filteredStream, inBuffer, inSize);
|
||||
}
|
||||
UInt32 x86State;
|
||||
x86_Convert_Init(x86State);
|
||||
x86_Convert(filteredStream, (SizeT)inSize, 0, &x86State, 1);
|
||||
}
|
||||
|
||||
size_t minSize = 0;
|
||||
int numPasses = (filterMode == SZ_FILTER_AUTO) ? 3 : 1;
|
||||
bool bestIsFiltered = false;
|
||||
int mainResult = 0;
|
||||
size_t startPos = outStreamSpec->Pos;
|
||||
for (i = 0; i < numPasses; i++)
|
||||
{
|
||||
if (numPasses > 1 && i == numPasses - 1 && !bestIsFiltered)
|
||||
break;
|
||||
outStreamSpec->SetPos(startPos);
|
||||
bool curModeIsFiltered = false;
|
||||
if (useFilter && i == 0)
|
||||
curModeIsFiltered = true;
|
||||
if (numPasses > 1 && i == numPasses - 1)
|
||||
curModeIsFiltered = true;
|
||||
|
||||
inStreamSpec->Init(curModeIsFiltered ? filteredStream : inBuffer, inSize);
|
||||
|
||||
HRESULT lzmaResult = encoder->Code(inStream, outStream, 0, 0, 0);
|
||||
|
||||
mainResult = 0;
|
||||
if (lzmaResult == E_OUTOFMEMORY)
|
||||
{
|
||||
mainResult = SZ_RAM_E_OUTOFMEMORY;
|
||||
break;
|
||||
}
|
||||
if (i == 0 || outStreamSpec->Pos <= minSize)
|
||||
{
|
||||
minSize = outStreamSpec->Pos;
|
||||
bestIsFiltered = curModeIsFiltered;
|
||||
}
|
||||
if (outStreamSpec->Overflow)
|
||||
mainResult = SZE_OUT_OVERFLOW;
|
||||
else if (lzmaResult != S_OK)
|
||||
{
|
||||
mainResult = SZ_RAM_E_FAIL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
*outSizeProcessed = outStreamSpec->Pos;
|
||||
if (bestIsFiltered)
|
||||
outBuffer[0] = 1;
|
||||
if (useFilter)
|
||||
MyFree(filteredStream);
|
||||
return mainResult;
|
||||
|
||||
#ifndef _NO_EXCEPTIONS
|
||||
} catch(...) { return SZ_RAM_E_OUTOFMEMORY; }
|
||||
#endif
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
// LzmaRam.h
|
||||
|
||||
#ifndef __LzmaRam_h
|
||||
#define __LzmaRam_h
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "../../../Common/Types.h"
|
||||
|
||||
/*
|
||||
LzmaRamEncode: BCJ + LZMA RAM->RAM compressing.
|
||||
It uses .lzma format, but it writes one additional byte to .lzma file:
|
||||
0: - no filter
|
||||
1: - x86(BCJ) filter.
|
||||
|
||||
To provide best compression ratio dictionarySize mustbe >= inSize
|
||||
|
||||
LzmaRamEncode allocates Data with MyAlloc/BigAlloc functions.
|
||||
RAM Requirements:
|
||||
RamSize = dictionarySize * 9.5 + 6MB + FilterBlockSize
|
||||
FilterBlockSize = 0, if useFilter == false
|
||||
FilterBlockSize = inSize, if useFilter == true
|
||||
|
||||
Return code:
|
||||
0 - OK
|
||||
1 - Unspecified Error
|
||||
2 - Memory allocating error
|
||||
3 - Output buffer OVERFLOW
|
||||
|
||||
If you use SZ_FILTER_AUTO mode, then encoder will use 2 or 3 passes:
|
||||
2 passes when FILTER_NO provides better compression.
|
||||
3 passes when FILTER_YES provides better compression.
|
||||
*/
|
||||
|
||||
enum ESzFilterMode
|
||||
{
|
||||
SZ_FILTER_NO,
|
||||
SZ_FILTER_YES,
|
||||
SZ_FILTER_AUTO
|
||||
};
|
||||
|
||||
int LzmaRamEncode(
|
||||
const Byte *inBuffer, size_t inSize,
|
||||
Byte *outBuffer, size_t outSize, size_t *outSizeProcessed,
|
||||
UInt32 dictionarySize, ESzFilterMode filterMode);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,78 @@
|
||||
/* LzmaRamDecode.c */
|
||||
|
||||
#include "LzmaRamDecode.h"
|
||||
#ifdef _SZ_ONE_DIRECTORY
|
||||
#include "LzmaDecode.h"
|
||||
#include "BranchX86.h"
|
||||
#else
|
||||
#include "../../../../C/Compress/Lzma/LzmaDecode.h"
|
||||
#include "../../../../C/Compress/Branch/BranchX86.h"
|
||||
#endif
|
||||
|
||||
#define LZMA_PROPS_SIZE 14
|
||||
#define LZMA_SIZE_OFFSET 6
|
||||
|
||||
int LzmaRamGetUncompressedSize(
|
||||
const unsigned char *inBuffer,
|
||||
size_t inSize,
|
||||
size_t *outSize)
|
||||
{
|
||||
unsigned int i;
|
||||
if (inSize < LZMA_PROPS_SIZE)
|
||||
return 1;
|
||||
*outSize = 0;
|
||||
for(i = 0; i < sizeof(size_t); i++)
|
||||
*outSize += ((size_t)inBuffer[LZMA_SIZE_OFFSET + i]) << (8 * i);
|
||||
for(; i < 8; i++)
|
||||
if (inBuffer[LZMA_SIZE_OFFSET + i] != 0)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define SZE_DATA_ERROR (1)
|
||||
#define SZE_OUTOFMEMORY (2)
|
||||
|
||||
int LzmaRamDecompress(
|
||||
const unsigned char *inBuffer,
|
||||
size_t inSize,
|
||||
unsigned char *outBuffer,
|
||||
size_t outSize,
|
||||
size_t *outSizeProcessed,
|
||||
void * (*allocFunc)(size_t size),
|
||||
void (*freeFunc)(void *))
|
||||
{
|
||||
CLzmaDecoderState state; /* it's about 24 bytes structure, if int is 32-bit */
|
||||
int result;
|
||||
SizeT outSizeProcessedLoc;
|
||||
SizeT inProcessed;
|
||||
int useFilter;
|
||||
|
||||
if (inSize < LZMA_PROPS_SIZE)
|
||||
return 1;
|
||||
useFilter = inBuffer[0];
|
||||
|
||||
*outSizeProcessed = 0;
|
||||
if (useFilter > 1)
|
||||
return 1;
|
||||
|
||||
if (LzmaDecodeProperties(&state.Properties, inBuffer + 1, LZMA_PROPERTIES_SIZE) != LZMA_RESULT_OK)
|
||||
return 1;
|
||||
state.Probs = (CProb *)allocFunc(LzmaGetNumProbs(&state.Properties) * sizeof(CProb));
|
||||
if (state.Probs == 0)
|
||||
return SZE_OUTOFMEMORY;
|
||||
|
||||
result = LzmaDecode(&state,
|
||||
inBuffer + LZMA_PROPS_SIZE, (SizeT)inSize - LZMA_PROPS_SIZE, &inProcessed,
|
||||
outBuffer, (SizeT)outSize, &outSizeProcessedLoc);
|
||||
freeFunc(state.Probs);
|
||||
if (result != LZMA_RESULT_OK)
|
||||
return 1;
|
||||
*outSizeProcessed = (size_t)outSizeProcessedLoc;
|
||||
if (useFilter == 1)
|
||||
{
|
||||
UInt32 x86State;
|
||||
x86_Convert_Init(x86State);
|
||||
x86_Convert(outBuffer, (SizeT)outSizeProcessedLoc, 0, &x86State, 0);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
/* LzmaRamDecode.h */
|
||||
|
||||
#ifndef __LzmaRamDecode_h
|
||||
#define __LzmaRamDecode_h
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
/*
|
||||
LzmaRamGetUncompressedSize:
|
||||
In:
|
||||
inBuffer - input data
|
||||
inSize - input data size
|
||||
Out:
|
||||
outSize - uncompressed size
|
||||
Return code:
|
||||
0 - OK
|
||||
1 - Error in headers
|
||||
*/
|
||||
|
||||
int LzmaRamGetUncompressedSize(
|
||||
const unsigned char *inBuffer,
|
||||
size_t inSize,
|
||||
size_t *outSize);
|
||||
|
||||
|
||||
/*
|
||||
LzmaRamDecompress:
|
||||
In:
|
||||
inBuffer - input data
|
||||
inSize - input data size
|
||||
outBuffer - output data
|
||||
outSize - output size
|
||||
allocFunc - alloc function (can be malloc)
|
||||
freeFunc - free function (can be free)
|
||||
Out:
|
||||
outSizeProcessed - processed size
|
||||
Return code:
|
||||
0 - OK
|
||||
1 - Error in headers / data stream
|
||||
2 - Memory allocating error
|
||||
|
||||
Memory requirements depend from properties of LZMA stream.
|
||||
With default lzma settings it's about 16 KB.
|
||||
*/
|
||||
|
||||
int LzmaRamDecompress(
|
||||
const unsigned char *inBuffer,
|
||||
size_t inSize,
|
||||
unsigned char *outBuffer,
|
||||
size_t outSize,
|
||||
size_t *outSizeProcessed,
|
||||
void * (*allocFunc)(size_t size),
|
||||
void (*freeFunc)(void *));
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,3 @@
|
||||
// StdAfx.cpp
|
||||
|
||||
#include "StdAfx.h"
|
||||
@@ -0,0 +1,8 @@
|
||||
// StdAfx.h
|
||||
|
||||
#ifndef __STDAFX_H
|
||||
#define __STDAFX_H
|
||||
|
||||
#include "../../../Common/MyWindows.h"
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,136 @@
|
||||
PROG = lzma.exe
|
||||
CFLAGS = $(CFLAGS) \
|
||||
-DCOMPRESS_MF_MT \
|
||||
-DBENCH_MT \
|
||||
|
||||
LIBS = $(LIBS) oleaut32.lib user32.lib
|
||||
|
||||
!IFDEF CPU
|
||||
LIBS = $(LIBS) bufferoverflowU.lib
|
||||
CFLAGS = $(CFLAGS) -GS- -Zc:forScope -W4 -Wp64 -DUNICODE -D_UNICODE
|
||||
!ENDIF
|
||||
|
||||
!IFNDEF O
|
||||
!IFDEF CPU
|
||||
O=$(CPU)
|
||||
!ELSE
|
||||
O=O
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
!IFDEF MY_STATIC_LINK
|
||||
!IFNDEF MY_SINGLE_THREAD
|
||||
CFLAGS = $(CFLAGS) -MT
|
||||
!ENDIF
|
||||
!ELSE
|
||||
CFLAGS = $(CFLAGS) -MD
|
||||
!ENDIF
|
||||
|
||||
CFLAGS = $(CFLAGS) -nologo -EHsc -c -Fo$O/
|
||||
CFLAGS_O1 = $(CFLAGS) -O1
|
||||
CFLAGS_O2 = $(CFLAGS) -O2
|
||||
|
||||
LFLAGS = $(LFLAGS) -nologo -OPT:NOWIN98
|
||||
|
||||
PROGPATH = $O\$(PROG)
|
||||
|
||||
COMPL_O1 = $(CPP) $(CFLAGS_O1) $**
|
||||
COMPL_O2 = $(CPP) $(CFLAGS_O2) $**
|
||||
COMPL = $(CPP) $(CFLAGS_O1) $**
|
||||
|
||||
|
||||
LZMA_OBJS = \
|
||||
$O\LzmaAlone.obj \
|
||||
$O\LzmaBench.obj \
|
||||
$O\LzmaBenchCon.obj \
|
||||
$O\LzmaRam.obj \
|
||||
|
||||
LZMA_OPT_OBJS = \
|
||||
$O\LZMADecoder.obj \
|
||||
$O\LZMAEncoder.obj \
|
||||
|
||||
COMMON_OBJS = \
|
||||
$O\CommandLineParser.obj \
|
||||
$O\CRC.obj \
|
||||
$O\IntToString.obj \
|
||||
$O\MyString.obj \
|
||||
$O\StringConvert.obj \
|
||||
$O\StringToInt.obj \
|
||||
$O\MyVector.obj
|
||||
|
||||
WIN_OBJS = \
|
||||
$O\System.obj
|
||||
|
||||
7ZIP_COMMON_OBJS = \
|
||||
$O\InBuffer.obj \
|
||||
$O\OutBuffer.obj \
|
||||
$O\StreamUtils.obj \
|
||||
|
||||
LZ_OBJS = \
|
||||
$O\LZOutWindow.obj \
|
||||
|
||||
C_OBJS = \
|
||||
$O\Alloc.obj \
|
||||
$O\7zCrc.obj \
|
||||
$O\Threads.obj \
|
||||
|
||||
C_LZ_OBJS = \
|
||||
$O\MatchFinder.obj \
|
||||
$O\MatchFinderMt.obj \
|
||||
|
||||
OBJS = \
|
||||
$(LZMA_OBJS) \
|
||||
$(LZMA_OPT_OBJS) \
|
||||
$(COMMON_OBJS) \
|
||||
$(WIN_OBJS) \
|
||||
$(7ZIP_COMMON_OBJS) \
|
||||
$(LZ_OBJS) \
|
||||
$(C_OBJS) \
|
||||
$(C_LZ_OBJS) \
|
||||
$O\LzmaRamDecode.obj \
|
||||
$O\LzmaDecode.obj \
|
||||
$O\FileStreams.obj \
|
||||
$O\FileIO.obj \
|
||||
$O\RangeCoderBit.obj \
|
||||
$O\BranchX86.obj \
|
||||
|
||||
all: $(PROGPATH)
|
||||
|
||||
clean:
|
||||
-del /Q $(PROGPATH) $O\*.exe $O\*.dll $O\*.obj $O\*.lib $O\*.exp $O\*.res $O\*.pch
|
||||
|
||||
$O:
|
||||
if not exist "$O" mkdir "$O"
|
||||
|
||||
$(PROGPATH): $O $(OBJS)
|
||||
link $(LFLAGS) -out:$(PROGPATH) $(OBJS) $(LIBS)
|
||||
|
||||
|
||||
$(LZMA_OBJS): $(*B).cpp
|
||||
$(COMPL)
|
||||
$(LZMA_OPT_OBJS): ../LZMA/$(*B).cpp
|
||||
$(COMPL_O2)
|
||||
$(COMMON_OBJS): ../../../Common/$(*B).cpp
|
||||
$(COMPL)
|
||||
$(WIN_OBJS): ../../../Windows/$(*B).cpp
|
||||
$(COMPL)
|
||||
$(7ZIP_COMMON_OBJS): ../../Common/$(*B).cpp
|
||||
$(COMPL)
|
||||
$(LZ_OBJS): ../LZ/$(*B).cpp
|
||||
$(COMPL)
|
||||
$O\RangeCoderBit.obj: ../RangeCoder/$(*B).cpp
|
||||
$(COMPL)
|
||||
$O\LzmaRamDecode.obj: LzmaRamDecode.c
|
||||
$(COMPL_O1)
|
||||
$O\LzmaDecode.obj: ../../../../C/Compress/Lzma/LzmaDecode.c
|
||||
$(COMPL_O2)
|
||||
$O\BranchX86.obj: ../../../../C/Compress/Branch/BranchX86.c
|
||||
$(COMPL_O2)
|
||||
$O\FileStreams.obj: ../../Common/FileStreams.cpp
|
||||
$(COMPL)
|
||||
$O\FileIO.obj: ../../../Windows/FileIO.cpp
|
||||
$(COMPL)
|
||||
$(C_OBJS): ../../../../C/$(*B).c
|
||||
$(COMPL_O2)
|
||||
$(C_LZ_OBJS): ../../../../C/Compress/Lz/$(*B).c
|
||||
$(COMPL_O2)
|
||||
@@ -0,0 +1,139 @@
|
||||
PROG = lzma
|
||||
CXX = g++ -O2 -Wall
|
||||
CXX_C = gcc -O2 -Wall
|
||||
LIB = -lm
|
||||
RM = rm -f
|
||||
CFLAGS = -c
|
||||
|
||||
ifdef SystemDrive
|
||||
IS_MINGW = 1
|
||||
endif
|
||||
|
||||
ifdef IS_MINGW
|
||||
FILE_IO =FileIO
|
||||
FILE_IO_2 =Windows/$(FILE_IO)
|
||||
LIB2 = -luuid
|
||||
else
|
||||
FILE_IO =C_FileIO
|
||||
FILE_IO_2 =Common/$(FILE_IO)
|
||||
endif
|
||||
|
||||
OBJS = \
|
||||
LzmaAlone.o \
|
||||
LzmaBench.o \
|
||||
LzmaBenchCon.o \
|
||||
LzmaRam.o \
|
||||
LZMADecoder.o \
|
||||
LZMAEncoder.o \
|
||||
LZOutWindow.o \
|
||||
RangeCoderBit.o \
|
||||
InBuffer.o \
|
||||
OutBuffer.o \
|
||||
FileStreams.o \
|
||||
StreamUtils.o \
|
||||
$(FILE_IO).o \
|
||||
CommandLineParser.o \
|
||||
CRC.o \
|
||||
IntToString.o \
|
||||
MyString.o \
|
||||
StringConvert.o \
|
||||
StringToInt.o \
|
||||
MyVector.o \
|
||||
7zCrc.o \
|
||||
Alloc.o \
|
||||
BranchX86.o \
|
||||
MatchFinder.o \
|
||||
LzmaDecode.o \
|
||||
LzmaRamDecode.o \
|
||||
|
||||
|
||||
all: $(PROG)
|
||||
|
||||
$(PROG): $(OBJS)
|
||||
$(CXX) -o $(PROG) $(LDFLAGS) $(OBJS) $(LIB) $(LIB2)
|
||||
|
||||
LzmaAlone.o: LzmaAlone.cpp
|
||||
$(CXX) $(CFLAGS) LzmaAlone.cpp
|
||||
|
||||
LzmaBench.o: LzmaBench.cpp
|
||||
$(CXX) $(CFLAGS) LzmaBench.cpp
|
||||
|
||||
LzmaBenchCon.o: LzmaBenchCon.cpp
|
||||
$(CXX) $(CFLAGS) LzmaBenchCon.cpp
|
||||
|
||||
LzmaRam.o: LzmaRam.cpp
|
||||
$(CXX) $(CFLAGS) LzmaRam.cpp
|
||||
|
||||
LZMADecoder.o: ../LZMA/LZMADecoder.cpp
|
||||
$(CXX) $(CFLAGS) ../LZMA/LZMADecoder.cpp
|
||||
|
||||
LZMAEncoder.o: ../LZMA/LZMAEncoder.cpp
|
||||
$(CXX) $(CFLAGS) ../LZMA/LZMAEncoder.cpp
|
||||
|
||||
LZOutWindow.o: ../LZ/LZOutWindow.cpp
|
||||
$(CXX) $(CFLAGS) ../LZ/LZOutWindow.cpp
|
||||
|
||||
RangeCoderBit.o: ../RangeCoder/RangeCoderBit.cpp
|
||||
$(CXX) $(CFLAGS) ../RangeCoder/RangeCoderBit.cpp
|
||||
|
||||
InBuffer.o: ../../Common/InBuffer.cpp
|
||||
$(CXX) $(CFLAGS) ../../Common/InBuffer.cpp
|
||||
|
||||
OutBuffer.o: ../../Common/OutBuffer.cpp
|
||||
$(CXX) $(CFLAGS) ../../Common/OutBuffer.cpp
|
||||
|
||||
FileStreams.o: ../../Common/FileStreams.cpp
|
||||
$(CXX) $(CFLAGS) ../../Common/FileStreams.cpp
|
||||
|
||||
StreamUtils.o: ../../Common/StreamUtils.cpp
|
||||
$(CXX) $(CFLAGS) ../../Common/StreamUtils.cpp
|
||||
|
||||
$(FILE_IO).o: ../../../$(FILE_IO_2).cpp
|
||||
$(CXX) $(CFLAGS) ../../../$(FILE_IO_2).cpp
|
||||
|
||||
|
||||
CommandLineParser.o: ../../../Common/CommandLineParser.cpp
|
||||
$(CXX) $(CFLAGS) ../../../Common/CommandLineParser.cpp
|
||||
|
||||
CRC.o: ../../../Common/CRC.cpp
|
||||
$(CXX) $(CFLAGS) ../../../Common/CRC.cpp
|
||||
|
||||
MyWindows.o: ../../../Common/MyWindows.cpp
|
||||
$(CXX) $(CFLAGS) ../../../Common/MyWindows.cpp
|
||||
|
||||
IntToString.o: ../../../Common/IntToString.cpp
|
||||
$(CXX) $(CFLAGS) ../../../Common/IntToString.cpp
|
||||
|
||||
MyString.o: ../../../Common/MyString.cpp
|
||||
$(CXX) $(CFLAGS) ../../../Common/MyString.cpp
|
||||
|
||||
StringConvert.o: ../../../Common/StringConvert.cpp
|
||||
$(CXX) $(CFLAGS) ../../../Common/StringConvert.cpp
|
||||
|
||||
StringToInt.o: ../../../Common/StringToInt.cpp
|
||||
$(CXX) $(CFLAGS) ../../../Common/StringToInt.cpp
|
||||
|
||||
MyVector.o: ../../../Common/MyVector.cpp
|
||||
$(CXX) $(CFLAGS) ../../../Common/MyVector.cpp
|
||||
|
||||
7zCrc.o: ../../../../C/7zCrc.c
|
||||
$(CXX_C) $(CFLAGS) ../../../../C/7zCrc.c
|
||||
|
||||
Alloc.o: ../../../../C/Alloc.c
|
||||
$(CXX_C) $(CFLAGS) ../../../../C/Alloc.c
|
||||
|
||||
BranchX86.o: ../../../../C/Compress/Branch/BranchX86.c
|
||||
$(CXX_C) $(CFLAGS) ../../../../C/Compress/Branch/BranchX86.c
|
||||
|
||||
MatchFinder.o: ../../../../C/Compress/Lz/MatchFinder.c
|
||||
$(CXX_C) $(CFLAGS) ../../../../C/Compress/Lz/MatchFinder.c
|
||||
|
||||
LzmaDecode.o: ../../../../C/Compress/Lzma/LzmaDecode.c
|
||||
$(CXX_C) $(CFLAGS) ../../../../C/Compress/Lzma/LzmaDecode.c
|
||||
|
||||
LzmaRamDecode.o: LzmaRamDecode.c
|
||||
$(CXX_C) $(CFLAGS) LzmaRamDecode.c
|
||||
|
||||
clean:
|
||||
-$(RM) $(PROG) $(OBJS)
|
||||
|
||||
Reference in New Issue
Block a user