Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

A transistor protected by a fast-acting fuse will protect the fuse by blowing first.


devel / comp.compression / Re: MTF better than AdaptHuff?

SubjectAuthor
* MTF better than AdaptHuff?Harry Potter
`- Re: MTF better than AdaptHuff?Phil Carmody

1
MTF better than AdaptHuff?

<2e3f9963-6984-4194-99d8-a5b39c8d7838n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=251&group=comp.compression#251

  copy link   Newsgroups: comp.compression
X-Received: by 2002:ac8:6b52:0:b0:3a8:2e9f:6ae9 with SMTP id x18-20020ac86b52000000b003a82e9f6ae9mr289437qts.293.1671902175489;
Sat, 24 Dec 2022 09:16:15 -0800 (PST)
X-Received: by 2002:a0c:ed29:0:b0:4dd:ad5b:956c with SMTP id
u9-20020a0ced29000000b004ddad5b956cmr688672qvq.68.1671902175376; Sat, 24 Dec
2022 09:16:15 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.compression
Date: Sat, 24 Dec 2022 09:16:15 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=74.108.229.93; posting-account=xRocggoAAACFej4w6sQauoZjUP9yroE5
NNTP-Posting-Host: 74.108.229.93
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2e3f9963-6984-4194-99d8-a5b39c8d7838n@googlegroups.com>
Subject: MTF better than AdaptHuff?
From: rose.joseph12@yahoo.com (Harry Potter)
Injection-Date: Sat, 24 Dec 2022 17:16:15 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1902
 by: Harry Potter - Sat, 24 Dec 2022 17:16 UTC

Hi! I am working on several compression techniques right now. I was at one time working on a form of MTF but abandoned it thinking it did worse than AdaptHuff. However, a few weeks ago, I resurrected it and found it was *better* than AdaptHuff. Following is the code I'm using to write MTF values:
----------------------
void mtfWriteVal (unsigned c)
{ unsigned m=mtfGetVal (c);
if (m<32) {
writeoutf_11 ();
writeoutf (m, 5);
} else if (m<64) {
writeoutf_x2 (2);
writeoutf (m-32, 5);
} else if (m<128) {
writeoutf (5, 3);
writeoutf (m-64, 6);
} else {
writeoutf (6, 3);
writeoutf (m-128, 7);
}
} ------------
where mtfGetVal() gives the value translated to MTF, writeoutf_01() and writeoutf_11() write one bit, writeoutf_x2() writes two bits and writeoutf() writes the number of bits given in the second argument.

Re: MTF better than AdaptHuff?

<87mt7968eh.fsf@zotaspaz.fatphil.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=252&group=comp.compression#252

  copy link   Newsgroups: comp.compression
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: pc+usenet@asdf.org (Phil Carmody)
Newsgroups: comp.compression
Subject: Re: MTF better than AdaptHuff?
Date: Tue, 27 Dec 2022 01:40:38 +0200
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <87mt7968eh.fsf@zotaspaz.fatphil.org>
References: <2e3f9963-6984-4194-99d8-a5b39c8d7838n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="4ca94ba166611e2a511e39cdd5177387";
logging-data="3588395"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18F0VL1iUci35Z2a6nV6l//"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
Cancel-Lock: sha1:b91z6M/z9FxGqLJgBzjm1rln5ZQ=
sha1:bYNMnzYxIa2/sGUrYHzqMoP/SHY=
 by: Phil Carmody - Mon, 26 Dec 2022 23:40 UTC

Harry Potter <rose.joseph12@yahoo.com> writes:
> Hi! I am working on several compression techniques right now. I was at one time working on a form of MTF but abandoned it thinking it did worse than AdaptHuff. However, a few weeks ago, I resurrected it and found it was *better* than AdaptHuff. Following is the code I'm using to write MTF values:

This is an apples to oranges comparison. MTF could be included before
AdaptHuff, they aren't competing with each other.

Phil
--
We are no longer hunters and nomads. No longer awed and frightened, as we have
gained some understanding of the world in which we live. As such, we can cast
aside childish remnants from the dawn of our civilization.
-- NotSanguine on SoylentNews, after Eugen Weber in /The Western Tradition/

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor