svs_web library
Web-only additions to package:svs, for working with slides larger than
memory: BlobByteSource opens a slide straight from a browser File,
and FileSystemWritableByteSink streams an export into one.
This library needs dart:js_interop, so only import it from code that
is compiled for the web — behind a conditional import
(if (dart.library.js_interop)) in an app that also targets other
platforms.
Classes
- BlobByteSource
-
A RandomAccessByteSource that reads a browser
Blob— usually aFilefrom an<input type="file">or a drop event — one slice at a time, so a slide opened from it withSvsFile.openSourceis never loaded into memory whole, however large it is. - FileSystemWritableByteSink
-
A RandomAccessByteSink that writes to a browser file through a
FileSystemWritableFileStream, so an export streamed into it with e.g.exportSvsRegionAsSvsToSinkgoes to disk instead of memory, however large the output.