--- On Mon, 12/29/08, Philip Hunt <[email protected]> wrote: > Am I right in understanding that the coder from fpaq0 could > be used with any other predictor?
Yes. It has a simple interface. You have a class called Predictor which is your bit sequence predictor. It has 2 member functions that you have to write. p() should return your estimated probability that the next bit will be a 1, as a 12 bit number (0 to 4095). update(y) then tells you what that bit actually was, a 0 or 1. The encoder will alternately call these 2 functions for each bit of the sequence. The predictor doesn't know whether it is compressing or decompressing because it sees exactly the same sequence either way. So the easy part is done :) -- Matt Mahoney, [email protected] ------------------------------------------- agi Archives: https://www.listbox.com/member/archive/303/=now RSS Feed: https://www.listbox.com/member/archive/rss/303/ Modify Your Subscription: https://www.listbox.com/member/?member_id=8660244&id_secret=123753653-47f84b Powered by Listbox: http://www.listbox.com
