Please sign in to comment.
Added license and readme. The license applies retroactively to all pr…
…evious versions of the contents of this repository.
- Loading branch information...
|@@ -0,0 +1,9 @@|
|+Copyright © 2012 Peter Hosey|
|+ All rights reserved.|
|+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:|
|+* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.|
|+* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.|
|+* Neither the name of Peter Hosey nor the names of his contributors may be used to endorse or promote products derived from this software without specific prior written permission.|
|+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.|
|@@ -0,0 +1,17 @@|
|+# QLDataURL and NSData data: URI category|
|+This repository contains two things:|
|+## A category on NSData for the creation of data: URIs|
|+This category adds one public method to NSData instances to make it easy to create data: URIs. You pass in a MIME type (required by the data: URI spec) describing the type of data; it returns an NSURL object containing the URI.|
|+Warning: The returned URI may be long (proportionally to the input data). Be careful where you output it, so as not to bury the user in seemingly garbage text.|
|+## A test app testing the use of data: URIs with Quick Look|
|+The Quick Look APIs require you to specify items to preview or generate thumbnails for as file URLs. I wondered whether you could pass bare data by wrapping it in a data: URI.|
|+The answer is no. The app proves this by experiment.|
|+Aside from demonstrating the use of the various Quick Look APIs, there is nothing else to do with the app. I recommend ignoring it.|