Zipping Files In Memory With Xojo

Jeannot Muller
Oct 14 · 1 min read

If you are generating a lot of files in Xojo to be downloaded, it makes sense to zip your files, so that the end-user has only to download one file.

You can easily achieve this with MonkeyBread’s MBS Plugin: ArchiveWriterMBS, which you can download here.

The following code is showing how to create 3 text files in-memory. These files are then getting compressed in-memory and then automatically downloaded. This project is for Xojo Web 2.0 but will work as well for Desktop Apps with a few changes.

You need to create the following properties in Xojo’s IDE:

Image for post
Image for post

Learn Xojo

Everything About Developing with Xojo.com

Jeannot Muller

Written by

Managing director at https://teccompanion.com, physician, founder & executive consultant, developer and blogger.

Learn Xojo

Code snippets, tips and tricks to develop like a pro with the fantastic xojo.com tool on Windows, macOS, iOS, Web and Linux

Jeannot Muller

Written by

Managing director at https://teccompanion.com, physician, founder & executive consultant, developer and blogger.

Learn Xojo

Code snippets, tips and tricks to develop like a pro with the fantastic xojo.com tool on Windows, macOS, iOS, Web and Linux

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store