Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 15
Registered: ‎06-02-2012
My Device: BlackBerry 10 Dev Alpha
Accepted Solution

ZLIB to unzip archive on BB10

Hi all !

 

I need to download and unzip a .zip archive to my sandbox (~/data/mydata) for processing. But my solution from Linux desktop (based on zlib) is uncompilable in BB10 SDK.

 

My question is: How to unzip .zip file in BB10 (native/cascades) right way?

 

Thanks in advance

Turdidae

BlackBerry Development Advisor (Retired)
Posts: 329
Registered: ‎05-07-2012
My Device: BB Alpha

Re: ZLIB to unzip archive on BB10

Hi there, welcome to the forums.

 

What is the solution you are using on Linux?

 

I am not sure I understand what you are trying to do. Are you simply looking for a piece of software that will extract your .zip file on your file system, then move it on the device's sandbox?

 

Martin

Developer
Posts: 15
Registered: ‎06-02-2012
My Device: BlackBerry 10 Dev Alpha

Re: ZLIB to unzip archive on BB10

On Linux I'm using QuaZIP. But on BB10 I've problems with it. So I'm looking for another solution to unzip archives on BB10.

Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook

Re: ZLIB to unzip archive on BB10

Just use zlib, how? there is plenty docs, start here http://zlib.net/zlib_how.html

 

Developer
Posts: 15
Registered: ‎06-02-2012
My Device: BlackBerry 10 Dev Alpha

Re: ZLIB to unzip archive on BB10

Hi all,

 

This lib http://osdab.42cows.org/snippets/zip.php?mode=advanced#usage is a simple solution to zip/unzip files on BB10.

 

Thanks all

Turdidae

Developer
Posts: 89
Registered: ‎03-17-2013
My Device: Dev Alpha + Z10

Re: ZLIB to unzip archive on BB10

@turdidae:

I tried to use the project you mentioned, but I'm getting compile errors:

 

C:\Users\repisky\code\pokusy\BB10_migr\src\unzip\zip.cpp:286: error: invalid conversion from 'const z_crc_t* {aka const unsigned int*}' to 'const crc_t* {aka const long unsigned int*}' [-fpermissive]
C:\Users\repisky\code\pokusy\BB10_migr\src\unzip\zip.cpp:854: error: 'time' was not declared in this scope

How did you fix those?

I have added -lz to LIBS.


SQL Terminal – command-line interface to local SQLite database
Developer
Posts: 105
Registered: ‎10-19-2012
My Device: Playbook, BB10DevAlphaB

Re: ZLIB to unzip archive on BB10

What kind of problems ? I was planning on using it, at least it builds just fine. Haven't tried using it yet.