06-04-2012 01:26 PM
Hey guys, I'm new 'round here and I'm searching in the forum for a way to manipulate .zip, .rar and 7-zip archives. But without success yet.
I've found that thing, gzip (GNU zip), but it doesn't work with .rar or .zip (because of the codification, I guess...). Someone suggested the zipMe. Maybe there's something new that I didn't find, I'm still searching.
Can somebody help me with a tip or something like that?
Grateful for any help, in advance.
06-05-2012 03:19 AM
06-06-2012 01:02 PM
simon_hain, thank you for greeting and your sugestions.
I'm searching for a way to read a serie of compressed images in .rar/.zip/.7zip archives (I don't know if it is possible). If there's no way to read inside them, maybe can I just decompress them.
I'll keep searching for libs for .7zip and .rar archives, for now I'll try use java.util.zip for .zip and .gzip archives. I don't know if it's fast. Performance is a critical issue because my app will run on a smartphone.
This uncertainty is due to the fact that's my first blackberry application.
One more time, thank you for your help. Any sugestion about libs for 7zip and rar archive manipulation will be appreciated.
06-06-2012 03:22 PM
I want see the images inside them, but if decompress them is the only way to acces these files, I'll do this.
These files will be located into SD card.
06-07-2012 04:53 AM
The 7-Zip SDK includes a pure Java implementation of the algorithm and it builds fine on the Blackberry SDK:
SevenZip.Compression.LZMA.Decoder decoder = new SevenZip.Compression.LZMA.Decoder(); ByteArrayInputStream inStream = new ByteArrayInputStream(clearText, 0, clearText.length); int propertiesSize = 5; byte properties = new byte[propertiesSize]; if (inStream.read(properties, 0, propertiesSize) != propertiesSize) throw new Exception("input .lzma file is too short"); decoder.SetDecoderProperties(properties); // TODO: there seems to be no sensible way to predict the output size boolean res = decoder.Code(inStream, outStream, clearText.length*1024);
06-07-2012 05:00 AM