What will I do using the LZMA? [closed]
Hello I download Lzma for delphi its 48 kb.What will I do now?How can I use it? Is there any开发者_如何转开发 example code for Lzma in DElphi?
Abbrevia 4 supports decompressing LZMA streams in zip files using a statically linked version of the LZMA C SDK. It includes pre-compiled copies of the .c files and links them using {$L abc.obj}, and is up to date (v9.20). AbLZMA.pas has LzDecode
and LzEncode
functions that are compatible with the files the SDK generates.
Do note that that handles raw Lzma streams though, not the full .7z archive that 7-zip produces. If you need that you're better off using the Jedi Code Library's JclCompression unit.
There is example code within the SDK (LZMAAlone) that is an example of using the decoder. You need to include most of the files under compression/{LZ,LZMA,RangeCoder}/ in your project to get it to work. The SDK doesn't generate a package that could be used as a compile-time/run-time package.
It works using TStreams, so you can use TMemoryStreams if you want to perform compression/decompression without using a file.
BTW the Delphi implementation is at the 4.42 revision, while the official SDK is at 9.20, which is a big difference!
精彩评论