Skip to main content

blit 0.1.0 copy "blit: ^0.1.0" to clipboard
blit: ^0.1.0 copied to clipboard

Zero-copy Bytes/BytesMut and high-performance random-access file I/O for Dart and Flutter, with native FFI mmap and Web OPFS.

Changelog #

0.1.0 #

First development release.

Added #

  • Zero-copy Bytes views (slice/sublist O(1)) and BytesMut with freeze/splitTo/splitOff copy-on-write semantics.
  • Exact Uint64 (hi/lo limbs) for VM, dart2js and dart2wasm, including arithmetic, bitwise, shifts, parse and toRadixString.
  • BytesReader/BytesWriter fixed-width cursors with BE/LE support.
  • BytesFile/SyncBytesFile and the native dart:io backend.
  • Native mmap engine: Windows CreateFileMappingW, POSIX mmap/pread; sparse files, zero-copy windows, zeroize, read-only mappings.
  • Windows IocpFile: overlapped I/O + IOCP, QD 1–128 batch reads/writes.
  • MappedRegion.prefetch() / discard(): Windows PrefetchVirtualMemory (discard is a no-op for file-backed maps), POSIX madvise(MADV_WILLNEED / MADV_DONTNEED).
  • Bytes.getUint8/16/32Unchecked and BytesReader.readUint8/16/32/64Unchecked hot-path methods (caller checks bounds once).
  • Direct I/O: openMmapFileSync(..., direct: true) / ParallelBytesFile.open(..., direct: true) via Windows FILE_FLAG_NO_BUFFERING + VirtualAlloc, Linux/Android O_DIRECT, and macOS/iOS F_NOCACHE; aligned scratch buffers and 4 KiB-aligned streaming reads/writes.
  • ParallelBytesFile: isolate worker pool (default up to 32), automatic FIFO dispatch, batch 32, readMany/writeMany, watermark barriers, adjacent-range coalescing, and a read-only full-file mmap cache for hot files (default limit 1 GiB).
  • Web OPFS backend: chunk files, double-slot manifest, CRC-32, dedicated worker, capability/quota probing.
  • Benchmark suite (benchmark_test, JIT/AOT + JSONL), a generated assets/benchmarks.svg, and Dart/Flutter CI workflows.
  • Tests: differential fuzz, lifetime/error paths, 100k-op stress, 32 GiB sparse.

Fixed during development #

  • putUint64 little-endian limb encoding and atomic failure on short buffers.
  • ParallelBytesFile barrier deadlock when queued work already existed.
  • Windows read-only mapping zeroize guard and empty-file map consistency.
1
likes
0
points
557
downloads

Publisher

verified publisherunk404.com

Weekly Downloads

Zero-copy Bytes/BytesMut and high-performance random-access file I/O for Dart and Flutter, with native FFI mmap and Web OPFS.

Repository (GitHub)
View/report issues

Topics

#bytes #io #mmap #opfs #ffi

License

unknown (license)

Dependencies

ffi

More

Packages that depend on blit