arithmetic_coder 1.0.2
arithmetic_coder: ^1.0.2 copied to clipboard
Adaptive arithmetic coding for efficient lossless compression of bytes in pure Dart.
1.0.2 #
-
Added context modeling support to
ArithmeticCoder:- Added
orderparameter to specify finite-order Markov models (0, 1, or 2). - Integrated
ContextModelabstraction with adaptive Fenwick trees per context. - Updated encoding and decoding to use context-dependent frequency models.
- Added
toStringoverride toArithmeticCodershowing order and model size.
- Added
-
ContextModel:- Introduced abstract
ContextModelwith factory constructor for orders 0, 1, and 2. - Implemented
ContextModelOrder0,ContextModelOrder1, andContextModelOrder2with correspondingContextStateclasses. - Each model maintains Fenwick trees for symbol frequencies per context.
- Adaptive frequency updates and context state transitions implemented.
- Introduced abstract
-
arithmetic_coder.dart:- Refactored to use
ContextModelfor symbol frequency management. - Encoding and decoding now maintain and update context states.
- Added detailed comments on algorithm and context modeling.
- Refactored to use
-
example/arithmetic_coder_example.dart:- Updated example to use
ArithmeticCoder(order: 2). - Increased input repetition count for better compression demonstration.
- Added output of compression ratio and integrity check.
- Added helper
_listEqualsfor byte list comparison.
- Updated example to use
-
test/arithmetic_coder_test.dart:- Parameterized tests to run for orders 0, 1, and 2.
- Removed redundant
ArithmeticCoderinstantiations inside tests. - Verified encode-decode correctness and compression ratio for all orders.
-
pubspec.yaml:- Bumped version to
1.0.1.
- Bumped version to
1.0.0 #
- Initial version.