cramps features decompression in-memory in place and to avoid copying data you 
can put uncompressed TIFF in it. cramfs decompresses into NSData objects 
in-place and can be taken up directly by NSImage/UIImage/CGImage/CIImage 
object. cramfs variant that is based on zlib makes that image a equivalent of 
PNG format.

On Apr 9, 2014, at 17:29, Uli Kusterer <witness.of.teacht...@gmx.net> wrote:

> On 09 Apr 2014, at 07:22, dangerwillrobinsondan...@gmail.com wrote:
>> Base64 encode images into one file. It could even be an SQLite db file. 
> 
> I’d recommend against base64-encoding possibly large binary data like image 
> files. base64 makes it balloon in size. It’s fine for storing small binary 
> bits like bookmark data (i.e. aliases) or NSDates in an Info.plist or XML 
> file, but if there are enough images to cause running out of file 
> descriptors, they are enough images that the overhead of base64-decoding will 
> be relevant.
> 
> I worked on a project where we used to store a (comparatively small, ~700x500 
> pixels) preview of a JPEG file in a plist file as NSData. Even then we 
> realized that decoding of this data was a big bottleneck for load times when 
> showing a list of all these previews. We eventually switched to a separate 
> image file and had a large benefit. Later when the previews needed to become 
> larger, this saved our bacon. Given most common image formats these days are 
> compressed already, anything beyond a tarball probably hurts more than it 
> helps.
> 
> Now admittedly, we also gained the ability to not have to load the image file 
> just because we needed some other key from the plist, but just moving the 
> data from a hard disk over the bus can be a bottleneck, not even mentioning 
> having to process each byte (and thus copying it again). Especially since 
> that’s just to get the raw JPEG data, which is then decompressed and thus 
> “copied” again.
> 
> Cheers,
> -- Uli Kusterer
> “The Witnesses of TeachText are everywhere...”
> http://zathras.de
> 
> 
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/xcvista%40me.com
> 
> This email sent to xcvi...@me.com

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to