update to 0.6.9 se
This commit is contained in:
@@ -3,7 +3,8 @@ unit BrunsliDLL;
|
||||
interface
|
||||
|
||||
uses
|
||||
LibImport,
|
||||
InitCode,
|
||||
Utils, LibImport,
|
||||
WinAPI.Windows,
|
||||
System.SysUtils, System.Classes;
|
||||
|
||||
@@ -44,7 +45,7 @@ var
|
||||
|
||||
procedure Init;
|
||||
begin
|
||||
Lib := TLibImport.Create(ExtractFilePath(ParamStr(0)) + 'brunsli.dll');
|
||||
Lib := TLibImport.Create(ExpandPath(PluginsPath + 'brunsli.dll', True));
|
||||
if Lib.Loaded then
|
||||
begin
|
||||
@brunsli_alloc_JPEGData := Lib.GetProcAddr('brunsli_alloc_JPEGData');
|
||||
|
@@ -3,7 +3,8 @@ unit FLACDLL;
|
||||
interface
|
||||
|
||||
uses
|
||||
LibImport,
|
||||
InitCode,
|
||||
Utils, LibImport,
|
||||
WinAPI.Windows,
|
||||
System.SysUtils, System.Classes;
|
||||
|
||||
@@ -126,8 +127,8 @@ var
|
||||
|
||||
procedure Init;
|
||||
begin
|
||||
Lib := TLibImport.Create(ExtractFilePath(ParamStr(0)) +
|
||||
'libFLAC_dynamic.dll');
|
||||
Lib := TLibImport.Create
|
||||
(ExpandPath(PluginsPath + 'libFLAC_dynamic.dll', True));
|
||||
if Lib.Loaded then
|
||||
begin
|
||||
@FLAC__stream_encoder_new := Lib.GetProcAddr('FLAC__stream_encoder_new');
|
||||
|
@@ -3,7 +3,8 @@ unit FLZMA2DLL;
|
||||
interface
|
||||
|
||||
uses
|
||||
LibImport,
|
||||
InitCode,
|
||||
Utils, LibImport,
|
||||
WinAPI.Windows,
|
||||
System.SysUtils, System.Classes, System.Types;
|
||||
|
||||
@@ -193,9 +194,6 @@ type
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
Utils;
|
||||
|
||||
var
|
||||
Lib: TLibImport;
|
||||
|
||||
@@ -308,7 +306,7 @@ begin
|
||||
inherited Create;
|
||||
LConfig := AConfig;
|
||||
if LConfig = '' then
|
||||
LConfig := 't50p';
|
||||
LConfig := 't25p';
|
||||
FProp.Parse(LConfig);
|
||||
FInput := AInput;
|
||||
LSize := 0;
|
||||
@@ -367,7 +365,7 @@ end;
|
||||
|
||||
procedure Init;
|
||||
begin
|
||||
Lib := TLibImport.Create(ExtractFilePath(ParamStr(0)) + 'fast-lzma2.dll');
|
||||
Lib := TLibImport.Create(ExpandPath(PluginsPath + 'fast-lzma2.dll', True));
|
||||
if Lib.Loaded then
|
||||
begin
|
||||
@FL2_compress := Lib.GetProcAddr('FL2_compress');
|
||||
|
@@ -3,7 +3,8 @@ unit JoJpegDLL;
|
||||
interface
|
||||
|
||||
uses
|
||||
LibImport,
|
||||
InitCode,
|
||||
Utils, LibImport,
|
||||
WinAPI.Windows,
|
||||
System.SysUtils, System.Classes;
|
||||
|
||||
@@ -37,7 +38,7 @@ var
|
||||
|
||||
procedure Init;
|
||||
begin
|
||||
Lib := TLibImport.Create(ExtractFilePath(ParamStr(0)) + 'jojpeg_dll.dll');
|
||||
Lib := TLibImport.Create(ExpandPath(PluginsPath + 'jojpeg_dll.dll', True));
|
||||
if Lib.Loaded then
|
||||
begin
|
||||
@jojpeg_Init := Lib.GetProcAddr('jojpeg_Init');
|
||||
|
@@ -3,6 +3,7 @@ unit LZ4DLL;
|
||||
interface
|
||||
|
||||
uses
|
||||
InitCode,
|
||||
Utils, LibImport,
|
||||
WinAPI.Windows,
|
||||
System.SysUtils, System.Math;
|
||||
@@ -198,80 +199,12 @@ begin
|
||||
Result := Pos2;
|
||||
end;
|
||||
|
||||
function UnravelEncode(InBuff: Pointer; InSize: Integer; OutBuff: Pointer;
|
||||
OutSize: Integer): Integer;
|
||||
const
|
||||
blockSize = 65536;
|
||||
var
|
||||
ctx: PLZ4_streamHC_t;
|
||||
Pos1, Pos2, Res: Integer;
|
||||
X, Y: Integer;
|
||||
begin
|
||||
Result := 0;
|
||||
ctx := LZ4_createStreamHC;
|
||||
LZ4_resetStreamHC(ctx, 9);
|
||||
Pos1 := 0;
|
||||
Pos2 := 0;
|
||||
try
|
||||
while (Pos1 < InSize) do
|
||||
begin
|
||||
X := Min(InSize - Pos1, blockSize);
|
||||
Y := OutSize - (Pos2 + Integer.Size);
|
||||
Res := LZ4_compress_HC_continue(ctx, PByte(InBuff) + Pos1,
|
||||
PByte(OutBuff) + Pos2 + Integer.Size, X, Y);
|
||||
if Res <= 0 then
|
||||
begin
|
||||
LZ4_freeStreamHC(ctx);
|
||||
exit(-Pos2);
|
||||
end;
|
||||
PInteger(PByte(OutBuff) + Pos2)^ := Res;
|
||||
Inc(Pos1, X);
|
||||
Inc(Pos2, Res + Integer.Size);
|
||||
end;
|
||||
finally
|
||||
LZ4_freeStreamHC(ctx);
|
||||
end;
|
||||
Result := Pos2;
|
||||
end;
|
||||
|
||||
function UnravelDecode(InBuff: Pointer; InSize: Integer; OutBuff: Pointer;
|
||||
OutSize: Integer): Integer;
|
||||
const
|
||||
blockSize = 65536;
|
||||
var
|
||||
ctx: PLZ4_streamDecode_t;
|
||||
Pos1, Pos2, Res: Integer;
|
||||
begin
|
||||
Result := 0;
|
||||
ctx := LZ4_createStreamDecode;
|
||||
Pos1 := 0;
|
||||
Pos2 := 0;
|
||||
try
|
||||
while (Pos1 < InSize) and (Pos2 < OutSize) do
|
||||
begin
|
||||
Res := LZ4_decompress_safe_continue(ctx, PByte(InBuff) + Pos1 +
|
||||
Integer.Size, PByte(OutBuff) + Pos2, PInteger(PByte(InBuff) + Pos1)^,
|
||||
Min(OutSize - Pos2, blockSize));
|
||||
if Res <= 0 then
|
||||
begin
|
||||
LZ4_freeStreamDecode(ctx);
|
||||
exit(-Pos2);
|
||||
end;
|
||||
Inc(Pos1, PInteger(PByte(InBuff) + Pos1)^ + Integer.Size);
|
||||
Inc(Pos2, Res);
|
||||
end;
|
||||
finally
|
||||
LZ4_freeStreamDecode(ctx);
|
||||
end;
|
||||
Result := Pos2;
|
||||
end;
|
||||
|
||||
var
|
||||
Lib: TLibImport;
|
||||
|
||||
procedure Init(Filename: String);
|
||||
begin
|
||||
Lib := TLibImport.Create(ExpandPath(Filename));
|
||||
Lib := TLibImport.Create(ExpandPath(Filename, True));
|
||||
if Lib.Loaded then
|
||||
begin
|
||||
@LZ4_decompress_safe := Lib.GetProcAddr('LZ4_decompress_safe');
|
||||
@@ -320,7 +253,7 @@ var
|
||||
|
||||
initialization
|
||||
|
||||
DLLFile := 'liblz4.dll';
|
||||
DLLFile := PluginsPath + 'liblz4.dll';
|
||||
for I := 1 to ParamCount do
|
||||
begin
|
||||
if ParamStr(I).StartsWith(DLLParam1) then
|
||||
|
@@ -3,6 +3,7 @@ unit LZODLL;
|
||||
interface
|
||||
|
||||
uses
|
||||
InitCode,
|
||||
Utils, LibImport,
|
||||
WinAPI.Windows,
|
||||
System.SysUtils;
|
||||
@@ -70,7 +71,7 @@ var
|
||||
|
||||
procedure Init(Filename: String);
|
||||
begin
|
||||
Lib := TLibImport.Create(ExpandPath(Filename));
|
||||
Lib := TLibImport.Create(ExpandPath(Filename, True));
|
||||
if Lib.Loaded then
|
||||
begin
|
||||
@lzo1x_1_compress := Lib.GetProcAddr('lzo1x_1_compress');
|
||||
@@ -103,7 +104,7 @@ var
|
||||
|
||||
initialization
|
||||
|
||||
DLLFile := 'lzo2.dll';
|
||||
DLLFile := PluginsPath + 'lzo2.dll';
|
||||
for I := 1 to ParamCount do
|
||||
begin
|
||||
if ParamStr(I).StartsWith(DLLParam1) then
|
||||
|
@@ -3,6 +3,7 @@ unit OodleDLL;
|
||||
interface
|
||||
|
||||
uses
|
||||
InitCode,
|
||||
Utils, LibImport,
|
||||
WinAPI.Windows,
|
||||
System.SysUtils, System.Types, System.IOUtils;
|
||||
@@ -82,13 +83,13 @@ var
|
||||
I: Integer;
|
||||
C: Cardinal;
|
||||
begin
|
||||
Lib := TLibImport.Create(ExpandPath(Filename));
|
||||
Lib := TLibImport.Create(ExpandPath(Filename, True));
|
||||
if not Lib.Loaded then
|
||||
for I := 1 to 9 do
|
||||
begin
|
||||
Lib.Free;
|
||||
Lib := TLibImport.Create(ExpandPath('oo2core_' + I.ToString +
|
||||
'_win64.dll'));
|
||||
Lib := TLibImport.Create(ExpandPath(PluginsPath + 'oo2core_' + I.ToString
|
||||
+ '_win64.dll', True));
|
||||
if Lib.Loaded then
|
||||
break;
|
||||
end;
|
||||
@@ -96,8 +97,8 @@ begin
|
||||
for I := 3 to 9 do
|
||||
begin
|
||||
Lib.Free;
|
||||
Lib := TLibImport.Create(ExpandPath('oo2ext_' + I.ToString +
|
||||
'_win64.dll'));
|
||||
Lib := TLibImport.Create(ExpandPath(PluginsPath + 'oo2ext_' + I.ToString +
|
||||
'_win64.dll', True));
|
||||
if Lib.Loaded then
|
||||
break;
|
||||
end;
|
||||
@@ -211,7 +212,7 @@ var
|
||||
|
||||
initialization
|
||||
|
||||
DLLFile := 'oo2core_9_win64.dll';
|
||||
DLLFile := PluginsPath + 'oo2core_9_win64.dll';
|
||||
for I := 1 to ParamCount do
|
||||
begin
|
||||
if ParamStr(I).StartsWith(DLLParam1) then
|
||||
|
@@ -3,7 +3,8 @@ unit PackJPGDLL;
|
||||
interface
|
||||
|
||||
uses
|
||||
LibImport,
|
||||
InitCode,
|
||||
Utils, LibImport,
|
||||
WinAPI.Windows,
|
||||
System.SysUtils, System.Classes;
|
||||
|
||||
@@ -30,7 +31,7 @@ var
|
||||
|
||||
procedure Init;
|
||||
begin
|
||||
Lib := TLibImport.Create(ExtractFilePath(ParamStr(0)) + 'packjpg_dll.dll');
|
||||
Lib := TLibImport.Create(ExpandPath(PluginsPath + 'packjpg_dll.dll', True));
|
||||
if Lib.Loaded then
|
||||
begin
|
||||
@pjglib_convert_stream2stream :=
|
||||
|
@@ -3,7 +3,8 @@ unit PreflateDLL;
|
||||
interface
|
||||
|
||||
uses
|
||||
LibImport,
|
||||
InitCode,
|
||||
Utils, LibImport,
|
||||
WinAPI.Windows,
|
||||
System.SysUtils, System.Classes;
|
||||
|
||||
@@ -23,7 +24,7 @@ var
|
||||
|
||||
procedure Init;
|
||||
begin
|
||||
Lib := TLibImport.Create(ExtractFilePath(ParamStr(0)) + 'preflate_dll.dll');
|
||||
Lib := TLibImport.Create(ExpandPath(PluginsPath + 'preflate_dll.dll', True));
|
||||
if Lib.Loaded then
|
||||
begin
|
||||
@preflate_decode := Lib.GetProcAddr('decode');
|
||||
|
@@ -3,7 +3,8 @@ unit ReflateDLL;
|
||||
interface
|
||||
|
||||
uses
|
||||
LibImport,
|
||||
InitCode,
|
||||
Utils, LibImport,
|
||||
WinAPI.Windows,
|
||||
System.SysUtils, System.Classes;
|
||||
|
||||
@@ -30,8 +31,8 @@ var
|
||||
|
||||
procedure Init;
|
||||
begin
|
||||
Lib1 := TLibImport.Create(ExtractFilePath(ParamStr(0)) + 'RAW2HIF_DLL.DLL');
|
||||
Lib2 := TLibImport.Create(ExtractFilePath(ParamStr(0)) + 'HIF2RAW_DLL.DLL');
|
||||
Lib1 := TLibImport.Create(ExpandPath(PluginsPath + 'RAW2HIF_DLL.DLL', True));
|
||||
Lib2 := TLibImport.Create(ExpandPath(PluginsPath + 'HIF2RAW_DLL.DLL', True));
|
||||
if Lib1.Loaded and Lib2.Loaded then
|
||||
begin
|
||||
@raw2hif_Alloc := Lib1.GetProcAddr('raw2hif_Alloc');
|
||||
|
@@ -3,7 +3,8 @@ unit XDeltaDLL;
|
||||
interface
|
||||
|
||||
uses
|
||||
LibImport,
|
||||
InitCode,
|
||||
Utils, LibImport,
|
||||
WinAPI.Windows,
|
||||
System.SysUtils, System.Classes;
|
||||
|
||||
@@ -42,7 +43,7 @@ var
|
||||
|
||||
procedure Init;
|
||||
begin
|
||||
Lib := TLibImport.Create(ExtractFilePath(ParamStr(0)) + 'xdelta3_dll.dll');
|
||||
Lib := TLibImport.Create(ExpandPath(PluginsPath + 'xdelta3_dll.dll', True));
|
||||
if Lib.Loaded then
|
||||
begin
|
||||
DLLLoaded := True;
|
||||
|
@@ -3,6 +3,7 @@ unit ZLibDLL;
|
||||
interface
|
||||
|
||||
uses
|
||||
InitCode,
|
||||
Utils, LibImport,
|
||||
WinAPI.Windows,
|
||||
System.SysUtils, System.Types, System.IOUtils, System.ZLib;
|
||||
@@ -148,16 +149,11 @@ end;
|
||||
|
||||
procedure Init(Filename: String);
|
||||
begin
|
||||
Lib := TLibImport.Create(ExpandPath(Filename));
|
||||
Lib := TLibImport.Create(ExpandPath(Filename, True));
|
||||
if not(Lib.Loaded and Assigned(Lib.GetProcAddr('zlibVersion'))) then
|
||||
begin
|
||||
Lib.Free;
|
||||
Lib := TLibImport.Create(ExpandPath('zlibwapi.dll'));
|
||||
end;
|
||||
if not(Lib.Loaded and Assigned(Lib.GetProcAddr('zlibVersion'))) then
|
||||
begin
|
||||
Lib.Free;
|
||||
Lib := TLibImport.Create(ExpandPath('zlib1.dll'));
|
||||
Lib := TLibImport.Create(ExpandPath(PluginsPath + 'zlib1.dll', True));
|
||||
end;
|
||||
if Lib.Loaded and Assigned(Lib.GetProcAddr('zlibVersion')) then
|
||||
begin
|
||||
@@ -201,7 +197,7 @@ var
|
||||
|
||||
initialization
|
||||
|
||||
DLLFile := 'zlibwapi.dll';
|
||||
DLLFile := PluginsPath + 'zlibwapi.dll';
|
||||
for I := 1 to ParamCount do
|
||||
begin
|
||||
if ParamStr(I).StartsWith(DLLParam1) then
|
||||
|
@@ -3,6 +3,7 @@ unit ZSTDDLL;
|
||||
interface
|
||||
|
||||
uses
|
||||
InitCode,
|
||||
Utils, LibImport,
|
||||
WinAPI.Windows,
|
||||
System.SysUtils;
|
||||
@@ -147,7 +148,7 @@ var
|
||||
|
||||
procedure Init(Filename: String);
|
||||
begin
|
||||
Lib := TLibImport.Create(ExpandPath(Filename));
|
||||
Lib := TLibImport.Create(ExpandPath(Filename, True));
|
||||
if Lib.Loaded then
|
||||
begin
|
||||
@ZSTD_compress := Lib.GetProcAddr('ZSTD_compress');
|
||||
@@ -194,7 +195,7 @@ var
|
||||
|
||||
initialization
|
||||
|
||||
DLLFile := 'libzstd.dll';
|
||||
DLLFile := PluginsPath + 'libzstd.dll';
|
||||
for I := 1 to ParamCount do
|
||||
begin
|
||||
if ParamStr(I).StartsWith(DLLParam1) then
|
||||
|
Reference in New Issue
Block a user