brisk_engine 1.0.0 copy "brisk_engine: ^1.0.0" to clipboard
brisk_engine: ^1.0.0 copied to clipboard

Ultra-fast, highly efficient download engine written in pure dart

license

Ultra-fast, highly efficient download engine written in pure dart

⚙ About Brisk Engine #

Brisk-Engine is the download engine that powers Brisk Download Manager now available as a separate library. It is written in pure dart and can be used in all devices without platform-specific dependencies.

🚀 Features #

  • Dynamic Connection Spawn: Downloads begin with a single connection, with more connections dynamically added on the fly.
  • Dynamic Connection Reuse: Completed connections are reassigned to assist other active connections, maintaining the maximum number of concurrent connections to maintaining the highest possible download speed.
  • Automatic connection reset: Hanging connections will be reset automatically.

Example Usage #


/// Build the download item either by using this method or manually building it
/// using HttpDownloadEngine.requestFileInfo(url). Note that buildDownloadItem(url)
/// automatically uses an isolate to request for file information while requestFileInfo
/// does so in the same isolate.
final downloadItem = await HttpDownloadEngine.buildDownloadItem(url);

/// Start the engine
DownloadEngine.start(
  downloadItem,
  settings,
  onButtonAvailability: (message) {
  /// Handle button availability. A download should only be paused or resumed
  /// when the buttons are available as notified in this method. Otherwise, it could
  /// lead to a corrupted file.
  },
  onDownloadProgress: (message) {
  /// Updates on the download progress will be notified here
  },
);

/// You can use the UID which is set on the downloadItem to pause/resume the download

/// Pause the download
DownloadEngine.pause(downloadItem.uid);

/// Resume the download
DownloadEngine.resume(downloadItem.uid);

1
likes
140
points
24
downloads

Publisher

unverified uploader

Weekly Downloads

Ultra-fast, highly efficient download engine written in pure dart

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

dartx, http, path, path_provider, stream_channel, uuid

More

Packages that depend on brisk_engine