16 ms·
Use compressed data directly - from ZIP files or gzip http response
- j_s 15y agoI was hoping for something more like this: Extracting files from a remote ZIP archive (accessing files stored inside a zip file without downloading the whole zip archive) http://www.codeproject.com/KB/cs/remotezip.aspx http://www.codeproject.com/KB/cs/remotezip.aspx And would like to see an implementation of a server-side means of generating arbitrary .zip files (just storing, without compression) dynamically... for automatic large download integrity verification. Places like http://put.io http://put.io could use something like that.
- gildas 15y agoI wrote something similar in JS https://github.com/gildas-lormeau/zip.js/blob/master/WebContent/zip.js https://github.com/gildas-lormeau/zip.js/blob/master/WebCont... The HttpRangeReader class is able to extract a file from the zip without downloading the whole zip. Thanks to new Blob APIs , extracting data from a zip without compression is quite fast. Then, you just have to use url.createObjectURL to convert the Blob object into a URL.
- amitparikh 15y agoIf you know that the input data is ASCII-encoded (or Unicode-encoded and capable of being ASCII-encoded), then using Python's cStringIO package (http://docs.python.org/library/stringio.html http://docs.python.org/library/stringio.html) is preferential for the significant speed boost.