NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev
Adaptive arithmetic coding for efficient lossless compression of bytes in pure Dart.
Last release 4 months ago
03 Jun 2026
Too new to tell
only 2 release windows
Nearly every release is documented
notes for 5 of 5 stable releases
Nothing withdrawn
no release was ever pulled
6 months old
5 releases · first in 2026
One column per month.
Performance: optimized encode/decode for order-1, order-2 (and order-3) context models.
ContextModel and ContextState:
_LazyContextModel base class that allocates one Fenwick tree perinit/reset now cost is proportional to the contexts actually usedsize² for order-2, more forContextModelOrder1/Order2/Order3 now extend _LazyContextModel andFenwick:
freqOf) are O(1). This removes one of the two cumulative treeencode.findWithLow, which decodes a symbol and returns its lowersum(symbol - 1)) in a single descent, removing twodecode.init now builds the all-ones tree directly in O(n) (each node i holdsi & -i) instead of O(n log n), the dominant cost when many contexts arerescale and toFrequencyList now use the direct-frequency arraybenchmark/arithmetic_coder_benchmark.dart to track compression ratiotest/fenwick_test.dart covering the direct-frequency array,freqOf, findWithLow, the O(n) init, rescale/rebuild/reset sync,sum/cumulative invariants (including through many rescales).test/context_model_test.dart covering the factory, totalSize,contextIndex mapping, lazy allocation, order-3 bucketing, and pool reusereset/init.test/arithmetic_coder_test.dart with cached-model reuse acrossExposed buildContextModel method to allow customization of the context model creation.
ArithmeticCoder:
buildContextModel method to allow customization of the context model creation._buildModels to _buildContextModelCached and updated to use buildContextModel.decode method to use models.eof symbol dynamically instead of hardcoded 256.ContextModel and ContextState:
ContextStateOrder3 with three previous symbols.ContextModelOrder3 with a 3D Fenwick tree structure and a shrink factor to reduce memory usage.order getter to ContextState and ContextModel to indicate the model order.maxContextOrder constant (value 3) to ContextModel.ContextModel to support order 3.order getter.order getter.ContextModelOrder3:
Updated _tree field initialization to use typed lists ( Uint8List , Uint16List , Uint32List , Uint64List ) based on the bit length of maxTotal for mem
Fenwick - reduce memory usage:
_tree field initialization to use typed lists (Uint8List, Uint16List, Uint32List, Uint64List) based on the bit length of maxTotal for memory efficiency._buildIntList to create appropriate typed list for frequency storage.computeMaxTotal to return (1 << (precision ~/ 2)) - 1 instead of 1 << (precision ~/ 2) to correctly compute maximum total frequency._tree initialization from List.filled to use _buildIntList in constructor.Added context modeling support to ArithmeticCoder :
Added context modeling support to ArithmeticCoder:
order parameter to specify finite-order Markov models (0, 1, or 2).ContextModel abstraction with adaptive Fenwick trees per context.toString override to ArithmeticCoder showing order and model size.ContextModel:
ContextModel with factory constructor for orders 0, 1, and 2.ContextModelOrder0, ContextModelOrder1, and ContextModelOrder2 with corresponding ContextState classes.arithmetic_coder.dart:
ContextModel for symbol frequency management.example/arithmetic_coder_example.dart:
ArithmeticCoder(order: 2)._listEquals for byte list comparison.test/arithmetic_coder_test.dart:
ArithmeticCoder instantiations inside tests.pubspec.yaml:
1.0.1.1.0.0 Initial version.
Your coding agent can read these notes before it upgrades. Set up the MCP server →