• MTF Improvements?

    From Harry Potter@21:1/5 to All on Sat Feb 11 08:55:23 2023
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)