SHARE
TWEET

Untitled

a guest May 15th, 2012 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff -rw lzma922/LzmaDec.c lzma922x/LzmaDec.c
  2. 714a715,730
  3. >
  4. >   {
  5. >     UInt32 c,pos,posmax,P;
  6. >     posmax = 1<<(p->prop.lp);
  7. >     for( pos=0; pos<posmax; pos++ ) {
  8. >       for( c=0; c<256; c++ ) {
  9. >         for( i=0; i<256; i++ ) {
  10. >           CLzmaProb* q = probs + Literal + ((pos << p->prop.lc) + (c>>(8-p->prop.lc)))*0x300;
  11. >           P = i<128 ? kBitModelTotal/2 : 126*2;
  12. >           q[0x100+i] = P;
  13. >           q[0x200+i] = kBitModelTotal-P;
  14. >         }
  15. >       }
  16. >     }
  17. >   }
  18. >
  19.  
  20. diff -rw lzma922/LzmaEnc.c lzma922x/LzmaEnc.c
  21. 1978a1979,1980
  22. > //#define LIT_PROBS(pos, prevByte)
  23. >
  24. 1981,1982c1983,1997
  25. <     for (i = 0; i < num; i++)
  26. <       p->litProbs[i] = kProbInitValue;
  27. ---
  28. >     for( i=0; i<num; i++ ) p->litProbs[i] = kProbInitValue;
  29. >
  30. >     UInt32 c,pos,posmax,P;
  31. >     posmax = 1<<(p->lp);
  32. >     for( pos=0; pos<posmax; pos++ ) {
  33. >       for( c=0; c<256; c++ ) {
  34. >         for( i=0; i<256; i++ ) {
  35. >           CLzmaProb* q = p->litProbs + ((pos << p->lc) + (c>>(8-p->lc)))*0x300;
  36. >           P = i<128 ? kProbInitValue : 126*2;
  37. >           q[0x100+i] = P;
  38. >           q[0x200+i] = kBitModelTotal-P;
  39. >         }
  40. >       }
  41. >     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top