It is currently Fri Jan 15, 2021 3:35 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 41 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: about PureLZMA Bug?
PostPosted: Mon Aug 08, 2011 8:29 am 
Offline
User
User

Joined: Thu May 15, 2008 5:53 am
Posts: 30
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

_________________
Win7X64 Purebasic5.22x86DEMO


Top
 Profile  
Reply with quote  
 Post subject: Re: about PureLZMA Bug?
PostPosted: Mon Aug 08, 2011 8:40 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Feb 12, 2006 10:06 pm
Posts: 638
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


Top
 Profile  
Reply with quote  
 Post subject: Re: about PureLZMA Bug?
PostPosted: Mon Aug 08, 2011 9:13 am 
Offline
Addict
Addict

Joined: Thu Nov 01, 2007 5:37 pm
Posts: 1981
Location: Germany
...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!


Top
 Profile  
Reply with quote  
 Post subject: Re: PureLZMA : compress/uncompress data using LZMA algo
PostPosted: Mon Aug 08, 2011 10:47 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
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.

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
 Post subject: Re: PureLZMA : compress/uncompress data using LZMA algo
PostPosted: Mon Aug 08, 2011 12:55 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Tue Aug 10, 2010 3:17 pm
Posts: 115
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 :cry: but I don't have much time to try and implement this all :cry:

_________________
_________________________________________________
My Website : CeriseCode (Warning : perpetual changes & not completed ;))


Top
 Profile  
Reply with quote  
 Post subject: Re: PureLZMA : compress/uncompress data using LZMA algo
PostPosted: Mon Aug 08, 2011 1:07 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
graph100 wrote:
Do you not intend to extend your work to a Pure7Zip or something like this ? This would be of even greater use !
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.

Personally, for handling *.7z files I use PureWCX / PureWCX-U + 7-ZIP.wcx.
Code example :
Code:
*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

Another possibility might be 7-ZIP32.DLL, but the API is in Japanese and the English documentation seems way behind the Japanese version. I believe there are some sources posted in this forum.

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
 Post subject: Re: PureLZMA : compress/uncompress data using LZMA algo
PostPosted: Mon Aug 08, 2011 2:17 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Tue Aug 10, 2010 3:17 pm
Posts: 115
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 ;))


Top
 Profile  
Reply with quote  
 Post subject: Re: PureLZMA : compress/uncompress data using LZMA algo
PostPosted: Mon Aug 08, 2011 3:33 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Feb 17, 2010 12:00 am
Posts: 1324
Location: (Embarrassed to say country)
See here:

viewtopic.php?f=12&t=41115&hilit=lzmacompress

Hope that helps.


Top
 Profile  
Reply with quote  
 Post subject: Re: PureLZMA : compress/uncompress data using LZMA algo
PostPosted: Mon Aug 08, 2011 4:10 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Tue Aug 10, 2010 3:17 pm
Posts: 115
well, the guys Mistrel have done a qood job, but, as he said in the first post :
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.

and his dll only does Lzma compress / uncompress without the 7zip header (actually it's not really a header)

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 ;))


Top
 Profile  
Reply with quote  
 Post subject: Re: PureLZMA : compress/uncompress data using LZMA algo
PostPosted: Mon Aug 08, 2011 4:22 pm 
Offline
Always Here
Always Here
User avatar

Joined: Thu Jun 24, 2004 2:44 pm
Posts: 5756
Location: Berlin - Germany
graph100 wrote:
I'm searching for a simple mean to unpack common archives like zip, rar, 7zip, etc.

The simple way is to use 7zG.exe
Small, not running example:
Code:
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.71 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 19.3 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: PureLZMA : compress/uncompress data using LZMA algo
PostPosted: Tue Aug 09, 2011 11:25 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Tue Aug 10, 2010 3:17 pm
Posts: 115
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 ! :mrgreen:
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 ;))


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 41 posts ]  Go to page Previous  1, 2, 3

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye