Zip Function for Linux

Linux specific forum
shire
User
User
Posts: 46
Joined: Mon Jul 25, 2011 5:24 am

Zip Function for Linux

Post by shire »

Hello,

Needs help on zip function or library for linux like PureZip.
Any ideas?

Thank you.
User avatar
idle
Always Here
Always Here
Posts: 5839
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Zip Function for Linux

Post by idle »

Code: Select all

ImportC "-zlib.a"
  compress2(*dest, *destLen, *source, sourceLen.i, level.i)
  uncompress(*dest, *destLen, *source, sourceLen)
EndImport
Allocate the *dest to the size of your sourcelen
the pointer to *destlen is the compressed size
write the data to file
Windows 11, Manjaro, Raspberry Pi OS
Image
shire
User
User
Posts: 46
Joined: Mon Jul 25, 2011 5:24 am

Re: Zip Function for Linux

Post by shire »

Tnx idle.

How about compressing multiple file or adding file to the existing zip file?
User avatar
idle
Always Here
Always Here
Posts: 5839
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Zip Function for Linux

Post by idle »

that's a bit more involved

try this then
http://www.purebasic.fr/english/viewtop ... 27&t=50153
Windows 11, Manjaro, Raspberry Pi OS
Image
shire
User
User
Posts: 46
Joined: Mon Jul 25, 2011 5:24 am

Re: Zip Function for Linux

Post by shire »

Tnx idle.

I'll try it.
shire
User
User
Posts: 46
Joined: Mon Jul 25, 2011 5:24 am

Re: Zip Function for Linux

Post by shire »

@Idle:
I tried it but it doesn't support zip file. :|
Post Reply