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

Blob-compatible binary data blocks with platform-optimized implementations for web and io.

1.0.0 #

Released: 2026-02-06

BREAKING CHANGES #

  • Reset the package to a minimal Blob-compatible API:
    • Block(List<Object> parts, {String type = ''})
    • size, type, slice(), arrayBuffer(), text(), stream()
  • Removed legacy memory/cache/dedup/public management APIs.
  • Removed legacy helper exports (MemoryManager, DataStore, DisposableBlock, ByteDataView, etc.).

Added #

  • Platform-specialized implementations under one package via conditional imports.
  • web implementation that wraps native Blob (package:web).
  • io implementation using temp files + finalizer cleanup.
  • io slice strategy:
    • copy for <= 64KB
    • shared backing for > 64KB
  • New VM/web contract tests and Flutter integration test coverage.

0.0.4 #

Unreleased

Bug Fixes #

  • Fixed issue with Stream-based blocks when creating multiple slices
  • Added caching mechanism to _StreamBlock to support multiple accesses to non-broadcast streams
  • Updated documentation with best practices for handling large files with streams

Improvements #

  • Added data deduplication feature to optimize memory usage when storing identical blocks
  • Added public API to view deduplication statistics and memory savings
  • Improved memory management under memory pressure conditions
  • Added comprehensive tests for stream caching functionality
  • Enhanced README examples for processing large files

0.0.3 #

Released: 2025-03-03

Bug Fixes #

  • Fix typo: renamed formStream method to fromStream for better API consistency

0.0.2 #

Released: 2025-03-03

Improve code comments

0.0.1 #

Released: 2025-03-02

Initial stable release of the Block package.

3
likes
150
points
76
downloads

Publisher

verified publishermedz.dev

Weekly Downloads

Blob-compatible binary data blocks with platform-optimized implementations for web and io.

Repository (GitHub)
View/report issues

Topics

#binary #blob #streams #web #io

Documentation

API reference

License

MIT (license)

Dependencies

web

More

Packages that depend on block