ZIP / UnZIP
-
- Posts: 231
- Joined: Apr 10, 2010 11:41
- Location: Japan
- Contact:
ZIP / UnZIP
I'd like to ZIP compression / decompression.
I think "ExtLibZip" is valid, but the example program becomes the error below.
http://www.freebasic.net/wiki/wikka.php?wakka=ExtLibZip
Please teach me how to fix it.
libzip.bas(27) error 58: Illegal specification, at parameter 1 (zip) of unpack_zip_file() in 'Private Sub unpack_zip_file(ByVal zip As zip Ptr, ByVal i As Integer)'
I think "ExtLibZip" is valid, but the example program becomes the error below.
http://www.freebasic.net/wiki/wikka.php?wakka=ExtLibZip
Please teach me how to fix it.
libzip.bas(27) error 58: Illegal specification, at parameter 1 (zip) of unpack_zip_file() in 'Private Sub unpack_zip_file(ByVal zip As zip Ptr, ByVal i As Integer)'
Re: ZIP / UnZIP
In the example, try to replace:
ByVal zip As zip Ptr
by:
ByVal zip As Any Ptr
Dim As zip_file Ptr fi
by:
Dim As Any Ptr fi
Dim As zip Ptr zip
by:
Dim As Any Ptr zip
ByVal zip As zip Ptr
by:
ByVal zip As Any Ptr
Dim As zip_file Ptr fi
by:
Dim As Any Ptr fi
Dim As zip Ptr zip
by:
Dim As Any Ptr zip
Re: ZIP / UnZIP
A while ago I used zlib for this.
(I have not tried zip)
This will compress and decompress single files.
Drag and drop.
32 bits.
http://www.mediafire.com/file/2rhd5hyf6246ly5/zlib.zip
(I have not tried zip)
This will compress and decompress single files.
Drag and drop.
32 bits.
http://www.mediafire.com/file/2rhd5hyf6246ly5/zlib.zip
Re: ZIP / UnZIP
@dodicat,
libzip is also making use of zlib (under the hood).
However, it is extending the use to, e.g. managing existing archives ...
libzip/readme at NiH.at.
libzip is also making use of zlib (under the hood).
However, it is extending the use to, e.g. managing existing archives ...
libzip/readme at NiH.at.
Re: ZIP / UnZIP
ExtLibZip → fxm [Update the example for compiling OK]
For the example, libzip.a for Win32 can be found here:
FB-win32-libzip-0.11.zip
For the example, libzip.a for Win32 can be found here:
FB-win32-libzip-0.11.zip
-
- Posts: 231
- Joined: Apr 10, 2010 11:41
- Location: Japan
- Contact:
Re: ZIP / UnZIP
Dear fxm
Thank you for updating the example.
I could compile the example program and unpack .zip.
P.S.
This example is .zip unpacking using libzip.
If someone adds examples of .zip compression using libzip to the document, beginners will become happier.
Thank you for updating the example.
I could compile the example program and unpack .zip.
P.S.
This example is .zip unpacking using libzip.
If someone adds examples of .zip compression using libzip to the document, beginners will become happier.
-
- Posts: 1002
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: ZIP / UnZIP
Hello ! When I try to compile the example, I get this error:
I get also the same error when I try to compile the example provided by dodicat.c:\fbc\1.05.0\bin\win32\ld.exe: cannot find -lz
Re: ZIP / UnZIP
ExtLibZip → fxm [Add example of packing using libzip]Makoto WATANABE wrote:If someone adds examples of .zip compression using libzip to the document, beginners will become happier.
Last edited by fxm on May 27, 2017 6:24, edited 1 time in total.
Re: ZIP / UnZIP
Have you the library file 'libz.a' (in ...\lib\win32\) ?Roland Chastain wrote:Hello ! When I try to compile the example, I get this error:
I get also the same error when I try to compile the example provided by dodicat.c:\fbc\1.05.0\bin\win32\ld.exe: cannot find -lz
-
- Posts: 1002
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: ZIP / UnZIP
Thanks for your answer. No, I don't have that library.fxm wrote:Have you the library file 'libz.a' (in ...\lib\win32\) ?
Re: ZIP / UnZIP
You can get 'libz.a' at:
http://users.freebasic-portal.de/stw/builds/
in file:
win32_mingw_additional_libs.zip
http://users.freebasic-portal.de/stw/builds/
in file:
win32_mingw_additional_libs.zip
-
- Posts: 1002
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: ZIP / UnZIP
Thank you fxm. ;)
-
- Posts: 1002
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: ZIP / UnZIP
Thank you for the new example.fxm wrote:ExtLibZip → fxm [Add example of packing using libzip]Makoto WATANABE wrote:If someone adds examples of .zip compression using libzip to the document, beginners will become happier.
-
- Posts: 231
- Joined: Apr 10, 2010 11:41
- Location: Japan
- Contact:
Re: ZIP / UnZIP
Dear fxm
Thanks for your quick response.
I am very happy.
By the way, I found another associated topic.
http://www.freebasic.net/forum/viewtopic.php?t=18627
Thanks for your quick response.
I am very happy.
By the way, I found another associated topic.
http://www.freebasic.net/forum/viewtopic.php?t=18627
Re: ZIP / UnZIP
The example I added to the documentation is taken from the last post of this topic !