PureLZMA : compress/uncompress data using LZMA algo
Moderator: gnozal
about PureLZMA Bug?
purebasic 4.51
PureLZMA 4.5X
modify PureLZMA-Packer_Test_2.pb filepath
run the Example
have a error
PureLZMA_Archive_AddFiles
Invalid Memory Access
PureLZMA 4.5X
modify PureLZMA-Packer_Test_2.pb filepath
run the Example
have a error
PureLZMA_Archive_AddFiles
Invalid Memory Access
Win7X64 Purebasic5.22x86DEMO
Re: about PureLZMA Bug?
you'd probably be better off asking your questions in the PureLZMA thread...
there is no sig, only zuul (and the following disclaimer)
WARNING: may be talking out of his hat
WARNING: may be talking out of his hat
Re: about PureLZMA Bug?
...And post an example code where we can reproduce your error.
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Re: PureLZMA : compress/uncompress data using LZMA algo
Update (PB4.5x and PB4.6x versions)
Changes :
- added PureLZMA_FreeBuffer() function to free memory allocated by PureLZMA functions PureLZMA_Compress() or PureLZMA_UnCompress().
It seems that (since PB4.5x ?) the main module can't free memory allocated by a userlibrary without an IMA.
- PureLZMA-Packer and PureLZMA-Packer-Mem no longer need the PureLZMA library : the LZMA library is included to avoid memory allocation issues.
Changes :
- added PureLZMA_FreeBuffer() function to free memory allocated by PureLZMA functions PureLZMA_Compress() or PureLZMA_UnCompress().
It seems that (since PB4.5x ?) the main module can't free memory allocated by a userlibrary without an IMA.
- PureLZMA-Packer and PureLZMA-Packer-Mem no longer need the PureLZMA library : the LZMA library is included to avoid memory allocation issues.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Re: PureLZMA : compress/uncompress data using LZMA algo
hello Gnozal,
useful work indeed !!
Do you not intend to extend your work to a Pure7Zip or something like this ? This would be of even greater use ! With all archives
I say that because you already got the Lzma packer working, so why don't adapt it to read existing archives ?
[edit] and I need this feature for one of my project but I don't have much time to try and implement this all
useful work indeed !!
Do you not intend to extend your work to a Pure7Zip or something like this ? This would be of even greater use ! With all archives
I say that because you already got the Lzma packer working, so why don't adapt it to read existing archives ?
[edit] and I need this feature for one of my project but I don't have much time to try and implement this all
_________________________________________________
My Website : CeriseCode (Warning : perpetual changes & not completed )
My Website : CeriseCode (Warning : perpetual changes & not completed )
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Re: PureLZMA : compress/uncompress data using LZMA algo
No, although the library uses the LZMA algorithm, which is one of many supported by 7-ZIP, it does no provide support for 7-ZIP archives.graph100 wrote:Do you not intend to extend your work to a Pure7Zip or something like this ? This would be of even greater use !
Personally, for handling *.7z files I use PureWCX / PureWCX-U + 7-ZIP.wcx.
Code example :
Code: Select all
*SevenZIP = PureWCX_U_LoadPlugin("c:\WinNT\WinCmd\7-Zip\7zip.wcx")
If *SevenZIP
hArc = PureWCX_U_OpenArchive(*SevenZIP, "c:\Purebasic\wcx\Test-pack.7z")
If hArc
While PureWCX_U_GetFileInfo(*SevenZIP, hArc, @HeaderData.PureWCXFileInfo)
Debug "Archive name : " + HeaderData\ArcName
Debug "Archived file : " + HeaderData\Filename
Debug "Archived file packed size : " + Str(HeaderData\PackSize)
Debug "Archived file unpacked size : " + Str(HeaderData\UnpSize)
PureWCX_U_NextFile(*SevenZIP, hArc)
Wend
PureWCX_U_CloseArchive(*SevenZIP, hArc)
EndIf
PureWCX_U_FreePlugin(*SevenZIP)
EndIf
End
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Re: PureLZMA : compress/uncompress data using LZMA algo
ah, but it is not multi-os. I have done some search, but nobody had done a wrapper for the 7za.dll or 7z.dll
_________________________________________________
My Website : CeriseCode (Warning : perpetual changes & not completed )
My Website : CeriseCode (Warning : perpetual changes & not completed )
Re: PureLZMA : compress/uncompress data using LZMA algo
well, the guys Mistrel have done a qood job, but, as he said in the first post :
I'm searching for a simple mean to unpack common archives like zip, rar, 7zip, etc.. the easier and safer way would be the get a wrapper in PB of 7za.dll or 7z.dll from the 7zip projet.
Because it would be keep updated. Unfortunately, the dll does not use common COM interface. And I don't understand the source.
and his dll only does Lzma compress / uncompress without the 7zip header (actually it's not really a header)Mistrel wrote:There is a DLL available on SourceForge but it uses a nonstandard COM interface. Maybe srod can figure out what to do with that.
I'm searching for a simple mean to unpack common archives like zip, rar, 7zip, etc.. the easier and safer way would be the get a wrapper in PB of 7za.dll or 7z.dll from the 7zip projet.
Because it would be keep updated. Unfortunately, the dll does not use common COM interface. And I don't understand the source.
_________________________________________________
My Website : CeriseCode (Warning : perpetual changes & not completed )
My Website : CeriseCode (Warning : perpetual changes & not completed )
Re: PureLZMA : compress/uncompress data using LZMA algo
The simple way is to use 7zG.exegraph100 wrote: I'm searching for a simple mean to unpack common archives like zip, rar, 7zip, etc.
Small, not running example:
Code: Select all
zip = RunProgram("7zG.exe", "x " + #DQUOTE$ + Archiv + #DQUOTE$ + " -o" + #DQUOTE$ + DestPath + #DQUOTE$, SourcePath, #PB_Program_Open)
If zip
While Not WaitProgram(zip)
Wend
Select ProgramExitCode(zip)
Case 1
MessageRequester(#ProgrammName$, "Eine oder mehrere Dateien sind in Benutzung durch eine andere Anwendung" + #LF$ + "und konnte nicht gepackt werden!", #MB_ICONINFORMATION)
Case 2
MessageRequester(#ProgrammName$, "Fatal error", #MB_ICONERROR)
Case 8
MessageRequester(#ProgrammName$, "Nicht genug Speicher vorhanden!", #MB_ICONINFORMATION)
EndSelect
CloseProgram(zip)
EndIf
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Re: PureLZMA : compress/uncompress data using LZMA algo
well, I don't want to steal the topic from gnozal
and I should have explain in detail what I needed :
I'm searching for a way to extract archives from a lot of common format like zip rar, on all platform (window / linux / mac) and to extract them in memory. Not on the disk.
For example, if the archive contain images, you extract them in memory, display it with catchimage(), and free it simply. You can also save them onto the disk. It would allow a lot of possibility.
So the easier to have a cross platform thing to do that is to have a code in PB which reproduce the 7z behaviour. them we would be completely independent !
I have begun to document on the zip format, and to read it. But I have not the time and enough documentation to advance it all throughout.
and I should have explain in detail what I needed :
I'm searching for a way to extract archives from a lot of common format like zip rar, on all platform (window / linux / mac) and to extract them in memory. Not on the disk.
For example, if the archive contain images, you extract them in memory, display it with catchimage(), and free it simply. You can also save them onto the disk. It would allow a lot of possibility.
So the easier to have a cross platform thing to do that is to have a code in PB which reproduce the 7z behaviour. them we would be completely independent !
I have begun to document on the zip format, and to read it. But I have not the time and enough documentation to advance it all throughout.
_________________________________________________
My Website : CeriseCode (Warning : perpetual changes & not completed )
My Website : CeriseCode (Warning : perpetual changes & not completed )