It is currently Sun Jul 22, 2018 9:29 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 600 posts ]  Go to page Previous  1 ... 36, 37, 38, 39, 40  Next
Author Message
 Post subject: Re: PureZIP library : ZIP / UNZIP files [password supported]
PostPosted: Mon Jul 25, 2011 10:01 am 
Offline
Addict
Addict

Joined: Thu Nov 01, 2007 5:37 pm
Posts: 1981
Location: Germany
Thank you gnozal.

_________________
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: PureZIP library : ZIP / UNZIP files [password supported]
PostPosted: Wed Jul 27, 2011 12:36 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
Update (PB4.60 version)

Changes :
- new function : PureZIP_Archive_ReadInMemory()
     Open a ZIP archive in memory (data section, resource, ...) for reading.

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


Top
 Profile  
Reply with quote  
 Post subject: Re: PureZIP library : ZIP / UNZIP files [password supported]
PostPosted: Fri Sep 23, 2011 2:59 pm 
Offline
Addict
Addict

Joined: Tue Feb 22, 2011 1:16 pm
Posts: 1482
I can't seem to get PureZIP_AddFiles() to use FileMask.s with partial names. For example, I want to recurse a folder and only add files to my zip archive that have "PartialName" in their filename. But when I run the following code, 0 files are added. However, if I change "*PartialName*" to "*.*" then all files are added, as expected.

Does PureZIP not support this format of FileMask? If not, can I please request that it be added? Because at the moment I have to build my own directory list, filter the filenames manually, then add them one-by-one to the zip archive with PureZIP_Archive_Compress(). :(

Code:
MyZIP.s = "C:\Test.zip"
MyFilesToZIP.s = "C:\Temp\*PartialName*" ; This fails, but using *.* works!
Debug PureZIP_AddFiles(MyZIP, MyFilesToZIP, #PureZIP_StorePathAbsolute, #PureZIP_Recursive)

_________________
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!


Top
 Profile  
Reply with quote  
 Post subject: Re: PureZIP library : ZIP / UNZIP files
PostPosted: Sat Sep 24, 2011 8:33 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
Update (PB4.60 version -> V2.21)

Changes :
- PureZIP now uses API function PathMatchSpec() to analyze file masks with wildcards like * or ?.

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


Top
 Profile  
Reply with quote  
 Post subject: Re: PureZIP library : ZIP / UNZIP files
PostPosted: Thu Oct 27, 2011 9:30 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
Update (PB4.60 version -> V2.30)

Changes :
- new function PureZIP_Archive_CheckCRC() to check file integrity

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


Top
 Profile  
Reply with quote  
 Post subject: Re: PureZIP library : ZIP / UNZIP files
PostPosted: Wed Nov 16, 2011 6:41 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Jul 24, 2009 1:34 pm
Posts: 605
Location: USA
I just tried to download PureZIP but when I try to open the zip file I'm told that it is corrupt. :(
I had no problem opening any of gnozal's other zip files that I downloaded.


Top
 Profile  
Reply with quote  
 Post subject: Re: PureZIP library : ZIP / UNZIP files
PostPosted: Wed Nov 16, 2011 10:14 pm 
Offline
Always Here
Always Here

Joined: Fri Oct 23, 2009 2:33 am
Posts: 5774
Location: Wales, UK
...I downloaded it too, no problem though so perhaps yours got broken on the way down. Try again.

_________________
IdeasVacuum
If it sounds simple, you have not grasped the complexity.


Top
 Profile  
Reply with quote  
 Post subject: Re: PureZIP library : ZIP / UNZIP files
PostPosted: Thu Nov 17, 2011 12:12 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Jul 24, 2009 1:34 pm
Posts: 605
Location: USA
Must be some with the network at work or my work computer because I tried downloading it a bunch of times with the same result.

But at home on my home PC it downloaded and opened without a problem.

Strange.... :?


Top
 Profile  
Reply with quote  
 Post subject: Re: PureZIP library : ZIP / UNZIP files
PostPosted: Sat Jan 21, 2012 10:14 am 
Offline
User
User

Joined: Mon Jun 06, 2011 8:28 am
Posts: 16
Hi, a very usefull functions is missed like 'PureZIP_EcryptFileNames',if is posible (I know it is posible for you) can you add a function like this,thanks!

ps: a very usefull function (for me,at least) in combination with PureZIP_SetArchivePassword ...


Top
 Profile  
Reply with quote  
 Post subject: Re: PureZIP library : ZIP / UNZIP files
PostPosted: Sat Jan 21, 2012 11:08 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
ruslanx wrote:
Hi, a very usefull functions is missed like 'PureZIP_EcryptFileNames',if is posible (I know it is possible for you) can you add a function like this,thanks!
Sorry, PureZIP uses ZLIB, and there is no ZLIB function available for encrypting filenames.

Additionally, standard ZIP encryption is not very strong, so I would not use PkZip like archives for sensible data : 7-Zip offers very strong encryption, very good compression ratios (LZMA algo) and it's free.

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


Top
 Profile  
Reply with quote  
 Post subject: Re: PureZIP library : ZIP / UNZIP files
PostPosted: Sat Jan 21, 2012 11:21 am 
Offline
User
User

Joined: Mon Jun 06, 2011 8:28 am
Posts: 16
Thanks Gnozal for quick answer ... I will use 7z.exe ... 7z a archive.7z -p123 -mhe *.txt

but I need a 'ProgressionCallback' .... I find a key for 7z -so (write data to stdout)
how I can read info from stdout .. can you give a peace of code or example ..thx.


Top
 Profile  
Reply with quote  
 Post subject: Re: PureZIP library : ZIP / UNZIP files
PostPosted: Sat Jan 21, 2012 11:30 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
ruslanx wrote:
...how I can read info from stdout .. can you give a peace of code or example ..thx.
You may use the process library fonctions.

Below an example executing PING and reading the result.
Code:
Procedure.s ReadProgramStringSafe(ProgramNr) ; ReadProgramString does NOT support Unicode
  ;
  Protected Char.a, ReturnValue.s
  ;
  Static MyReadProgramOffset = 0
  ;
  Shared *MyReadProgramStringBuffer
  ;
  size = AvailableProgramOutput(ProgramNr)
  If size > 0
    ;
    Repeat
      ;
      ReadProgramData(ProgramNr, @Char, 1)
      PokeB(*MyReadProgramStringBuffer + MyReadProgramOffset, Char)
      MyReadProgramOffset + 1
      ;
      If AvailableProgramOutput(ProgramNr) = 0 Or MyReadProgramOffset > 255
        Break
      EndIf
      ;
    Until Char = $0A
    ;
    If Char <> $0A
      ReturnValue = ""
    Else
      PokeB(*MyReadProgramStringBuffer + MyReadProgramOffset, 0)
      ReturnValue = PeekS(*MyReadProgramStringBuffer, -1, #PB_Ascii)
      MyReadProgramOffset = 0
      ReturnValue = ReplaceString(ReturnValue, Chr(13), "")
      ReturnValue = ReplaceString(ReturnValue, Chr(10), "")
    EndIf
    ;
  EndIf
  ;
  ProcedureReturn ReturnValue
  ;
EndProcedure
Procedure IsRemotePCAvailable(RemotePC.s)
  ;
  Protected ConnectionOk, ResponseLine, Prog, FindLast, FindFirst, TimeOut.i
  ;
  Shared IsRemotePCAvailable_IP.s
  Shared *MyReadProgramStringBuffer
  ;
  IsRemotePCAvailable_IP = ""
  ;
  *MyReadProgramStringBuffer = AllocateMemory(2048)
  If *MyReadProgramStringBuffer
    ;
    Prog = RunProgram("ping.exe", RemotePC, GetTemporaryDirectory(), #PB_Program_Open | #PB_Program_Read | #PB_Program_Hide)
    If Prog
      TimeOut = ElapsedMilliseconds() + 5000
      Debug "IsRemotePCAvailable : START -> " + RemotePC
      While ProgramRunning(Prog)
        Response$ = ReadProgramStringSafe(Prog)
        If Response$
          Debug "---> " + Response$
          ResponseLine + 1
          If ResponseLine = 1
            IsRemotePCAvailable_IP = RemotePC
            FindFirst = FindString(Response$, "[", 1)
            If FindFirst
              FindLast = FindString(Response$, "]", FindFirst + 1)
              If FindLast
                IsRemotePCAvailable_IP = Mid(Response$, FindFirst + 1, FindLast - FindFirst - 1)
              EndIf
            EndIf
          ElseIf ResponseLine = 2
            If FindString(Response$, "TTL", 1)
              ConnectionOk = #True
            Else
              IsRemotePCAvailable_IP = ""
            EndIf
            KillProgram(Prog)
            Break
          EndIf
        EndIf
        If ElapsedMilliseconds() > TimeOut
          KillProgram(Prog)
          Break
        EndIf
      Wend
      If ResponseLine = 1
        IsRemotePCAvailable_IP = ""
      EndIf
      CloseProgram(Prog)
      Debug "IsRemotePCAvailable : END"
    Else
      ConnectionOk = -1
    EndIf
    ;
    FreeMemory(*MyReadProgramStringBuffer)
    ;
  Else
    ConnectionOk = -1
  EndIf
  ;
  ProcedureReturn ConnectionOk
  ;
EndProcedure
Debug IsRemotePCAvailable("localhost1")

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


Top
 Profile  
Reply with quote  
 Post subject: Re: PureZIP library : ZIP / UNZIP files
PostPosted: Sat Jan 21, 2012 2:23 pm 
Offline
User
User

Joined: Mon Jun 06, 2011 8:28 am
Posts: 16
Thanks Gnozal !


Top
 Profile  
Reply with quote  
 Post subject: Re: PureZIP library : ZIP / UNZIP files
PostPosted: Wed Feb 08, 2012 3:26 am 
Offline
Addict
Addict
User avatar

Joined: Tue Dec 23, 2003 3:54 am
Posts: 1556
This library is great, gnozal, thank you for keeping it going for what, 6 years now?!?


Top
 Profile  
Reply with quote  
 Post subject: Re: PureZIP library : ZIP / UNZIP files
PostPosted: Thu Feb 09, 2012 1:08 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
kenmo wrote:
This library is great, gnozal, thank you for keeping it going for what, 6 years now?!?

Since 2005 (It was PB3.92 at the time iirc) !

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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 600 posts ]  Go to page Previous  1 ... 36, 37, 38, 39, 40  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
cron

 


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