Skip to main content

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

High-performance, crash-safe, single-file binary container with chunked storage and append-only write-ahead log (WAL) for Dart.

0.1.0 #

  • Initial release of walpack: single-file binary container (WLPK v1) with immutable chunked snapshot storage, append-only CRC32-C Write-Ahead Log (WAL), and Copy-on-Write (CoW) compaction (atomicReplace + rename()).
  • High-throughput pure-Dart primitives built on pro_binary:
    • Slicing-by-8 CRC32-C (including crc32cCombine GF(2) composition to eliminate duplicate chunk scans during WAL commits) and 32-bit stripe XXH32 integrity checks.
    • Pure-Dart LZ4 block codec (L1 hash table + exponential doubling match decoder + 64-bit fast-loop) plus native ZLibChunkCodec.
    • Scatter-gather commit frames (writeView + takeChunks()), a zero-builder appendOp() / appendOpWith() fast path, optional readCacheBytes LRU cache, and offset-sorted read-coalesced readChunks() batch reads.
    • Native sorted primary-key binary search (keysWithPrefix, keysInRange, readPrefix, readRange) and Snapshot+WAL int/String secondary indexes (queryIntIndex, queryStringIndex, readIntIndex, readStringIndex).
    • IoStorageBackend with lazy single open, dirty-tracked close(), cursor tracking (_knownPos), IoMode (hybrid with <= 256 KiB sync path / sync / async), Windows transient-handle support (keepHandleOpen), and 512 KiB FastCopyStorageBackend.copyRangeTo pass-through compaction.
  • Production hardening & cross-process coordination:
    • WalPackLimits bounded decoding (including bounded chunked ZLib inflation against oversized/zip-bomb payloads) and structural TOC/Base Index/WAL validation (duplicate keys, duplicate index ordinals, [64, tocOffset] range checks, bounded strings/frames).
    • Isolated MemoryStorageBackend.readAt copies, strict bounds validation across storage backends, canonicalized AdjacentLockStrategy, and synchronized lock-registry cleanup.
    • Live partial-write rollback (truncate(_walEndOffset)) on failed commits.
    • Optimistic Concurrency Control (expectedSeq -> CommitConflict) and GenerationAwareLockStrategy (TempDirLockStrategy, AdjacentLockStrategy) with 8-byte lock-file generation tracking.
    • Pluggable StorageBackend (native file I/O, Web/WASM MemoryStorageBackend, FaultInjectionBackend), verified across unit/fuzz/oracle/interop/Node.js suites.
1
likes
70
points
--
downloads

Documentation

Documentation

Publisher

verified publisherpro100.dev

Weekly Downloads

High-performance, crash-safe, single-file binary container with chunked storage and append-only write-ahead log (WAL) for Dart.

Repository (GitHub)
View/report issues

Topics

#storage #binary #wal #container #database

License

MIT (license)

Dependencies

meta, pro_binary

More

Packages that depend on walpack