msd 5 Posted November 14, 2023 Hello, Does anyone use LZMA from System.Zip in Delphi 11 and 12? I try it, but I get an error that this type of compression is not supported. Zip := TZipFile.Create; try Zip.Open(db.zipFile, zmWrite); Zip.Add(db.fbkFile, ExtractFileName(db.fbkFile), TZipCompression.zcLZMA ); Zip.Close; except end; Zip.Free; Thanks in the advance... Share this post Link to post
Anders Melander 1783 Posted November 14, 2023 AFAIK the zlib library that TZipFile wraps does not support LZMA compression. If you google for "delphi lzma" there's plenty of other solutions. 1 Share this post Link to post
msd 5 Posted November 14, 2023 Hello Anders, I have an excellent solution for Delphi LZMA with extremely good compression and a very fast process, but it doesn't work under 64-bit environments. This is my component for LZMA: https://github.com/ccy/delphi-zip. and if someone can check the 64-bit setup, it will be great. Thanks to all in advance... Share this post Link to post
Anders Melander 1783 Posted November 15, 2023 2 hours ago, msd said: This is my component for LZMA: https://github.com/ccy/delphi-zip. and if someone can check the 64-bit setup, it will be great. It's a private repository... and why don't you migrate it to 64-bit yourself? 1 Share this post Link to post
msd 5 Posted November 15, 2023 I'll give it a try, but there are some errors in OBJ files for x64 architecture. If I do the job, I'll publish it on GitHub. Share this post Link to post
msd 5 Posted November 15, 2023 Hello, What can be problem here, in 32bit everything works fine, but in 64 bit I have an error unit Threads; interface uses System.Win.Crtl, Winapi.Windows, LzmaTypes, System.Classes; type TCEvent = THandle; TCSemaphore = THandle; TCCriticalSection = TRTLCriticalSection; TCAutoResetEvent = TCEvent; TCThread = THandle; TThread_Func_Type = Pointer; function{$IFDEF UNDERSCOREIMPORTNAME}__beginthreadex{$ELSE}_beginthreadex{$ENDIF}(__security_attr: Pointer; __stksize: Cardinal; __start: TThread_Func_Type; __arg: Pointer; __create_flags: Cardinal; var __thread_id: Cardinal): Cardinal; cdecl; external msvcrt name '_beginthreadex'; implementation {$IFDEF Win32} {$L Win32\Threads.obj} {$ELSE} {$L Win64\Threads.o} {$ENDIF} end. Error is: [dcc64 Error] Threads.pas(23): E2003 Undeclared identifier: 'msvcrt' Thanks for the help and assistance in the advance... Share this post Link to post
Kas Ob. 121 Posted November 15, 2023 36 minutes ago, msd said: Error is: [dcc64 Error] Threads.pas(23): E2003 Undeclared identifier: 'msvcrt' Your obj files are compiled with VS C RTL, aka Microsoft Visual C++ Run Time, remove that dependency then rebuild it, and you will get rid of that error. 1 Share this post Link to post
msd 5 Posted November 15, 2023 Thanks to all supporters & friends, it is working fine now in 32bint/64bit. Share this post Link to post