1. OK, here is an new version of an order-0 arithmetic coder.

Now, instead of keeping a one probability, and adjusting by the error, we keep two probabilities and adjust both with different rates (faster & slower). P() is an average value of both ((a+b)/2).

fpaq0m.zip (51 KB)

Enjoy!

2. Thanks Ilia! Hi!

11223040 536624 uncompressed
4976344 3.703s 295342 0.281s PPMd vJ -m256 -o2
8199543 4.703s 401051 0.265s fpaq0p result
8170102 2.390s 399337 0.141s fpaq0m result
8142671 5.859s 397554 0.312s fpaq0mw result

4. Just made some experiments with your mixer and LZPM. Well the improvement over my dummy mixer is tiny - so not worth to use it. Another trick Ive done is to use two probabilities with 16-bit precision and during mixing just use a larger shift value:
int P() {
return ((p1 + p2) >> 5);
}

void Update(int y) {
if (y) {
p1 += ((65536 - p1) >> 3);
p2 += ((65536 - p2) >> 6);
}
else {
p1 -= (p1 >> 3);
p2 -= (p2 >> 6);
}
}

5. Thanks Ilia, and Shelwien!

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•