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

PlatformAndroid

Fast, cross-platform OpenSubtitles hashing. Reads only 128 KB regardless of file size. Uses native code on Android for zero-copy content URI access.

Changelog #

1.0.0 #

Initial release of opensubtitles_hasher.

Features #

  • OpenSubtitlesHasher.computeHash(path) — async hashing from a file path
  • OpenSubtitlesHasher.computeHashSync(path) — synchronous hashing for non-async contexts
  • OpenSubtitlesHasher.computeFileHash(file) — hash from a dart:io File object
  • OpenSubtitlesHasher.computeHashResult(path) — single call returning both hash and file size
  • OpenSubtitlesHasher.isValidHash(hash) — validate OpenSubtitles hash format
  • HashResult.toApiMap() — produces {moviehash, moviebytesize} for REST API calls

Android #

  • Native Kotlin plugin for zero-copy hashing from content:// URIs
  • File size retrieval via ContentResolver without opening the file
  • Persistable URI permission handling for long-lived access
  • Built-in pickMovie activity for native file selection

Performance #

  • Reads only 128 KB per file (first and last 64 KB) regardless of file size
  • Uses RandomAccessFile — no full file loading into memory
  • 64-bit arithmetic implemented with two 32-bit halves for precision

Quality #

  • 100% null-safe (Dart 3)
  • Zero runtime dependencies
  • 12 unit tests covering determinism, edge cases, and validation
  • flutter test and flutter pub publish --dry-run pass cleanly
1
likes
150
points
51
downloads

Documentation

API reference

Publisher

verified publisherdarkmintis.dev

Weekly Downloads

Fast, cross-platform OpenSubtitles hashing. Reads only 128 KB regardless of file size. Uses native code on Android for zero-copy content URI access.

Repository (GitHub)
View/report issues

Topics

#opensubtitles #hash #subtitle #video #media

License

MIT (license)

Dependencies

flutter

More

Packages that depend on opensubtitles_hasher

Packages that implement opensubtitles_hasher