I get in this work moods I have thought about this alot but have often started and stopped. So today I worked on it. First of all its not about the code. I changed arb255 to become the bijective version. It will compress 99.999% of all files smaller then fpaq0p_sh. I left all the bells and whistles of arb255 alone and used 64 bit state instead of 32 which is what was used. The output looks nothing like fpaq0p_sh. But it should compress the last majority of files smaller than what fpaq0p_sh does. The method I used was to calculate P the way it was in original fpaq0p_sh and then convert it to a ONE ZERO count at which point it just feeds into arb255. Also included arb255 code. It may not be the best for errors since it was only slightly cleaned up for MinGW.
book1 book1bwts book1unbwts book1bwt are all 768771 bytes long
the first 3 files all have the same information and can be transformed to each other
the last file book1bwt is missing information to get to the others. It needs an index
so though it compresses smaller than the others sometimes one must not forget the file space needed for the index.
That said arb255 compress all there files to 435125 bytes
the other two compresss nonstationary and compress to various lengths
sometimes smaller than what arb255 does and sometimes longer. However
it is thought by most that for useful files fpaq0p_sh will compress better
than arb255 and I have to agree that seems true.
first the old fpaq0p_sh length and then the arb0p_sh_32 length
book1 441,139 441,131
book1bwts 241,458 241,450
book1unbwts 443,487 443,479
book1bwt 241,455 241,448
Note arb255 beats fpaq0p_sh for book1unbwts
Note though it looks like book1.bwt is better than book1bwts. It is not since you still need the index for the book1bwt. But for various files they alternate as to which is best
However arb0p_sh_32 will most like beat any file normally encountered when compared to fpaq0p_sh. If you can find one let me now. Also it was quick and dirty if any errors let me know.