block 1.2.0
block: ^1.2.0 copied to clipboard
Blob-compatible binary data blocks with platform-optimized implementations for web and io.
Unreleased #
1.2.0 #
Released: 2026-03-13
Features #
- Expose
FileBlockas a public VM API viapackage:block/io.dart. - Add
FileBlock.open()andFileBlock.openRange()for lazy file-backed block views. - Accept
dart:io Filedirectly inBlock(List<Object> parts, ...)on IO platforms.
Behavior #
- Make file-backed IO parts lazy to open while preserving reusable file-backed views.
- Make the default
BlockBase.arrayBuffer()fallback materialize fromstream()instead of requiring the reverse direction.
Documentation #
- Add VM file-backed usage examples to the README.
- Document
stream()as the preferred lazy integration path for downstream runtimes.
1.1.0 #
Released: 2026-02-24
- #8 Refactor internals to a flattened
lib/srclayout with thinner io/web lazy backends, reduced copy overhead, and improved benchmark performance.
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.
webimplementation that wraps nativeBlob(package:web).ioimplementation using temp files + finalizer cleanup.ioslice strategy:- copy for
<= 64KB - shared backing for
> 64KB
- copy for
- 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
_StreamBlockto 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
formStreammethod tofromStreamfor 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.