B4A Library RandomAccessFile - V1.15 - Android gzip and zlib compressions

Not open for further replies.
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


  • RandomAccessFile.zip
    18.7 KB · Views: 729


Active Member
Licensed User
Longtime User

Can multiple files be compressed into one gzip? How can I do it? I've tried several things, for exampel:

out = File.Openoutput("", sc,  True)
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:
Not open for further replies.