Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MTF Improvements?

33 views
Skip to first unread message

Harry Potter

unread,
Feb 11, 2023, 11:55:24 AM2/11/23
to
Hi! I'm sad to say that some recent bug fixes to my main compression technique cost me a lot of ground. :( I'm still doing better than WinMount on most files, though. This post is not about that technique. Rather, it's about another technique that's to be open-source. It uses MTF, LZ77, my Last16 technique and a way to compress from the last LZ77 block. I don't know what the last is called, but it's used by the ZX0 technique. This technique is doing pretty well but not well enough. I'm wondering if I can do anything to better my version of MTF or the other methods I'm using. Following is my code for writing MTF literals:
---------------------
void mtfWriteVal (void)
{
unsigned char m=mtfGetVal (CPos[k]);
if (m<32) {
writeoutf_11 ();
writeoutf (m, 5);
} else if (m<64) {
writeoutf_x2 (2);
writeoutf (m-32, 5);
} else if (m<128) {
writeoutf_x3 (5);
writeoutf (m-64, 6);
} else {
writeoutf_x3 (6);
writeoutf (m-128, 7);
}
}
--------------------
where writoutf() writes the number of bits specified in Parameter 2 and writeoutf_xy() writes the number of bits specified by y. BTW, this code was written using cc65 C, a variant of C targeted for 8-bit computers.
0 new messages