May 22, 2011 Replies: 4 This update adds support for gzip and zlib compression. It allows you to wrap an input stream or output stream and then decompress data while reading or compress data while writing. It also supports in-memory compression and decompression. A full example is available in the manual: http://www.b4x.com/android/help/randomaccessfile.html#compressedstreams Installation instructions: - Unzip the attached file. - Copy both files to the internal libraries folder: C:\Program Files\Anywhere Software\Basic4android\Libraries Attachments RandomAccessFile.zip RandomAccessFile.zip 18.7 KB · Views: 1,156 Click to expand...
This update adds support for gzip and zlib compression. It allows you to wrap an input stream or output stream and then decompress data while reading or compress data while writing. It also supports in-memory compression and decompression. A full example is available in the manual: http://www.b4x.com/android/help/randomaccessfile.html#compressedstreams Installation instructions: - Unzip the attached file. - Copy both files to the internal libraries folder: C:\Program Files\Anywhere Software\Basic4android\Libraries
L leitor79 Active Member Licensed User Longtime User Jun 5, 2014 #4 Hi! Can multiple files be compressed into one gzip? How can I do it? I've tried several things, for exampel: Code: out1=File.OpenOutput("",sFile,False) out = File.Openoutput("", sc, True) out=compress.WrapoutputStream(out1,"gzip") WriteStringToStream(out, s) With that I get 0 byte file. I've also tried OpenInput for the file to compress (it has more sense to me since I'm not writing there) but I got errors (wrapinputstream returns an inputstream, thing I don't get it because I need an outputstream to write the file, right?) Thank you! PS: gzip or any format would do it. Last edited: Jun 5, 2014
Hi! Can multiple files be compressed into one gzip? How can I do it? I've tried several things, for exampel: Code: out1=File.OpenOutput("",sFile,False) out = File.Openoutput("", sc, True) out=compress.WrapoutputStream(out1,"gzip") WriteStringToStream(out, s) With that I get 0 byte file. I've also tried OpenInput for the file to compress (it has more sense to me since I'm not writing there) but I got errors (wrapinputstream returns an inputstream, thing I don't get it because I need an outputstream to write the file, right?) Thank you! PS: gzip or any format would do it.
Erel B4X founder Staff member Licensed User Longtime User Jun 5, 2014 #5 Please start a new thread for this question.