| To: | realbasic-nug@lists.realsoftware.com |
|---|---|
| Subject: | Re: File Suggestions? |
| From: | Brendan Murphy <bmurphy@truenorthsoftware.com> |
| Date: | Tue, 28 Apr 2009 14:23:19 -0500 |
| Authentication-results: | mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com; domainkeys=hardfail header.From=bmurphy@truenorthsoftware.com |
| Delivered-to: | listarchive@realsoftware.com |
| Domainkey-signature: | a=rsa-sha1; q=dns; c=nofws; s=default; d=truenorthsoftware.com; h=Received:Message-Id:From:To:In-Reply-To:Content-Type:Content-Transfer-Encoding:Mime-Version:Subject:Date:References:X-Mailer:X-Identified-User; b=gJ83keTPwB7DK6PWLvyzL2bZYEYyCgbSBtQW9ofJ0W7YPw2A/dAyaPsP1cTk/7aLlZAqsa/HzPTol/kChwXiqfYFi2k0neSHYv5BEPhP7vhKZ4sm2fptxSs6NypATSva; |
| Domainkey-status: | bad |
| In-reply-to: | <mailman.1.1240945205.15355.realbasic-nug@lists.realsoftware.com> |
| References: | <mailman.1.1240945205.15355.realbasic-nug@lists.realsoftware.com> |
| Reply-to: | REALbasic NUG <realbasic-nug@lists.realsoftware.com> |
| Sender: | realbasic-nug-bounces@lists.realsoftware.com |
Mark O'Neill wrote: Before I go ahead and code some binary version of my XML-based document file I'd just like to ask if there's a right and wrong way to save and read a binary file for this purpose having never really used binary files before. Background: Basically my app currently reads and writes all of its data in xml format. It is for the main purely text but also contains images which are stored in the xml as file references by EncodeBase64. (I initially stored the pictures to the xml file with Norman's pictureToStringroutine but a saved file would grow so large that it wasn't practical.)But now I need to add more images to the file and (more importantly) make the file portable, in which case file references just won't do and so I'm f going down the binary file route. So my question is - what's the best approach to storing different kinds of text and images in one binary file for use as a document file by my app? Any pitfalls/ schoolboy errors to watch out for? I would embed all the images in the XML as you originally suggested. What you need to do is compress the XML stream as a whole just before you save it. An alternative solution is to create a virtual volume and store the XML and pictures in it. This would solve the file reference problem, but you still need to deal with the compression problem. _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html> |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: The "Line" control, Karen |
|---|---|
| Next by Date: | Re: [ANN] MBS REALbasic plug-ins 9.3, Roland Vögtli |
| Previous by Thread: | Re: File Suggestions?, Peter K. Stys |
| Next by Thread: | Re: File Suggestions?, Mark O'Neill |
| Indexes: | [Date] [Thread] [Top] [All Lists] |