ruby_abc 0.0.6 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1730) hide show
  1. checksums.yaml +5 -5
  2. data/.yardopts +7 -0
  3. data/LICENSE +51 -52
  4. data/README.md +48 -28
  5. data/bin/ruby_abc +83 -66
  6. data/ext/ruby_abc/extconf.rb +58 -0
  7. data/ext/{ruby_abc.c → ruby_abc/ruby_abc.c} +38 -70
  8. data/ext/ruby_abc/ruby_abc.map +6 -0
  9. data/ext/{ruby_abc_wrapper.c → ruby_abc/ruby_abc_wrapper.c} +0 -0
  10. data/ext/ruby_abc/ruby_abc_wrapper.h +39 -0
  11. data/lib/ruby_abc/version.rb +4 -0
  12. data/lib/ruby_abc.rb +247 -230
  13. data/share/bash_completion/ruby_abc.bash-completion.sh +24 -0
  14. data/share/osu018.genlib +66 -0
  15. data/share/simple.genlib +25 -0
  16. metadata +17 -1725
  17. data/Rakefile +0 -87
  18. data/ext/abc/CMakeLists.txt +0 -103
  19. data/ext/abc/Makefile +0 -213
  20. data/ext/abc/abc.rc +0 -146
  21. data/ext/abc/abcexe.dsp +0 -103
  22. data/ext/abc/abclib.dsp +0 -5948
  23. data/ext/abc/abcspace.dsw +0 -44
  24. data/ext/abc/arch_flags.c +0 -17
  25. data/ext/abc/copyright.txt +0 -23
  26. data/ext/abc/depends.sh +0 -13
  27. data/ext/abc/i10.aig +0 -752
  28. data/ext/abc/lib/pthread.h +0 -1369
  29. data/ext/abc/lib/sched.h +0 -178
  30. data/ext/abc/lib/semaphore.h +0 -166
  31. data/ext/abc/lib/x64/pthreadVC2.dll +0 -0
  32. data/ext/abc/lib/x64/pthreadVC2.lib +0 -0
  33. data/ext/abc/lib/x86/pthreadVC2.dll +0 -0
  34. data/ext/abc/lib/x86/pthreadVC2.lib +0 -0
  35. data/ext/abc/readme.md +0 -111
  36. data/ext/abc/readmeaig +0 -47
  37. data/ext/abc/src/aig/aig/aig.h +0 -713
  38. data/ext/abc/src/aig/aig/aigCanon.c +0 -701
  39. data/ext/abc/src/aig/aig/aigCheck.c +0 -168
  40. data/ext/abc/src/aig/aig/aigCuts.c +0 -673
  41. data/ext/abc/src/aig/aig/aigDfs.c +0 -1136
  42. data/ext/abc/src/aig/aig/aigDoms.c +0 -1154
  43. data/ext/abc/src/aig/aig/aigDup.c +0 -1335
  44. data/ext/abc/src/aig/aig/aigFact.c +0 -734
  45. data/ext/abc/src/aig/aig/aigFanout.c +0 -194
  46. data/ext/abc/src/aig/aig/aigFrames.c +0 -140
  47. data/ext/abc/src/aig/aig/aigInter.c +0 -301
  48. data/ext/abc/src/aig/aig/aigJust.c +0 -316
  49. data/ext/abc/src/aig/aig/aigMan.c +0 -486
  50. data/ext/abc/src/aig/aig/aigMem.c +0 -610
  51. data/ext/abc/src/aig/aig/aigMffc.c +0 -316
  52. data/ext/abc/src/aig/aig/aigObj.c +0 -536
  53. data/ext/abc/src/aig/aig/aigOper.c +0 -606
  54. data/ext/abc/src/aig/aig/aigOrder.c +0 -176
  55. data/ext/abc/src/aig/aig/aigPack.c +0 -404
  56. data/ext/abc/src/aig/aig/aigPart.c +0 -1613
  57. data/ext/abc/src/aig/aig/aigPartReg.c +0 -629
  58. data/ext/abc/src/aig/aig/aigPartSat.c +0 -618
  59. data/ext/abc/src/aig/aig/aigRepar.c +0 -403
  60. data/ext/abc/src/aig/aig/aigRepr.c +0 -559
  61. data/ext/abc/src/aig/aig/aigRet.c +0 -975
  62. data/ext/abc/src/aig/aig/aigRetF.c +0 -214
  63. data/ext/abc/src/aig/aig/aigScl.c +0 -708
  64. data/ext/abc/src/aig/aig/aigShow.c +0 -368
  65. data/ext/abc/src/aig/aig/aigSplit.c +0 -330
  66. data/ext/abc/src/aig/aig/aigTable.c +0 -277
  67. data/ext/abc/src/aig/aig/aigTest.c +0 -39
  68. data/ext/abc/src/aig/aig/aigTiming.c +0 -356
  69. data/ext/abc/src/aig/aig/aigTruth.c +0 -103
  70. data/ext/abc/src/aig/aig/aigTsim.c +0 -526
  71. data/ext/abc/src/aig/aig/aigUtil.c +0 -1575
  72. data/ext/abc/src/aig/aig/aigWin.c +0 -189
  73. data/ext/abc/src/aig/aig/aig_.c +0 -53
  74. data/ext/abc/src/aig/aig/module.make +0 -31
  75. data/ext/abc/src/aig/gia/gia.c +0 -52
  76. data/ext/abc/src/aig/gia/gia.h +0 -1667
  77. data/ext/abc/src/aig/gia/giaAgi.c +0 -238
  78. data/ext/abc/src/aig/gia/giaAig.c +0 -676
  79. data/ext/abc/src/aig/gia/giaAig.h +0 -78
  80. data/ext/abc/src/aig/gia/giaAiger.c +0 -1479
  81. data/ext/abc/src/aig/gia/giaAigerExt.c +0 -326
  82. data/ext/abc/src/aig/gia/giaBalAig.c +0 -1095
  83. data/ext/abc/src/aig/gia/giaBalLut.c +0 -982
  84. data/ext/abc/src/aig/gia/giaBalMap.c +0 -326
  85. data/ext/abc/src/aig/gia/giaBidec.c +0 -305
  86. data/ext/abc/src/aig/gia/giaCCof.c +0 -349
  87. data/ext/abc/src/aig/gia/giaCSat.c +0 -1105
  88. data/ext/abc/src/aig/gia/giaCSatOld.c +0 -804
  89. data/ext/abc/src/aig/gia/giaCTas.c +0 -1790
  90. data/ext/abc/src/aig/gia/giaCTas2.c +0 -208
  91. data/ext/abc/src/aig/gia/giaCex.c +0 -392
  92. data/ext/abc/src/aig/gia/giaClp.c +0 -422
  93. data/ext/abc/src/aig/gia/giaCof.c +0 -1002
  94. data/ext/abc/src/aig/gia/giaCone.c +0 -590
  95. data/ext/abc/src/aig/gia/giaConstr.c +0 -52
  96. data/ext/abc/src/aig/gia/giaCut.c +0 -646
  97. data/ext/abc/src/aig/gia/giaDfs.c +0 -582
  98. data/ext/abc/src/aig/gia/giaDup.c +0 -4791
  99. data/ext/abc/src/aig/gia/giaEdge.c +0 -1000
  100. data/ext/abc/src/aig/gia/giaEmbed.c +0 -1876
  101. data/ext/abc/src/aig/gia/giaEnable.c +0 -650
  102. data/ext/abc/src/aig/gia/giaEquiv.c +0 -2416
  103. data/ext/abc/src/aig/gia/giaEra.c +0 -602
  104. data/ext/abc/src/aig/gia/giaEra2.c +0 -1963
  105. data/ext/abc/src/aig/gia/giaEsop.c +0 -541
  106. data/ext/abc/src/aig/gia/giaFalse.c +0 -552
  107. data/ext/abc/src/aig/gia/giaFanout.c +0 -338
  108. data/ext/abc/src/aig/gia/giaForce.c +0 -1106
  109. data/ext/abc/src/aig/gia/giaFrames.c +0 -996
  110. data/ext/abc/src/aig/gia/giaFront.c +0 -295
  111. data/ext/abc/src/aig/gia/giaFx.c +0 -487
  112. data/ext/abc/src/aig/gia/giaGiarf.c +0 -1079
  113. data/ext/abc/src/aig/gia/giaGig.c +0 -506
  114. data/ext/abc/src/aig/gia/giaGlitch.c +0 -786
  115. data/ext/abc/src/aig/gia/giaHash.c +0 -816
  116. data/ext/abc/src/aig/gia/giaHcd.c +0 -689
  117. data/ext/abc/src/aig/gia/giaIf.c +0 -2536
  118. data/ext/abc/src/aig/gia/giaIff.c +0 -444
  119. data/ext/abc/src/aig/gia/giaIiff.c +0 -62
  120. data/ext/abc/src/aig/gia/giaIiff.h +0 -54
  121. data/ext/abc/src/aig/gia/giaIso.c +0 -1331
  122. data/ext/abc/src/aig/gia/giaIso2.c +0 -776
  123. data/ext/abc/src/aig/gia/giaIso3.c +0 -167
  124. data/ext/abc/src/aig/gia/giaJf.c +0 -1805
  125. data/ext/abc/src/aig/gia/giaKf.c +0 -1341
  126. data/ext/abc/src/aig/gia/giaLf.c +0 -2301
  127. data/ext/abc/src/aig/gia/giaMan.c +0 -1126
  128. data/ext/abc/src/aig/gia/giaMem.c +0 -598
  129. data/ext/abc/src/aig/gia/giaMf.c +0 -1741
  130. data/ext/abc/src/aig/gia/giaMffc.c +0 -313
  131. data/ext/abc/src/aig/gia/giaMfs.c +0 -477
  132. data/ext/abc/src/aig/gia/giaMini.c +0 -574
  133. data/ext/abc/src/aig/gia/giaMuxes.c +0 -915
  134. data/ext/abc/src/aig/gia/giaNf.c +0 -2420
  135. data/ext/abc/src/aig/gia/giaOf.c +0 -1866
  136. data/ext/abc/src/aig/gia/giaPack.c +0 -207
  137. data/ext/abc/src/aig/gia/giaPat.c +0 -135
  138. data/ext/abc/src/aig/gia/giaPf.c +0 -1354
  139. data/ext/abc/src/aig/gia/giaProp.c +0 -176
  140. data/ext/abc/src/aig/gia/giaQbf.c +0 -701
  141. data/ext/abc/src/aig/gia/giaResub.c +0 -292
  142. data/ext/abc/src/aig/gia/giaRetime.c +0 -304
  143. data/ext/abc/src/aig/gia/giaRex.c +0 -545
  144. data/ext/abc/src/aig/gia/giaSat.c +0 -427
  145. data/ext/abc/src/aig/gia/giaSat3.c +0 -136
  146. data/ext/abc/src/aig/gia/giaSatEdge.c +0 -537
  147. data/ext/abc/src/aig/gia/giaSatLE.c +0 -1083
  148. data/ext/abc/src/aig/gia/giaSatLut.c +0 -1225
  149. data/ext/abc/src/aig/gia/giaSatMap.c +0 -554
  150. data/ext/abc/src/aig/gia/giaSatoko.c +0 -274
  151. data/ext/abc/src/aig/gia/giaScl.c +0 -300
  152. data/ext/abc/src/aig/gia/giaScript.c +0 -783
  153. data/ext/abc/src/aig/gia/giaShow.c +0 -1164
  154. data/ext/abc/src/aig/gia/giaShrink.c +0 -154
  155. data/ext/abc/src/aig/gia/giaShrink6.c +0 -492
  156. data/ext/abc/src/aig/gia/giaShrink7.c +0 -373
  157. data/ext/abc/src/aig/gia/giaSim.c +0 -905
  158. data/ext/abc/src/aig/gia/giaSim2.c +0 -706
  159. data/ext/abc/src/aig/gia/giaSort.c +0 -273
  160. data/ext/abc/src/aig/gia/giaSpeedup.c +0 -805
  161. data/ext/abc/src/aig/gia/giaSplit.c +0 -578
  162. data/ext/abc/src/aig/gia/giaStg.c +0 -528
  163. data/ext/abc/src/aig/gia/giaStr.c +0 -1865
  164. data/ext/abc/src/aig/gia/giaSupMin.c +0 -165
  165. data/ext/abc/src/aig/gia/giaSupp.c +0 -886
  166. data/ext/abc/src/aig/gia/giaSweep.c +0 -777
  167. data/ext/abc/src/aig/gia/giaSweeper.c +0 -1185
  168. data/ext/abc/src/aig/gia/giaSwitch.c +0 -829
  169. data/ext/abc/src/aig/gia/giaTim.c +0 -1017
  170. data/ext/abc/src/aig/gia/giaTis.c +0 -213
  171. data/ext/abc/src/aig/gia/giaTruth.c +0 -639
  172. data/ext/abc/src/aig/gia/giaTsim.c +0 -757
  173. data/ext/abc/src/aig/gia/giaUnate.c +0 -255
  174. data/ext/abc/src/aig/gia/giaUtil.c +0 -2136
  175. data/ext/abc/src/aig/gia/module.make +0 -89
  176. data/ext/abc/src/aig/hop/cudd2.c +0 -360
  177. data/ext/abc/src/aig/hop/cudd2.h +0 -86
  178. data/ext/abc/src/aig/hop/hop.h +0 -356
  179. data/ext/abc/src/aig/hop/hopBalance.c +0 -401
  180. data/ext/abc/src/aig/hop/hopCheck.c +0 -115
  181. data/ext/abc/src/aig/hop/hopDfs.c +0 -591
  182. data/ext/abc/src/aig/hop/hopMan.c +0 -169
  183. data/ext/abc/src/aig/hop/hopMem.c +0 -120
  184. data/ext/abc/src/aig/hop/hopObj.c +0 -277
  185. data/ext/abc/src/aig/hop/hopOper.c +0 -378
  186. data/ext/abc/src/aig/hop/hopTable.c +0 -232
  187. data/ext/abc/src/aig/hop/hopTruth.c +0 -274
  188. data/ext/abc/src/aig/hop/hopUtil.c +0 -578
  189. data/ext/abc/src/aig/hop/hop_.c +0 -53
  190. data/ext/abc/src/aig/hop/module.make +0 -10
  191. data/ext/abc/src/aig/ioa/ioa.h +0 -87
  192. data/ext/abc/src/aig/ioa/ioaReadAig.c +0 -465
  193. data/ext/abc/src/aig/ioa/ioaUtil.c +0 -146
  194. data/ext/abc/src/aig/ioa/ioaWriteAig.c +0 -599
  195. data/ext/abc/src/aig/ioa/module.make +0 -3
  196. data/ext/abc/src/aig/ivy/attr.h +0 -418
  197. data/ext/abc/src/aig/ivy/ivy.h +0 -562
  198. data/ext/abc/src/aig/ivy/ivyBalance.c +0 -414
  199. data/ext/abc/src/aig/ivy/ivyCanon.c +0 -149
  200. data/ext/abc/src/aig/ivy/ivyCheck.c +0 -278
  201. data/ext/abc/src/aig/ivy/ivyCut.c +0 -995
  202. data/ext/abc/src/aig/ivy/ivyCutTrav.c +0 -478
  203. data/ext/abc/src/aig/ivy/ivyDfs.c +0 -498
  204. data/ext/abc/src/aig/ivy/ivyDsd.c +0 -831
  205. data/ext/abc/src/aig/ivy/ivyFanout.c +0 -314
  206. data/ext/abc/src/aig/ivy/ivyFastMap.c +0 -1569
  207. data/ext/abc/src/aig/ivy/ivyFraig.c +0 -2972
  208. data/ext/abc/src/aig/ivy/ivyHaig.c +0 -535
  209. data/ext/abc/src/aig/ivy/ivyMan.c +0 -552
  210. data/ext/abc/src/aig/ivy/ivyMem.c +0 -121
  211. data/ext/abc/src/aig/ivy/ivyMulti.c +0 -312
  212. data/ext/abc/src/aig/ivy/ivyMulti8.c +0 -432
  213. data/ext/abc/src/aig/ivy/ivyObj.c +0 -481
  214. data/ext/abc/src/aig/ivy/ivyOper.c +0 -298
  215. data/ext/abc/src/aig/ivy/ivyResyn.c +0 -201
  216. data/ext/abc/src/aig/ivy/ivyRwr.c +0 -618
  217. data/ext/abc/src/aig/ivy/ivyRwrAlg.c +0 -413
  218. data/ext/abc/src/aig/ivy/ivySeq.c +0 -1142
  219. data/ext/abc/src/aig/ivy/ivyShow.c +0 -343
  220. data/ext/abc/src/aig/ivy/ivyTable.c +0 -272
  221. data/ext/abc/src/aig/ivy/ivyUtil.c +0 -824
  222. data/ext/abc/src/aig/ivy/ivy_.c +0 -53
  223. data/ext/abc/src/aig/ivy/module.make +0 -22
  224. data/ext/abc/src/aig/miniaig/abcOper.h +0 -249
  225. data/ext/abc/src/aig/miniaig/miniaig.h +0 -346
  226. data/ext/abc/src/aig/miniaig/minilut.h +0 -288
  227. data/ext/abc/src/aig/miniaig/module.make +0 -1
  228. data/ext/abc/src/aig/miniaig/ndr.h +0 -521
  229. data/ext/abc/src/aig/saig/module.make +0 -26
  230. data/ext/abc/src/aig/saig/saig.h +0 -200
  231. data/ext/abc/src/aig/saig/saigCone.c +0 -181
  232. data/ext/abc/src/aig/saig/saigConstr.c +0 -484
  233. data/ext/abc/src/aig/saig/saigConstr2.c +0 -1013
  234. data/ext/abc/src/aig/saig/saigDual.c +0 -240
  235. data/ext/abc/src/aig/saig/saigDup.c +0 -600
  236. data/ext/abc/src/aig/saig/saigGlaCba.c +0 -840
  237. data/ext/abc/src/aig/saig/saigGlaPba.c +0 -589
  238. data/ext/abc/src/aig/saig/saigGlaPba2.c +0 -558
  239. data/ext/abc/src/aig/saig/saigInd.c +0 -409
  240. data/ext/abc/src/aig/saig/saigIoa.c +0 -405
  241. data/ext/abc/src/aig/saig/saigIso.c +0 -628
  242. data/ext/abc/src/aig/saig/saigIsoFast.c +0 -353
  243. data/ext/abc/src/aig/saig/saigIsoSlow.c +0 -1224
  244. data/ext/abc/src/aig/saig/saigMiter.c +0 -1317
  245. data/ext/abc/src/aig/saig/saigOutDec.c +0 -205
  246. data/ext/abc/src/aig/saig/saigPhase.c +0 -1081
  247. data/ext/abc/src/aig/saig/saigRefSat.c +0 -986
  248. data/ext/abc/src/aig/saig/saigRetFwd.c +0 -248
  249. data/ext/abc/src/aig/saig/saigRetMin.c +0 -705
  250. data/ext/abc/src/aig/saig/saigRetStep.c +0 -236
  251. data/ext/abc/src/aig/saig/saigScl.c +0 -115
  252. data/ext/abc/src/aig/saig/saigSimFast.c +0 -451
  253. data/ext/abc/src/aig/saig/saigSimMv.c +0 -956
  254. data/ext/abc/src/aig/saig/saigSimSeq.c +0 -518
  255. data/ext/abc/src/aig/saig/saigStrSim.c +0 -976
  256. data/ext/abc/src/aig/saig/saigSwitch.c +0 -573
  257. data/ext/abc/src/aig/saig/saigSynch.c +0 -665
  258. data/ext/abc/src/aig/saig/saigTempor.c +0 -256
  259. data/ext/abc/src/aig/saig/saigTrans.c +0 -428
  260. data/ext/abc/src/aig/saig/saigUnfold2.c +0 -497
  261. data/ext/abc/src/aig/saig/saigWnd.c +0 -816
  262. data/ext/abc/src/aig/saig/saig_.c +0 -52
  263. data/ext/abc/src/base/abc/abc.h +0 -1064
  264. data/ext/abc/src/base/abc/abcAig.c +0 -1505
  265. data/ext/abc/src/base/abc/abcBarBuf.c +0 -513
  266. data/ext/abc/src/base/abc/abcBlifMv.c +0 -1167
  267. data/ext/abc/src/base/abc/abcCheck.c +0 -953
  268. data/ext/abc/src/base/abc/abcDfs.c +0 -1910
  269. data/ext/abc/src/base/abc/abcFanOrder.c +0 -652
  270. data/ext/abc/src/base/abc/abcFanio.c +0 -366
  271. data/ext/abc/src/base/abc/abcFunc.c +0 -1273
  272. data/ext/abc/src/base/abc/abcHie.c +0 -843
  273. data/ext/abc/src/base/abc/abcHieCec.c +0 -764
  274. data/ext/abc/src/base/abc/abcHieGia.c +0 -582
  275. data/ext/abc/src/base/abc/abcHieNew.c +0 -1635
  276. data/ext/abc/src/base/abc/abcInt.h +0 -60
  277. data/ext/abc/src/base/abc/abcLatch.c +0 -778
  278. data/ext/abc/src/base/abc/abcLib.c +0 -400
  279. data/ext/abc/src/base/abc/abcMinBase.c +0 -841
  280. data/ext/abc/src/base/abc/abcNames.c +0 -802
  281. data/ext/abc/src/base/abc/abcNetlist.c +0 -511
  282. data/ext/abc/src/base/abc/abcNtk.c +0 -2298
  283. data/ext/abc/src/base/abc/abcObj.c +0 -1075
  284. data/ext/abc/src/base/abc/abcRefs.c +0 -457
  285. data/ext/abc/src/base/abc/abcShow.c +0 -458
  286. data/ext/abc/src/base/abc/abcSop.c +0 -1356
  287. data/ext/abc/src/base/abc/abcUtil.c +0 -3269
  288. data/ext/abc/src/base/abc/abc_.c +0 -52
  289. data/ext/abc/src/base/abc/module.make +0 -23
  290. data/ext/abc/src/base/abci/abc.c +0 -44490
  291. data/ext/abc/src/base/abci/abcAttach.c +0 -409
  292. data/ext/abc/src/base/abci/abcAuto.c +0 -256
  293. data/ext/abc/src/base/abci/abcBalance.c +0 -629
  294. data/ext/abc/src/base/abci/abcBidec.c +0 -156
  295. data/ext/abc/src/base/abci/abcBm.c +0 -2050
  296. data/ext/abc/src/base/abci/abcBmc.c +0 -122
  297. data/ext/abc/src/base/abci/abcCas.c +0 -128
  298. data/ext/abc/src/base/abci/abcCascade.c +0 -1062
  299. data/ext/abc/src/base/abci/abcCollapse.c +0 -957
  300. data/ext/abc/src/base/abci/abcCut.c +0 -700
  301. data/ext/abc/src/base/abci/abcDar.c +0 -4807
  302. data/ext/abc/src/base/abci/abcDarUnfold2.c +0 -69
  303. data/ext/abc/src/base/abci/abcDebug.c +0 -213
  304. data/ext/abc/src/base/abci/abcDec.c +0 -666
  305. data/ext/abc/src/base/abci/abcDetect.c +0 -1264
  306. data/ext/abc/src/base/abci/abcDress.c +0 -214
  307. data/ext/abc/src/base/abci/abcDress2.c +0 -500
  308. data/ext/abc/src/base/abci/abcDress3.c +0 -320
  309. data/ext/abc/src/base/abci/abcDsd.c +0 -710
  310. data/ext/abc/src/base/abci/abcEco.c +0 -58
  311. data/ext/abc/src/base/abci/abcEspresso.c +0 -255
  312. data/ext/abc/src/base/abci/abcExact.c +0 -3024
  313. data/ext/abc/src/base/abci/abcExtract.c +0 -752
  314. data/ext/abc/src/base/abci/abcFlop.c +0 -40
  315. data/ext/abc/src/base/abci/abcFpga.c +0 -288
  316. data/ext/abc/src/base/abci/abcFpgaFast.c +0 -195
  317. data/ext/abc/src/base/abci/abcFraig.c +0 -816
  318. data/ext/abc/src/base/abci/abcFx.c +0 -1207
  319. data/ext/abc/src/base/abci/abcFxu.c +0 -292
  320. data/ext/abc/src/base/abci/abcGen.c +0 -830
  321. data/ext/abc/src/base/abci/abcHaig.c +0 -557
  322. data/ext/abc/src/base/abci/abcIf.c +0 -830
  323. data/ext/abc/src/base/abci/abcIfMux.c +0 -422
  324. data/ext/abc/src/base/abci/abcIfif.c +0 -349
  325. data/ext/abc/src/base/abci/abcIvy.c +0 -1149
  326. data/ext/abc/src/base/abci/abcLog.c +0 -242
  327. data/ext/abc/src/base/abci/abcLut.c +0 -793
  328. data/ext/abc/src/base/abci/abcLutmin.c +0 -785
  329. data/ext/abc/src/base/abci/abcMap.c +0 -1064
  330. data/ext/abc/src/base/abci/abcMeasure.c +0 -483
  331. data/ext/abc/src/base/abci/abcMerge.c +0 -358
  332. data/ext/abc/src/base/abci/abcMffc.c +0 -1252
  333. data/ext/abc/src/base/abci/abcMfs.c +0 -469
  334. data/ext/abc/src/base/abci/abcMini.c +0 -237
  335. data/ext/abc/src/base/abci/abcMiter.c +0 -1196
  336. data/ext/abc/src/base/abci/abcMulti.c +0 -660
  337. data/ext/abc/src/base/abci/abcMv.c +0 -381
  338. data/ext/abc/src/base/abci/abcNpn.c +0 -392
  339. data/ext/abc/src/base/abci/abcNpnSave.c +0 -740
  340. data/ext/abc/src/base/abci/abcNtbdd.c +0 -619
  341. data/ext/abc/src/base/abci/abcOdc.c +0 -1132
  342. data/ext/abc/src/base/abci/abcOrder.c +0 -136
  343. data/ext/abc/src/base/abci/abcPart.c +0 -1206
  344. data/ext/abc/src/base/abci/abcPlace.c +0 -260
  345. data/ext/abc/src/base/abci/abcPrint.c +0 -2008
  346. data/ext/abc/src/base/abci/abcProve.c +0 -354
  347. data/ext/abc/src/base/abci/abcQbf.c +0 -319
  348. data/ext/abc/src/base/abci/abcQuant.c +0 -436
  349. data/ext/abc/src/base/abci/abcReach.c +0 -327
  350. data/ext/abc/src/base/abci/abcRec3.c +0 -1433
  351. data/ext/abc/src/base/abci/abcReconv.c +0 -776
  352. data/ext/abc/src/base/abci/abcRefactor.c +0 -418
  353. data/ext/abc/src/base/abci/abcRenode.c +0 -326
  354. data/ext/abc/src/base/abci/abcReorder.c +0 -117
  355. data/ext/abc/src/base/abci/abcRestruct.c +0 -1511
  356. data/ext/abc/src/base/abci/abcResub.c +0 -1957
  357. data/ext/abc/src/base/abci/abcRewrite.c +0 -420
  358. data/ext/abc/src/base/abci/abcRpo.c +0 -442
  359. data/ext/abc/src/base/abci/abcRr.c +0 -1005
  360. data/ext/abc/src/base/abci/abcSat.c +0 -1020
  361. data/ext/abc/src/base/abci/abcSaucy.c +0 -3346
  362. data/ext/abc/src/base/abci/abcScorr.c +0 -454
  363. data/ext/abc/src/base/abci/abcSense.c +0 -216
  364. data/ext/abc/src/base/abci/abcSpeedup.c +0 -965
  365. data/ext/abc/src/base/abci/abcStrash.c +0 -848
  366. data/ext/abc/src/base/abci/abcSweep.c +0 -1030
  367. data/ext/abc/src/base/abci/abcSymm.c +0 -246
  368. data/ext/abc/src/base/abci/abcTim.c +0 -637
  369. data/ext/abc/src/base/abci/abcTiming.c +0 -1398
  370. data/ext/abc/src/base/abci/abcUnate.c +0 -178
  371. data/ext/abc/src/base/abci/abcUnreach.c +0 -366
  372. data/ext/abc/src/base/abci/abcVerify.c +0 -1109
  373. data/ext/abc/src/base/abci/abcXsim.c +0 -231
  374. data/ext/abc/src/base/abci/abciUnfold2.c +0 -186
  375. data/ext/abc/src/base/abci/fahout_cut.c +0 -358
  376. data/ext/abc/src/base/abci/module.make +0 -75
  377. data/ext/abc/src/base/acb/acb.c +0 -52
  378. data/ext/abc/src/base/acb/acb.h +0 -1038
  379. data/ext/abc/src/base/acb/acbAbc.c +0 -302
  380. data/ext/abc/src/base/acb/acbAig.c +0 -52
  381. data/ext/abc/src/base/acb/acbCom.c +0 -735
  382. data/ext/abc/src/base/acb/acbFunc.c +0 -56
  383. data/ext/abc/src/base/acb/acbMfs.c +0 -1644
  384. data/ext/abc/src/base/acb/acbPar.h +0 -70
  385. data/ext/abc/src/base/acb/acbPush.c +0 -372
  386. data/ext/abc/src/base/acb/acbSets.c +0 -54
  387. data/ext/abc/src/base/acb/acbSets.h +0 -61
  388. data/ext/abc/src/base/acb/acbUtil.c +0 -479
  389. data/ext/abc/src/base/acb/module.make +0 -8
  390. data/ext/abc/src/base/bac/bac.c +0 -52
  391. data/ext/abc/src/base/bac/bac.h +0 -1017
  392. data/ext/abc/src/base/bac/bacBac.c +0 -298
  393. data/ext/abc/src/base/bac/bacBlast.c +0 -587
  394. data/ext/abc/src/base/bac/bacCom.c +0 -728
  395. data/ext/abc/src/base/bac/bacLib.c +0 -52
  396. data/ext/abc/src/base/bac/bacNtk.c +0 -603
  397. data/ext/abc/src/base/bac/bacOper.c +0 -365
  398. data/ext/abc/src/base/bac/bacPrs.h +0 -363
  399. data/ext/abc/src/base/bac/bacPrsBuild.c +0 -356
  400. data/ext/abc/src/base/bac/bacPrsTrans.c +0 -211
  401. data/ext/abc/src/base/bac/bacPtr.c +0 -470
  402. data/ext/abc/src/base/bac/bacPtrAbc.c +0 -486
  403. data/ext/abc/src/base/bac/bacReadBlif.c +0 -453
  404. data/ext/abc/src/base/bac/bacReadSmt.c +0 -42
  405. data/ext/abc/src/base/bac/bacReadVer.c +0 -875
  406. data/ext/abc/src/base/bac/bacWriteBlif.c +0 -236
  407. data/ext/abc/src/base/bac/bacWriteSmt.c +0 -52
  408. data/ext/abc/src/base/bac/bacWriteVer.c +0 -703
  409. data/ext/abc/src/base/bac/module.make +0 -15
  410. data/ext/abc/src/base/cba/cba.c +0 -52
  411. data/ext/abc/src/base/cba/cba.h +0 -1024
  412. data/ext/abc/src/base/cba/cbaBlast.c +0 -1069
  413. data/ext/abc/src/base/cba/cbaCba.c +0 -58
  414. data/ext/abc/src/base/cba/cbaCom.c +0 -731
  415. data/ext/abc/src/base/cba/cbaNtk.c +0 -1183
  416. data/ext/abc/src/base/cba/cbaPrs.h +0 -520
  417. data/ext/abc/src/base/cba/cbaReadBlif.c +0 -646
  418. data/ext/abc/src/base/cba/cbaReadVer.c +0 -2182
  419. data/ext/abc/src/base/cba/cbaTypes.h +0 -169
  420. data/ext/abc/src/base/cba/cbaWriteBlif.c +0 -218
  421. data/ext/abc/src/base/cba/cbaWriteVer.c +0 -1016
  422. data/ext/abc/src/base/cba/module.make +0 -8
  423. data/ext/abc/src/base/cmd/cmd.c +0 -2611
  424. data/ext/abc/src/base/cmd/cmd.h +0 -81
  425. data/ext/abc/src/base/cmd/cmdAlias.c +0 -126
  426. data/ext/abc/src/base/cmd/cmdApi.c +0 -127
  427. data/ext/abc/src/base/cmd/cmdAuto.c +0 -684
  428. data/ext/abc/src/base/cmd/cmdFlag.c +0 -110
  429. data/ext/abc/src/base/cmd/cmdHist.c +0 -180
  430. data/ext/abc/src/base/cmd/cmdInt.h +0 -92
  431. data/ext/abc/src/base/cmd/cmdLoad.c +0 -209
  432. data/ext/abc/src/base/cmd/cmdPlugin.c +0 -773
  433. data/ext/abc/src/base/cmd/cmdStarter.c +0 -259
  434. data/ext/abc/src/base/cmd/cmdUtils.c +0 -756
  435. data/ext/abc/src/base/cmd/module.make +0 -10
  436. data/ext/abc/src/base/exor/exor.c +0 -958
  437. data/ext/abc/src/base/exor/exor.h +0 -189
  438. data/ext/abc/src/base/exor/exorBits.c +0 -425
  439. data/ext/abc/src/base/exor/exorCubes.c +0 -190
  440. data/ext/abc/src/base/exor/exorLink.c +0 -749
  441. data/ext/abc/src/base/exor/exorList.c +0 -1156
  442. data/ext/abc/src/base/exor/exorUtil.c +0 -228
  443. data/ext/abc/src/base/exor/module.make +0 -6
  444. data/ext/abc/src/base/io/io.c +0 -3157
  445. data/ext/abc/src/base/io/ioAbc.h +0 -172
  446. data/ext/abc/src/base/io/ioInt.h +0 -57
  447. data/ext/abc/src/base/io/ioJson.c +0 -270
  448. data/ext/abc/src/base/io/ioReadAiger.c +0 -599
  449. data/ext/abc/src/base/io/ioReadBaf.c +0 -177
  450. data/ext/abc/src/base/io/ioReadBblif.c +0 -348
  451. data/ext/abc/src/base/io/ioReadBench.c +0 -391
  452. data/ext/abc/src/base/io/ioReadBlif.c +0 -1707
  453. data/ext/abc/src/base/io/ioReadBlifAig.c +0 -1019
  454. data/ext/abc/src/base/io/ioReadBlifMv.c +0 -2363
  455. data/ext/abc/src/base/io/ioReadDsd.c +0 -313
  456. data/ext/abc/src/base/io/ioReadEdif.c +0 -240
  457. data/ext/abc/src/base/io/ioReadEqn.c +0 -244
  458. data/ext/abc/src/base/io/ioReadPla.c +0 -600
  459. data/ext/abc/src/base/io/ioReadPlaMo.c +0 -813
  460. data/ext/abc/src/base/io/ioReadVerilog.c +0 -102
  461. data/ext/abc/src/base/io/ioUtil.c +0 -871
  462. data/ext/abc/src/base/io/ioWriteAiger.c +0 -956
  463. data/ext/abc/src/base/io/ioWriteBaf.c +0 -173
  464. data/ext/abc/src/base/io/ioWriteBblif.c +0 -116
  465. data/ext/abc/src/base/io/ioWriteBench.c +0 -340
  466. data/ext/abc/src/base/io/ioWriteBlif.c +0 -1410
  467. data/ext/abc/src/base/io/ioWriteBlifMv.c +0 -476
  468. data/ext/abc/src/base/io/ioWriteBook.c +0 -998
  469. data/ext/abc/src/base/io/ioWriteCnf.c +0 -120
  470. data/ext/abc/src/base/io/ioWriteDot.c +0 -854
  471. data/ext/abc/src/base/io/ioWriteEqn.c +0 -257
  472. data/ext/abc/src/base/io/ioWriteGml.c +0 -121
  473. data/ext/abc/src/base/io/ioWriteList.c +0 -293
  474. data/ext/abc/src/base/io/ioWritePla.c +0 -460
  475. data/ext/abc/src/base/io/ioWriteSmv.c +0 -265
  476. data/ext/abc/src/base/io/ioWriteVerilog.c +0 -662
  477. data/ext/abc/src/base/io/module.make +0 -31
  478. data/ext/abc/src/base/main/abcapis.h +0 -106
  479. data/ext/abc/src/base/main/abcapis_old.h +0 -84
  480. data/ext/abc/src/base/main/libSupport.c +0 -211
  481. data/ext/abc/src/base/main/main.c +0 -12
  482. data/ext/abc/src/base/main/main.h +0 -171
  483. data/ext/abc/src/base/main/mainFrame.c +0 -742
  484. data/ext/abc/src/base/main/mainInit.c +0 -168
  485. data/ext/abc/src/base/main/mainInt.h +0 -207
  486. data/ext/abc/src/base/main/mainLib.c +0 -93
  487. data/ext/abc/src/base/main/mainMC.c +0 -203
  488. data/ext/abc/src/base/main/mainReal.c +0 -386
  489. data/ext/abc/src/base/main/mainUtils.c +0 -294
  490. data/ext/abc/src/base/main/module.make +0 -7
  491. data/ext/abc/src/base/pla/module.make +0 -7
  492. data/ext/abc/src/base/pla/pla.c +0 -52
  493. data/ext/abc/src/base/pla/pla.h +0 -297
  494. data/ext/abc/src/base/pla/plaCom.c +0 -507
  495. data/ext/abc/src/base/pla/plaFxch.c +0 -854
  496. data/ext/abc/src/base/pla/plaHash.c +0 -347
  497. data/ext/abc/src/base/pla/plaMan.c +0 -300
  498. data/ext/abc/src/base/pla/plaMerge.c +0 -55
  499. data/ext/abc/src/base/pla/plaRead.c +0 -224
  500. data/ext/abc/src/base/pla/plaSimple.c +0 -339
  501. data/ext/abc/src/base/pla/plaWrite.c +0 -112
  502. data/ext/abc/src/base/test/module.make +0 -1
  503. data/ext/abc/src/base/test/test.c +0 -70
  504. data/ext/abc/src/base/ver/module.make +0 -4
  505. data/ext/abc/src/base/ver/ver.h +0 -122
  506. data/ext/abc/src/base/ver/verCore.c +0 -3037
  507. data/ext/abc/src/base/ver/verFormula.c +0 -479
  508. data/ext/abc/src/base/ver/verParse.c +0 -131
  509. data/ext/abc/src/base/ver/verStream.c +0 -450
  510. data/ext/abc/src/base/ver/verWords.c +0 -53
  511. data/ext/abc/src/base/ver/ver_.c +0 -53
  512. data/ext/abc/src/base/wlc/module.make +0 -17
  513. data/ext/abc/src/base/wlc/wlc.c +0 -274
  514. data/ext/abc/src/base/wlc/wlc.h +0 -392
  515. data/ext/abc/src/base/wlc/wlcAbc.c +0 -275
  516. data/ext/abc/src/base/wlc/wlcAbs.c +0 -1912
  517. data/ext/abc/src/base/wlc/wlcAbs2.c +0 -410
  518. data/ext/abc/src/base/wlc/wlcBlast.c +0 -1692
  519. data/ext/abc/src/base/wlc/wlcCom.c +0 -1559
  520. data/ext/abc/src/base/wlc/wlcGraft.c +0 -573
  521. data/ext/abc/src/base/wlc/wlcJson.c +0 -54
  522. data/ext/abc/src/base/wlc/wlcNtk.c +0 -1268
  523. data/ext/abc/src/base/wlc/wlcPth.c +0 -173
  524. data/ext/abc/src/base/wlc/wlcReadSmt.c +0 -1784
  525. data/ext/abc/src/base/wlc/wlcReadVer.c +0 -1308
  526. data/ext/abc/src/base/wlc/wlcShow.c +0 -337
  527. data/ext/abc/src/base/wlc/wlcSim.c +0 -251
  528. data/ext/abc/src/base/wlc/wlcStdin.c +0 -255
  529. data/ext/abc/src/base/wlc/wlcUif.c +0 -290
  530. data/ext/abc/src/base/wlc/wlcWin.c +0 -166
  531. data/ext/abc/src/base/wlc/wlcWriteVer.c +0 -450
  532. data/ext/abc/src/bdd/bbr/bbr.h +0 -93
  533. data/ext/abc/src/bdd/bbr/bbrCex.c +0 -172
  534. data/ext/abc/src/bdd/bbr/bbrImage.c +0 -1327
  535. data/ext/abc/src/bdd/bbr/bbrNtbdd.c +0 -218
  536. data/ext/abc/src/bdd/bbr/bbrReach.c +0 -615
  537. data/ext/abc/src/bdd/bbr/bbr_.c +0 -52
  538. data/ext/abc/src/bdd/bbr/module.make +0 -4
  539. data/ext/abc/src/bdd/cas/cas.h +0 -66
  540. data/ext/abc/src/bdd/cas/casCore.c +0 -1265
  541. data/ext/abc/src/bdd/cas/casDec.c +0 -512
  542. data/ext/abc/src/bdd/cas/module.make +0 -3
  543. data/ext/abc/src/bdd/cudd/Makefile +0 -124
  544. data/ext/abc/src/bdd/cudd/cuBdd.make +0 -41
  545. data/ext/abc/src/bdd/cudd/cudd.h +0 -1054
  546. data/ext/abc/src/bdd/cudd/cudd.make +0 -42
  547. data/ext/abc/src/bdd/cudd/cuddAPI.c +0 -4444
  548. data/ext/abc/src/bdd/cudd/cuddAddAbs.c +0 -588
  549. data/ext/abc/src/bdd/cudd/cuddAddApply.c +0 -949
  550. data/ext/abc/src/bdd/cudd/cuddAddFind.c +0 -316
  551. data/ext/abc/src/bdd/cudd/cuddAddInv.c +0 -209
  552. data/ext/abc/src/bdd/cudd/cuddAddIte.c +0 -647
  553. data/ext/abc/src/bdd/cudd/cuddAddNeg.c +0 -296
  554. data/ext/abc/src/bdd/cudd/cuddAddWalsh.c +0 -399
  555. data/ext/abc/src/bdd/cudd/cuddAndAbs.c +0 -384
  556. data/ext/abc/src/bdd/cudd/cuddAnneal.c +0 -822
  557. data/ext/abc/src/bdd/cudd/cuddApa.c +0 -979
  558. data/ext/abc/src/bdd/cudd/cuddApprox.c +0 -2213
  559. data/ext/abc/src/bdd/cudd/cuddBddAbs.c +0 -725
  560. data/ext/abc/src/bdd/cudd/cuddBddCorr.c +0 -515
  561. data/ext/abc/src/bdd/cudd/cuddBddIte.c +0 -1328
  562. data/ext/abc/src/bdd/cudd/cuddBridge.c +0 -1021
  563. data/ext/abc/src/bdd/cudd/cuddCache.c +0 -1100
  564. data/ext/abc/src/bdd/cudd/cuddCheck.c +0 -887
  565. data/ext/abc/src/bdd/cudd/cuddClip.c +0 -566
  566. data/ext/abc/src/bdd/cudd/cuddCof.c +0 -335
  567. data/ext/abc/src/bdd/cudd/cuddCompose.c +0 -1760
  568. data/ext/abc/src/bdd/cudd/cuddDecomp.c +0 -2185
  569. data/ext/abc/src/bdd/cudd/cuddEssent.c +0 -1475
  570. data/ext/abc/src/bdd/cudd/cuddExact.c +0 -1028
  571. data/ext/abc/src/bdd/cudd/cuddExport.c +0 -1384
  572. data/ext/abc/src/bdd/cudd/cuddGenCof.c +0 -2175
  573. data/ext/abc/src/bdd/cudd/cuddGenetic.c +0 -957
  574. data/ext/abc/src/bdd/cudd/cuddGroup.c +0 -2173
  575. data/ext/abc/src/bdd/cudd/cuddHarwell.c +0 -576
  576. data/ext/abc/src/bdd/cudd/cuddInit.c +0 -319
  577. data/ext/abc/src/bdd/cudd/cuddInt.h +0 -1232
  578. data/ext/abc/src/bdd/cudd/cuddInteract.c +0 -437
  579. data/ext/abc/src/bdd/cudd/cuddLCache.c +0 -1465
  580. data/ext/abc/src/bdd/cudd/cuddLevelQ.c +0 -569
  581. data/ext/abc/src/bdd/cudd/cuddLinear.c +0 -1373
  582. data/ext/abc/src/bdd/cudd/cuddLiteral.c +0 -272
  583. data/ext/abc/src/bdd/cudd/cuddMatMult.c +0 -715
  584. data/ext/abc/src/bdd/cudd/cuddPriority.c +0 -2035
  585. data/ext/abc/src/bdd/cudd/cuddRead.c +0 -525
  586. data/ext/abc/src/bdd/cudd/cuddRef.c +0 -816
  587. data/ext/abc/src/bdd/cudd/cuddReorder.c +0 -2143
  588. data/ext/abc/src/bdd/cudd/cuddSat.c +0 -1338
  589. data/ext/abc/src/bdd/cudd/cuddSign.c +0 -326
  590. data/ext/abc/src/bdd/cudd/cuddSolve.c +0 -374
  591. data/ext/abc/src/bdd/cudd/cuddSplit.c +0 -694
  592. data/ext/abc/src/bdd/cudd/cuddSubsetHB.c +0 -1337
  593. data/ext/abc/src/bdd/cudd/cuddSubsetSP.c +0 -1657
  594. data/ext/abc/src/bdd/cudd/cuddSymmetry.c +0 -1706
  595. data/ext/abc/src/bdd/cudd/cuddTable.c +0 -3179
  596. data/ext/abc/src/bdd/cudd/cuddUtil.c +0 -3929
  597. data/ext/abc/src/bdd/cudd/cuddWindow.c +0 -1031
  598. data/ext/abc/src/bdd/cudd/cuddZddCount.c +0 -357
  599. data/ext/abc/src/bdd/cudd/cuddZddFuncs.c +0 -1638
  600. data/ext/abc/src/bdd/cudd/cuddZddGroup.c +0 -1344
  601. data/ext/abc/src/bdd/cudd/cuddZddIsop.c +0 -919
  602. data/ext/abc/src/bdd/cudd/cuddZddLin.c +0 -975
  603. data/ext/abc/src/bdd/cudd/cuddZddMisc.c +0 -286
  604. data/ext/abc/src/bdd/cudd/cuddZddPort.c +0 -389
  605. data/ext/abc/src/bdd/cudd/cuddZddReord.c +0 -1668
  606. data/ext/abc/src/bdd/cudd/cuddZddSetop.c +0 -1166
  607. data/ext/abc/src/bdd/cudd/cuddZddSymm.c +0 -1707
  608. data/ext/abc/src/bdd/cudd/cuddZddUtil.c +0 -1071
  609. data/ext/abc/src/bdd/cudd/license +0 -32
  610. data/ext/abc/src/bdd/cudd/module.make +0 -61
  611. data/ext/abc/src/bdd/cudd/r7x8.1.mat +0 -53
  612. data/ext/abc/src/bdd/cudd/r7x8.1.out +0 -377
  613. data/ext/abc/src/bdd/cudd/testcudd.c +0 -1073
  614. data/ext/abc/src/bdd/dsd/dsd.h +0 -134
  615. data/ext/abc/src/bdd/dsd/dsdApi.c +0 -102
  616. data/ext/abc/src/bdd/dsd/dsdCheck.c +0 -319
  617. data/ext/abc/src/bdd/dsd/dsdInt.h +0 -99
  618. data/ext/abc/src/bdd/dsd/dsdLocal.c +0 -342
  619. data/ext/abc/src/bdd/dsd/dsdMan.c +0 -119
  620. data/ext/abc/src/bdd/dsd/dsdProc.c +0 -1613
  621. data/ext/abc/src/bdd/dsd/dsdTree.c +0 -1181
  622. data/ext/abc/src/bdd/dsd/module.make +0 -6
  623. data/ext/abc/src/bdd/epd/epd.c +0 -1347
  624. data/ext/abc/src/bdd/epd/epd.h +0 -196
  625. data/ext/abc/src/bdd/epd/module.make +0 -1
  626. data/ext/abc/src/bdd/extrab/extraBdd.h +0 -317
  627. data/ext/abc/src/bdd/extrab/extraBddAuto.c +0 -1563
  628. data/ext/abc/src/bdd/extrab/extraBddCas.c +0 -1235
  629. data/ext/abc/src/bdd/extrab/extraBddImage.c +0 -1162
  630. data/ext/abc/src/bdd/extrab/extraBddKmap.c +0 -876
  631. data/ext/abc/src/bdd/extrab/extraBddMisc.c +0 -2591
  632. data/ext/abc/src/bdd/extrab/extraBddSymm.c +0 -1474
  633. data/ext/abc/src/bdd/extrab/extraBddThresh.c +0 -693
  634. data/ext/abc/src/bdd/extrab/extraBddTime.c +0 -660
  635. data/ext/abc/src/bdd/extrab/extraBddUnate.c +0 -646
  636. data/ext/abc/src/bdd/extrab/module.make +0 -9
  637. data/ext/abc/src/bdd/llb/llb.c +0 -52
  638. data/ext/abc/src/bdd/llb/llb.h +0 -96
  639. data/ext/abc/src/bdd/llb/llb1Cluster.c +0 -356
  640. data/ext/abc/src/bdd/llb/llb1Constr.c +0 -313
  641. data/ext/abc/src/bdd/llb/llb1Core.c +0 -222
  642. data/ext/abc/src/bdd/llb/llb1Group.c +0 -474
  643. data/ext/abc/src/bdd/llb/llb1Hint.c +0 -226
  644. data/ext/abc/src/bdd/llb/llb1Man.c +0 -218
  645. data/ext/abc/src/bdd/llb/llb1Matrix.c +0 -430
  646. data/ext/abc/src/bdd/llb/llb1Pivot.c +0 -254
  647. data/ext/abc/src/bdd/llb/llb1Reach.c +0 -904
  648. data/ext/abc/src/bdd/llb/llb1Sched.c +0 -257
  649. data/ext/abc/src/bdd/llb/llb2Bad.c +0 -138
  650. data/ext/abc/src/bdd/llb/llb2Core.c +0 -777
  651. data/ext/abc/src/bdd/llb/llb2Driver.c +0 -222
  652. data/ext/abc/src/bdd/llb/llb2Dump.c +0 -104
  653. data/ext/abc/src/bdd/llb/llb2Flow.c +0 -1376
  654. data/ext/abc/src/bdd/llb/llb2Image.c +0 -482
  655. data/ext/abc/src/bdd/llb/llb3Image.c +0 -1095
  656. data/ext/abc/src/bdd/llb/llb3Nonlin.c +0 -872
  657. data/ext/abc/src/bdd/llb/llb4Cex.c +0 -320
  658. data/ext/abc/src/bdd/llb/llb4Cluster.c +0 -452
  659. data/ext/abc/src/bdd/llb/llb4Image.c +0 -863
  660. data/ext/abc/src/bdd/llb/llb4Map.c +0 -123
  661. data/ext/abc/src/bdd/llb/llb4Nonlin.c +0 -1185
  662. data/ext/abc/src/bdd/llb/llb4Sweep.c +0 -589
  663. data/ext/abc/src/bdd/llb/llbInt.h +0 -212
  664. data/ext/abc/src/bdd/llb/module.make +0 -22
  665. data/ext/abc/src/bdd/mtr/module.make +0 -2
  666. data/ext/abc/src/bdd/mtr/mtr.h +0 -187
  667. data/ext/abc/src/bdd/mtr/mtrBasic.c +0 -453
  668. data/ext/abc/src/bdd/mtr/mtrGroup.c +0 -734
  669. data/ext/abc/src/bdd/mtr/mtrInt.h +0 -94
  670. data/ext/abc/src/bdd/reo/module.make +0 -8
  671. data/ext/abc/src/bdd/reo/reo.h +0 -234
  672. data/ext/abc/src/bdd/reo/reoApi.c +0 -294
  673. data/ext/abc/src/bdd/reo/reoCore.c +0 -441
  674. data/ext/abc/src/bdd/reo/reoProfile.c +0 -370
  675. data/ext/abc/src/bdd/reo/reoShuffle.c +0 -230
  676. data/ext/abc/src/bdd/reo/reoSift.c +0 -346
  677. data/ext/abc/src/bdd/reo/reoSwap.c +0 -905
  678. data/ext/abc/src/bdd/reo/reoTest.c +0 -256
  679. data/ext/abc/src/bdd/reo/reoTransfer.c +0 -206
  680. data/ext/abc/src/bdd/reo/reoUnits.c +0 -190
  681. data/ext/abc/src/bool/bdc/bdc.h +0 -98
  682. data/ext/abc/src/bool/bdc/bdcCore.c +0 -374
  683. data/ext/abc/src/bool/bdc/bdcDec.c +0 -751
  684. data/ext/abc/src/bool/bdc/bdcInt.h +0 -165
  685. data/ext/abc/src/bool/bdc/bdcSpfd.c +0 -1184
  686. data/ext/abc/src/bool/bdc/bdcTable.c +0 -134
  687. data/ext/abc/src/bool/bdc/bdc_.c +0 -54
  688. data/ext/abc/src/bool/bdc/module.make +0 -5
  689. data/ext/abc/src/bool/dec/dec.h +0 -725
  690. data/ext/abc/src/bool/dec/decAbc.c +0 -358
  691. data/ext/abc/src/bool/dec/decFactor.c +0 -403
  692. data/ext/abc/src/bool/dec/decMan.c +0 -88
  693. data/ext/abc/src/bool/dec/decPrint.c +0 -289
  694. data/ext/abc/src/bool/dec/decUtil.c +0 -148
  695. data/ext/abc/src/bool/dec/module.make +0 -5
  696. data/ext/abc/src/bool/deco/deco.h +0 -714
  697. data/ext/abc/src/bool/deco/module.make +0 -1
  698. data/ext/abc/src/bool/kit/cloud.c +0 -993
  699. data/ext/abc/src/bool/kit/cloud.h +0 -254
  700. data/ext/abc/src/bool/kit/kit.h +0 -655
  701. data/ext/abc/src/bool/kit/kitAig.c +0 -126
  702. data/ext/abc/src/bool/kit/kitBdd.c +0 -243
  703. data/ext/abc/src/bool/kit/kitCloud.c +0 -378
  704. data/ext/abc/src/bool/kit/kitDec.c +0 -343
  705. data/ext/abc/src/bool/kit/kitDsd.c +0 -3285
  706. data/ext/abc/src/bool/kit/kitFactor.c +0 -344
  707. data/ext/abc/src/bool/kit/kitGraph.c +0 -402
  708. data/ext/abc/src/bool/kit/kitHop.c +0 -200
  709. data/ext/abc/src/bool/kit/kitIsop.c +0 -365
  710. data/ext/abc/src/bool/kit/kitPerm.c +0 -357
  711. data/ext/abc/src/bool/kit/kitPla.c +0 -535
  712. data/ext/abc/src/bool/kit/kitSop.c +0 -579
  713. data/ext/abc/src/bool/kit/kitTruth.c +0 -2224
  714. data/ext/abc/src/bool/kit/kit_.c +0 -53
  715. data/ext/abc/src/bool/kit/module.make +0 -11
  716. data/ext/abc/src/bool/lucky/lucky.c +0 -705
  717. data/ext/abc/src/bool/lucky/lucky.h +0 -44
  718. data/ext/abc/src/bool/lucky/luckyFast16.c +0 -872
  719. data/ext/abc/src/bool/lucky/luckyFast6.c +0 -285
  720. data/ext/abc/src/bool/lucky/luckyInt.h +0 -136
  721. data/ext/abc/src/bool/lucky/luckyRead.c +0 -333
  722. data/ext/abc/src/bool/lucky/luckySimple.c +0 -307
  723. data/ext/abc/src/bool/lucky/luckySwap.c +0 -402
  724. data/ext/abc/src/bool/lucky/luckySwapIJ.c +0 -102
  725. data/ext/abc/src/bool/lucky/module.make +0 -7
  726. data/ext/abc/src/bool/rpo/literal.h +0 -297
  727. data/ext/abc/src/bool/rpo/module.make +0 -1
  728. data/ext/abc/src/bool/rpo/rpo.c +0 -383
  729. data/ext/abc/src/bool/rpo/rpo.h +0 -61
  730. data/ext/abc/src/bool/rsb/module.make +0 -2
  731. data/ext/abc/src/bool/rsb/rsb.h +0 -65
  732. data/ext/abc/src/bool/rsb/rsbDec6.c +0 -770
  733. data/ext/abc/src/bool/rsb/rsbInt.h +0 -84
  734. data/ext/abc/src/bool/rsb/rsbMan.c +0 -99
  735. data/ext/abc/src/demo.c +0 -181
  736. data/ext/abc/src/generic.c +0 -52
  737. data/ext/abc/src/generic.h +0 -63
  738. data/ext/abc/src/map/amap/amap.h +0 -97
  739. data/ext/abc/src/map/amap/amapCore.c +0 -110
  740. data/ext/abc/src/map/amap/amapGraph.c +0 -399
  741. data/ext/abc/src/map/amap/amapInt.h +0 -376
  742. data/ext/abc/src/map/amap/amapLib.c +0 -374
  743. data/ext/abc/src/map/amap/amapLiberty.c +0 -1103
  744. data/ext/abc/src/map/amap/amapMan.c +0 -104
  745. data/ext/abc/src/map/amap/amapMatch.c +0 -622
  746. data/ext/abc/src/map/amap/amapMerge.c +0 -541
  747. data/ext/abc/src/map/amap/amapOutput.c +0 -186
  748. data/ext/abc/src/map/amap/amapParse.c +0 -480
  749. data/ext/abc/src/map/amap/amapPerm.c +0 -380
  750. data/ext/abc/src/map/amap/amapRead.c +0 -494
  751. data/ext/abc/src/map/amap/amapRule.c +0 -462
  752. data/ext/abc/src/map/amap/amapUniq.c +0 -317
  753. data/ext/abc/src/map/amap/module.make +0 -13
  754. data/ext/abc/src/map/cov/cov.h +0 -109
  755. data/ext/abc/src/map/cov/covBuild.c +0 -544
  756. data/ext/abc/src/map/cov/covCore.c +0 -1030
  757. data/ext/abc/src/map/cov/covInt.h +0 -654
  758. data/ext/abc/src/map/cov/covMan.c +0 -149
  759. data/ext/abc/src/map/cov/covMinEsop.c +0 -304
  760. data/ext/abc/src/map/cov/covMinMan.c +0 -118
  761. data/ext/abc/src/map/cov/covMinSop.c +0 -620
  762. data/ext/abc/src/map/cov/covMinUtil.c +0 -343
  763. data/ext/abc/src/map/cov/covTest.c +0 -422
  764. data/ext/abc/src/map/cov/module.make +0 -7
  765. data/ext/abc/src/map/fpga/fpga.c +0 -288
  766. data/ext/abc/src/map/fpga/fpga.h +0 -175
  767. data/ext/abc/src/map/fpga/fpgaCore.c +0 -194
  768. data/ext/abc/src/map/fpga/fpgaCreate.c +0 -584
  769. data/ext/abc/src/map/fpga/fpgaCut.c +0 -1186
  770. data/ext/abc/src/map/fpga/fpgaCutUtils.c +0 -476
  771. data/ext/abc/src/map/fpga/fpgaFanout.c +0 -146
  772. data/ext/abc/src/map/fpga/fpgaGENERIC.c +0 -51
  773. data/ext/abc/src/map/fpga/fpgaInt.h +0 -389
  774. data/ext/abc/src/map/fpga/fpgaLib.c +0 -255
  775. data/ext/abc/src/map/fpga/fpgaMatch.c +0 -800
  776. data/ext/abc/src/map/fpga/fpgaSwitch.c +0 -156
  777. data/ext/abc/src/map/fpga/fpgaTime.c +0 -267
  778. data/ext/abc/src/map/fpga/fpgaTruth.c +0 -171
  779. data/ext/abc/src/map/fpga/fpgaUtils.c +0 -990
  780. data/ext/abc/src/map/fpga/fpgaVec.c +0 -413
  781. data/ext/abc/src/map/fpga/module.make +0 -13
  782. data/ext/abc/src/map/if/if.h +0 -689
  783. data/ext/abc/src/map/if/ifCache.c +0 -100
  784. data/ext/abc/src/map/if/ifCheck.c +0 -204
  785. data/ext/abc/src/map/if/ifCom.c +0 -372
  786. data/ext/abc/src/map/if/ifCore.c +0 -200
  787. data/ext/abc/src/map/if/ifCount.h +0 -521
  788. data/ext/abc/src/map/if/ifCut.c +0 -1479
  789. data/ext/abc/src/map/if/ifData2.c +0 -52
  790. data/ext/abc/src/map/if/ifDec07.c +0 -1125
  791. data/ext/abc/src/map/if/ifDec08.c +0 -507
  792. data/ext/abc/src/map/if/ifDec10.c +0 -506
  793. data/ext/abc/src/map/if/ifDec16.c +0 -2374
  794. data/ext/abc/src/map/if/ifDec75.c +0 -341
  795. data/ext/abc/src/map/if/ifDelay.c +0 -447
  796. data/ext/abc/src/map/if/ifDsd.c +0 -2838
  797. data/ext/abc/src/map/if/ifLibBox.c +0 -401
  798. data/ext/abc/src/map/if/ifLibLut.c +0 -505
  799. data/ext/abc/src/map/if/ifMan.c +0 -720
  800. data/ext/abc/src/map/if/ifMap.c +0 -680
  801. data/ext/abc/src/map/if/ifMatch2.c +0 -62
  802. data/ext/abc/src/map/if/ifReduce.c +0 -466
  803. data/ext/abc/src/map/if/ifSat.c +0 -548
  804. data/ext/abc/src/map/if/ifSelect.c +0 -601
  805. data/ext/abc/src/map/if/ifSeq.c +0 -397
  806. data/ext/abc/src/map/if/ifTest.c +0 -352
  807. data/ext/abc/src/map/if/ifTime.c +0 -525
  808. data/ext/abc/src/map/if/ifTruth.c +0 -339
  809. data/ext/abc/src/map/if/ifTune.c +0 -1452
  810. data/ext/abc/src/map/if/ifUtil.c +0 -632
  811. data/ext/abc/src/map/if/if_.c +0 -52
  812. data/ext/abc/src/map/if/module.make +0 -26
  813. data/ext/abc/src/map/mapper/mapper.c +0 -185
  814. data/ext/abc/src/map/mapper/mapper.h +0 -201
  815. data/ext/abc/src/map/mapper/mapperCanon.c +0 -277
  816. data/ext/abc/src/map/mapper/mapperCore.c +0 -231
  817. data/ext/abc/src/map/mapper/mapperCreate.c +0 -587
  818. data/ext/abc/src/map/mapper/mapperCut.c +0 -1178
  819. data/ext/abc/src/map/mapper/mapperCutUtils.c +0 -279
  820. data/ext/abc/src/map/mapper/mapperFanout.c +0 -146
  821. data/ext/abc/src/map/mapper/mapperInt.h +0 -469
  822. data/ext/abc/src/map/mapper/mapperLib.c +0 -258
  823. data/ext/abc/src/map/mapper/mapperMatch.c +0 -664
  824. data/ext/abc/src/map/mapper/mapperRefs.c +0 -540
  825. data/ext/abc/src/map/mapper/mapperSuper.c +0 -456
  826. data/ext/abc/src/map/mapper/mapperSwitch.c +0 -229
  827. data/ext/abc/src/map/mapper/mapperTable.c +0 -407
  828. data/ext/abc/src/map/mapper/mapperTime.c +0 -459
  829. data/ext/abc/src/map/mapper/mapperTree.c +0 -1042
  830. data/ext/abc/src/map/mapper/mapperTruth.c +0 -315
  831. data/ext/abc/src/map/mapper/mapperUtils.c +0 -898
  832. data/ext/abc/src/map/mapper/mapperVec.c +0 -344
  833. data/ext/abc/src/map/mapper/module.make +0 -17
  834. data/ext/abc/src/map/mio/exp.h +0 -343
  835. data/ext/abc/src/map/mio/mio.c +0 -728
  836. data/ext/abc/src/map/mio/mio.h +0 -242
  837. data/ext/abc/src/map/mio/mioApi.c +0 -254
  838. data/ext/abc/src/map/mio/mioForm.c +0 -307
  839. data/ext/abc/src/map/mio/mioFunc.c +0 -327
  840. data/ext/abc/src/map/mio/mioInt.h +0 -160
  841. data/ext/abc/src/map/mio/mioParse.c +0 -504
  842. data/ext/abc/src/map/mio/mioRead.c +0 -780
  843. data/ext/abc/src/map/mio/mioSop.c +0 -333
  844. data/ext/abc/src/map/mio/mioUtils.c +0 -1752
  845. data/ext/abc/src/map/mio/module.make +0 -7
  846. data/ext/abc/src/map/mpm/module.make +0 -11
  847. data/ext/abc/src/map/mpm/mpm.c +0 -55
  848. data/ext/abc/src/map/mpm/mpm.h +0 -98
  849. data/ext/abc/src/map/mpm/mpmAbc.c +0 -350
  850. data/ext/abc/src/map/mpm/mpmCore.c +0 -115
  851. data/ext/abc/src/map/mpm/mpmDsd.c +0 -1055
  852. data/ext/abc/src/map/mpm/mpmGates.c +0 -307
  853. data/ext/abc/src/map/mpm/mpmInt.h +0 -265
  854. data/ext/abc/src/map/mpm/mpmLib.c +0 -74
  855. data/ext/abc/src/map/mpm/mpmMan.c +0 -207
  856. data/ext/abc/src/map/mpm/mpmMap.c +0 -872
  857. data/ext/abc/src/map/mpm/mpmMig.c +0 -204
  858. data/ext/abc/src/map/mpm/mpmMig.h +0 -358
  859. data/ext/abc/src/map/mpm/mpmPre.c +0 -1029
  860. data/ext/abc/src/map/mpm/mpmTruth.c +0 -239
  861. data/ext/abc/src/map/mpm/mpmUtil.c +0 -52
  862. data/ext/abc/src/map/scl/module.make +0 -11
  863. data/ext/abc/src/map/scl/scl.c +0 -2042
  864. data/ext/abc/src/map/scl/scl.h +0 -58
  865. data/ext/abc/src/map/scl/sclBufSize.c +0 -518
  866. data/ext/abc/src/map/scl/sclBuffer.c +0 -1010
  867. data/ext/abc/src/map/scl/sclCon.h +0 -293
  868. data/ext/abc/src/map/scl/sclDnsize.c +0 -378
  869. data/ext/abc/src/map/scl/sclLib.h +0 -770
  870. data/ext/abc/src/map/scl/sclLibScl.c +0 -848
  871. data/ext/abc/src/map/scl/sclLibUtil.c +0 -1078
  872. data/ext/abc/src/map/scl/sclLiberty.c +0 -1697
  873. data/ext/abc/src/map/scl/sclLoad.c +0 -238
  874. data/ext/abc/src/map/scl/sclSize.c +0 -915
  875. data/ext/abc/src/map/scl/sclSize.h +0 -594
  876. data/ext/abc/src/map/scl/sclTime.h +0 -234
  877. data/ext/abc/src/map/scl/sclUpsize.c +0 -1045
  878. data/ext/abc/src/map/scl/sclUtil.c +0 -320
  879. data/ext/abc/src/map/super/module.make +0 -3
  880. data/ext/abc/src/map/super/super.c +0 -333
  881. data/ext/abc/src/map/super/super.h +0 -62
  882. data/ext/abc/src/map/super/superAnd.c +0 -701
  883. data/ext/abc/src/map/super/superGENERIC.c +0 -51
  884. data/ext/abc/src/map/super/superGate.c +0 -1473
  885. data/ext/abc/src/map/super/superInt.h +0 -64
  886. data/ext/abc/src/map/super/superWrite.c +0 -81
  887. data/ext/abc/src/misc/avl/avl.c +0 -621
  888. data/ext/abc/src/misc/avl/avl.doc +0 -166
  889. data/ext/abc/src/misc/avl/avl.h +0 -91
  890. data/ext/abc/src/misc/bar/bar.c +0 -193
  891. data/ext/abc/src/misc/bar/bar.h +0 -78
  892. data/ext/abc/src/misc/bar/module.make +0 -1
  893. data/ext/abc/src/misc/bbl/bblif.c +0 -1518
  894. data/ext/abc/src/misc/bbl/bblif.h +0 -285
  895. data/ext/abc/src/misc/bbl/module.make +0 -1
  896. data/ext/abc/src/misc/bzlib/CHANGES +0 -319
  897. data/ext/abc/src/misc/bzlib/LICENSE +0 -42
  898. data/ext/abc/src/misc/bzlib/blocksort.c +0 -1098
  899. data/ext/abc/src/misc/bzlib/bzip2.txt +0 -391
  900. data/ext/abc/src/misc/bzlib/bzlib.c +0 -1588
  901. data/ext/abc/src/misc/bzlib/bzlib.h +0 -287
  902. data/ext/abc/src/misc/bzlib/bzlib_private.h +0 -513
  903. data/ext/abc/src/misc/bzlib/compress.c +0 -677
  904. data/ext/abc/src/misc/bzlib/crctable.c +0 -109
  905. data/ext/abc/src/misc/bzlib/decompress.c +0 -631
  906. data/ext/abc/src/misc/bzlib/huffman.c +0 -210
  907. data/ext/abc/src/misc/bzlib/link.txt +0 -2
  908. data/ext/abc/src/misc/bzlib/manual.html +0 -2540
  909. data/ext/abc/src/misc/bzlib/module.make +0 -7
  910. data/ext/abc/src/misc/bzlib/randtable.c +0 -89
  911. data/ext/abc/src/misc/espresso/cofactor.c +0 -389
  912. data/ext/abc/src/misc/espresso/cols.c +0 -319
  913. data/ext/abc/src/misc/espresso/compl.c +0 -685
  914. data/ext/abc/src/misc/espresso/contain.c +0 -450
  915. data/ext/abc/src/misc/espresso/cubehack.c +0 -143
  916. data/ext/abc/src/misc/espresso/cubestr.c +0 -157
  917. data/ext/abc/src/misc/espresso/cvrin.c +0 -816
  918. data/ext/abc/src/misc/espresso/cvrm.c +0 -544
  919. data/ext/abc/src/misc/espresso/cvrmisc.c +0 -147
  920. data/ext/abc/src/misc/espresso/cvrout.c +0 -614
  921. data/ext/abc/src/misc/espresso/dominate.c +0 -103
  922. data/ext/abc/src/misc/espresso/equiv.c +0 -99
  923. data/ext/abc/src/misc/espresso/espresso.c +0 -144
  924. data/ext/abc/src/misc/espresso/espresso.h +0 -786
  925. data/ext/abc/src/misc/espresso/essen.c +0 -184
  926. data/ext/abc/src/misc/espresso/exact.c +0 -186
  927. data/ext/abc/src/misc/espresso/expand.c +0 -700
  928. data/ext/abc/src/misc/espresso/gasp.c +0 -233
  929. data/ext/abc/src/misc/espresso/gimpel.c +0 -112
  930. data/ext/abc/src/misc/espresso/globals.c +0 -81
  931. data/ext/abc/src/misc/espresso/hack.c +0 -646
  932. data/ext/abc/src/misc/espresso/indep.c +0 -139
  933. data/ext/abc/src/misc/espresso/irred.c +0 -445
  934. data/ext/abc/src/misc/espresso/main.c +0 -751
  935. data/ext/abc/src/misc/espresso/main.h +0 -122
  936. data/ext/abc/src/misc/espresso/map.c +0 -122
  937. data/ext/abc/src/misc/espresso/matrix.c +0 -579
  938. data/ext/abc/src/misc/espresso/mincov.c +0 -383
  939. data/ext/abc/src/misc/espresso/mincov.h +0 -11
  940. data/ext/abc/src/misc/espresso/mincov_int.h +0 -55
  941. data/ext/abc/src/misc/espresso/module.make +0 -39
  942. data/ext/abc/src/misc/espresso/opo.c +0 -629
  943. data/ext/abc/src/misc/espresso/pair.c +0 -685
  944. data/ext/abc/src/misc/espresso/part.c +0 -127
  945. data/ext/abc/src/misc/espresso/primes.c +0 -175
  946. data/ext/abc/src/misc/espresso/reduce.c +0 -263
  947. data/ext/abc/src/misc/espresso/rows.c +0 -319
  948. data/ext/abc/src/misc/espresso/set.c +0 -825
  949. data/ext/abc/src/misc/espresso/setc.c +0 -488
  950. data/ext/abc/src/misc/espresso/sharp.c +0 -252
  951. data/ext/abc/src/misc/espresso/sminterf.c +0 -49
  952. data/ext/abc/src/misc/espresso/solution.c +0 -119
  953. data/ext/abc/src/misc/espresso/sparse.c +0 -151
  954. data/ext/abc/src/misc/espresso/sparse.h +0 -143
  955. data/ext/abc/src/misc/espresso/sparse_int.h +0 -121
  956. data/ext/abc/src/misc/espresso/unate.c +0 -446
  957. data/ext/abc/src/misc/espresso/util_old.h +0 -309
  958. data/ext/abc/src/misc/espresso/verify.c +0 -198
  959. data/ext/abc/src/misc/extra/extra.h +0 -417
  960. data/ext/abc/src/misc/extra/extraUtilBitMatrix.c +0 -420
  961. data/ext/abc/src/misc/extra/extraUtilCanon.c +0 -691
  962. data/ext/abc/src/misc/extra/extraUtilCube.c +0 -279
  963. data/ext/abc/src/misc/extra/extraUtilDsd.c +0 -1271
  964. data/ext/abc/src/misc/extra/extraUtilEnum.c +0 -680
  965. data/ext/abc/src/misc/extra/extraUtilFile.c +0 -887
  966. data/ext/abc/src/misc/extra/extraUtilMemory.c +0 -628
  967. data/ext/abc/src/misc/extra/extraUtilMisc.c +0 -2580
  968. data/ext/abc/src/misc/extra/extraUtilPerm.c +0 -933
  969. data/ext/abc/src/misc/extra/extraUtilPrime.c +0 -602
  970. data/ext/abc/src/misc/extra/extraUtilProgress.c +0 -185
  971. data/ext/abc/src/misc/extra/extraUtilReader.c +0 -390
  972. data/ext/abc/src/misc/extra/extraUtilSupp.c +0 -532
  973. data/ext/abc/src/misc/extra/extraUtilTruth.c +0 -1153
  974. data/ext/abc/src/misc/extra/extraUtilUtil.c +0 -421
  975. data/ext/abc/src/misc/extra/extraZddTrunc.c +0 -338
  976. data/ext/abc/src/misc/extra/module.make +0 -14
  977. data/ext/abc/src/misc/hash/hash.h +0 -70
  978. data/ext/abc/src/misc/hash/hashFlt.h +0 -339
  979. data/ext/abc/src/misc/hash/hashGen.h +0 -367
  980. data/ext/abc/src/misc/hash/hashInt.h +0 -302
  981. data/ext/abc/src/misc/hash/hashPtr.h +0 -339
  982. data/ext/abc/src/misc/hash/module.make +0 -1
  983. data/ext/abc/src/misc/mem/mem.c +0 -605
  984. data/ext/abc/src/misc/mem/mem.h +0 -75
  985. data/ext/abc/src/misc/mem/mem2.h +0 -271
  986. data/ext/abc/src/misc/mem/module.make +0 -1
  987. data/ext/abc/src/misc/mvc/module.make +0 -15
  988. data/ext/abc/src/misc/mvc/mvc.c +0 -51
  989. data/ext/abc/src/misc/mvc/mvc.h +0 -739
  990. data/ext/abc/src/misc/mvc/mvcApi.c +0 -238
  991. data/ext/abc/src/misc/mvc/mvcCompare.c +0 -374
  992. data/ext/abc/src/misc/mvc/mvcContain.c +0 -178
  993. data/ext/abc/src/misc/mvc/mvcCover.c +0 -256
  994. data/ext/abc/src/misc/mvc/mvcCube.c +0 -180
  995. data/ext/abc/src/misc/mvc/mvcDivide.c +0 -442
  996. data/ext/abc/src/misc/mvc/mvcDivisor.c +0 -95
  997. data/ext/abc/src/misc/mvc/mvcList.c +0 -367
  998. data/ext/abc/src/misc/mvc/mvcLits.c +0 -350
  999. data/ext/abc/src/misc/mvc/mvcMan.c +0 -82
  1000. data/ext/abc/src/misc/mvc/mvcOpAlg.c +0 -168
  1001. data/ext/abc/src/misc/mvc/mvcOpBool.c +0 -156
  1002. data/ext/abc/src/misc/mvc/mvcPrint.c +0 -225
  1003. data/ext/abc/src/misc/mvc/mvcSort.c +0 -146
  1004. data/ext/abc/src/misc/mvc/mvcUtils.c +0 -873
  1005. data/ext/abc/src/misc/nm/module.make +0 -2
  1006. data/ext/abc/src/misc/nm/nm.h +0 -96
  1007. data/ext/abc/src/misc/nm/nmApi.c +0 -278
  1008. data/ext/abc/src/misc/nm/nmInt.h +0 -94
  1009. data/ext/abc/src/misc/nm/nmTable.c +0 -310
  1010. data/ext/abc/src/misc/parse/module.make +0 -2
  1011. data/ext/abc/src/misc/parse/parse.h +0 -62
  1012. data/ext/abc/src/misc/parse/parseCore.c +0 -536
  1013. data/ext/abc/src/misc/parse/parseEqn.c +0 -362
  1014. data/ext/abc/src/misc/parse/parseInt.h +0 -77
  1015. data/ext/abc/src/misc/parse/parseStack.c +0 -248
  1016. data/ext/abc/src/misc/st/module.make +0 -2
  1017. data/ext/abc/src/misc/st/st.c +0 -561
  1018. data/ext/abc/src/misc/st/st.h +0 -121
  1019. data/ext/abc/src/misc/st/stmm.c +0 -627
  1020. data/ext/abc/src/misc/st/stmm.h +0 -147
  1021. data/ext/abc/src/misc/tim/module.make +0 -5
  1022. data/ext/abc/src/misc/tim/tim.c +0 -39
  1023. data/ext/abc/src/misc/tim/tim.h +0 -184
  1024. data/ext/abc/src/misc/tim/timBox.c +0 -326
  1025. data/ext/abc/src/misc/tim/timDump.c +0 -201
  1026. data/ext/abc/src/misc/tim/timInt.h +0 -148
  1027. data/ext/abc/src/misc/tim/timMan.c +0 -807
  1028. data/ext/abc/src/misc/tim/timTime.c +0 -267
  1029. data/ext/abc/src/misc/tim/timTrav.c +0 -185
  1030. data/ext/abc/src/misc/util/abc_global.h +0 -416
  1031. data/ext/abc/src/misc/util/abc_namespaces.h +0 -58
  1032. data/ext/abc/src/misc/util/module.make +0 -8
  1033. data/ext/abc/src/misc/util/utilBridge.c +0 -564
  1034. data/ext/abc/src/misc/util/utilCex.c +0 -574
  1035. data/ext/abc/src/misc/util/utilCex.h +0 -84
  1036. data/ext/abc/src/misc/util/utilColor.c +0 -124
  1037. data/ext/abc/src/misc/util/utilDouble.h +0 -222
  1038. data/ext/abc/src/misc/util/utilFile.c +0 -221
  1039. data/ext/abc/src/misc/util/utilFloat.h +0 -226
  1040. data/ext/abc/src/misc/util/utilIsop.c +0 -1139
  1041. data/ext/abc/src/misc/util/utilMem.c +0 -341
  1042. data/ext/abc/src/misc/util/utilMem.h +0 -73
  1043. data/ext/abc/src/misc/util/utilNam.c +0 -622
  1044. data/ext/abc/src/misc/util/utilNam.h +0 -80
  1045. data/ext/abc/src/misc/util/utilSignal.c +0 -68
  1046. data/ext/abc/src/misc/util/utilSignal.h +0 -58
  1047. data/ext/abc/src/misc/util/utilSort.c +0 -789
  1048. data/ext/abc/src/misc/util/utilTruth.h +0 -3076
  1049. data/ext/abc/src/misc/util/util_hack.h +0 -46
  1050. data/ext/abc/src/misc/vec/module.make +0 -1
  1051. data/ext/abc/src/misc/vec/vec.h +0 -74
  1052. data/ext/abc/src/misc/vec/vecAtt.h +0 -298
  1053. data/ext/abc/src/misc/vec/vecBit.h +0 -636
  1054. data/ext/abc/src/misc/vec/vecFlt.h +0 -826
  1055. data/ext/abc/src/misc/vec/vecHash.h +0 -280
  1056. data/ext/abc/src/misc/vec/vecHsh.h +0 -590
  1057. data/ext/abc/src/misc/vec/vecInt.h +0 -2078
  1058. data/ext/abc/src/misc/vec/vecMem.h +0 -431
  1059. data/ext/abc/src/misc/vec/vecPtr.h +0 -1160
  1060. data/ext/abc/src/misc/vec/vecQue.h +0 -374
  1061. data/ext/abc/src/misc/vec/vecSet.h +0 -299
  1062. data/ext/abc/src/misc/vec/vecStr.h +0 -1072
  1063. data/ext/abc/src/misc/vec/vecVec.h +0 -646
  1064. data/ext/abc/src/misc/vec/vecWec.h +0 -738
  1065. data/ext/abc/src/misc/vec/vecWrd.h +0 -1205
  1066. data/ext/abc/src/misc/zlib/README +0 -115
  1067. data/ext/abc/src/misc/zlib/adler32.c +0 -168
  1068. data/ext/abc/src/misc/zlib/algorithm.txt +0 -209
  1069. data/ext/abc/src/misc/zlib/compress_.c +0 -76
  1070. data/ext/abc/src/misc/zlib/crc32.c +0 -433
  1071. data/ext/abc/src/misc/zlib/crc32.h +0 -445
  1072. data/ext/abc/src/misc/zlib/deflate.c +0 -1784
  1073. data/ext/abc/src/misc/zlib/deflate.h +0 -346
  1074. data/ext/abc/src/misc/zlib/gzclose.c +0 -33
  1075. data/ext/abc/src/misc/zlib/gzguts.h +0 -147
  1076. data/ext/abc/src/misc/zlib/gzlib.c +0 -517
  1077. data/ext/abc/src/misc/zlib/gzread.c +0 -641
  1078. data/ext/abc/src/misc/zlib/gzwrite.c +0 -520
  1079. data/ext/abc/src/misc/zlib/infback.c +0 -631
  1080. data/ext/abc/src/misc/zlib/inffast.c +0 -351
  1081. data/ext/abc/src/misc/zlib/inffast.h +0 -15
  1082. data/ext/abc/src/misc/zlib/inffixed.h +0 -98
  1083. data/ext/abc/src/misc/zlib/inflate.c +0 -1457
  1084. data/ext/abc/src/misc/zlib/inflate.h +0 -126
  1085. data/ext/abc/src/misc/zlib/inftrees.c +0 -337
  1086. data/ext/abc/src/misc/zlib/inftrees.h +0 -66
  1087. data/ext/abc/src/misc/zlib/license +0 -31
  1088. data/ext/abc/src/misc/zlib/link.txt +0 -1
  1089. data/ext/abc/src/misc/zlib/module.make +0 -15
  1090. data/ext/abc/src/misc/zlib/trees.c +0 -1216
  1091. data/ext/abc/src/misc/zlib/trees.h +0 -132
  1092. data/ext/abc/src/misc/zlib/uncompr.c +0 -67
  1093. data/ext/abc/src/misc/zlib/zconf.h +0 -432
  1094. data/ext/abc/src/misc/zlib/zlib.h +0 -1619
  1095. data/ext/abc/src/misc/zlib/zutil.c +0 -318
  1096. data/ext/abc/src/misc/zlib/zutil.h +0 -288
  1097. data/ext/abc/src/opt/cgt/cgt.h +0 -87
  1098. data/ext/abc/src/opt/cgt/cgtAig.c +0 -601
  1099. data/ext/abc/src/opt/cgt/cgtCore.c +0 -328
  1100. data/ext/abc/src/opt/cgt/cgtDecide.c +0 -300
  1101. data/ext/abc/src/opt/cgt/cgtInt.h +0 -123
  1102. data/ext/abc/src/opt/cgt/cgtMan.c +0 -179
  1103. data/ext/abc/src/opt/cgt/cgtSat.c +0 -98
  1104. data/ext/abc/src/opt/cgt/module.make +0 -5
  1105. data/ext/abc/src/opt/csw/csw.h +0 -69
  1106. data/ext/abc/src/opt/csw/cswCore.c +0 -100
  1107. data/ext/abc/src/opt/csw/cswCut.c +0 -608
  1108. data/ext/abc/src/opt/csw/cswInt.h +0 -160
  1109. data/ext/abc/src/opt/csw/cswMan.c +0 -130
  1110. data/ext/abc/src/opt/csw/cswTable.c +0 -166
  1111. data/ext/abc/src/opt/csw/csw_.c +0 -53
  1112. data/ext/abc/src/opt/csw/module.make +0 -4
  1113. data/ext/abc/src/opt/cut/abcCut.c +0 -498
  1114. data/ext/abc/src/opt/cut/cut.h +0 -172
  1115. data/ext/abc/src/opt/cut/cutApi.c +0 -202
  1116. data/ext/abc/src/opt/cut/cutCut.c +0 -364
  1117. data/ext/abc/src/opt/cut/cutExpand.c +0 -189
  1118. data/ext/abc/src/opt/cut/cutInt.h +0 -165
  1119. data/ext/abc/src/opt/cut/cutList.h +0 -215
  1120. data/ext/abc/src/opt/cut/cutMan.c +0 -320
  1121. data/ext/abc/src/opt/cut/cutMerge.c +0 -662
  1122. data/ext/abc/src/opt/cut/cutNode.c +0 -1004
  1123. data/ext/abc/src/opt/cut/cutOracle.c +0 -424
  1124. data/ext/abc/src/opt/cut/cutPre22.c +0 -994
  1125. data/ext/abc/src/opt/cut/cutSeq.c +0 -232
  1126. data/ext/abc/src/opt/cut/cutTruth.c +0 -232
  1127. data/ext/abc/src/opt/cut/module.make +0 -9
  1128. data/ext/abc/src/opt/dar/dar.h +0 -116
  1129. data/ext/abc/src/opt/dar/darBalance.c +0 -761
  1130. data/ext/abc/src/opt/dar/darCore.c +0 -348
  1131. data/ext/abc/src/opt/dar/darCut.c +0 -837
  1132. data/ext/abc/src/opt/dar/darData.c +0 -11294
  1133. data/ext/abc/src/opt/dar/darInt.h +0 -169
  1134. data/ext/abc/src/opt/dar/darLib.c +0 -1341
  1135. data/ext/abc/src/opt/dar/darMan.c +0 -174
  1136. data/ext/abc/src/opt/dar/darPrec.c +0 -394
  1137. data/ext/abc/src/opt/dar/darRefact.c +0 -639
  1138. data/ext/abc/src/opt/dar/darResub.c +0 -53
  1139. data/ext/abc/src/opt/dar/darScript.c +0 -911
  1140. data/ext/abc/src/opt/dar/dar_.c +0 -53
  1141. data/ext/abc/src/opt/dar/module.make +0 -9
  1142. data/ext/abc/src/opt/dau/dau.c +0 -53
  1143. data/ext/abc/src/opt/dau/dau.h +0 -125
  1144. data/ext/abc/src/opt/dau/dauArray.c +0 -257
  1145. data/ext/abc/src/opt/dau/dauCanon.c +0 -1202
  1146. data/ext/abc/src/opt/dau/dauCore.c +0 -112
  1147. data/ext/abc/src/opt/dau/dauDivs.c +0 -111
  1148. data/ext/abc/src/opt/dau/dauDsd.c +0 -2098
  1149. data/ext/abc/src/opt/dau/dauDsd2.c +0 -660
  1150. data/ext/abc/src/opt/dau/dauEnum.c +0 -253
  1151. data/ext/abc/src/opt/dau/dauGia.c +0 -573
  1152. data/ext/abc/src/opt/dau/dauInt.h +0 -70
  1153. data/ext/abc/src/opt/dau/dauMerge.c +0 -824
  1154. data/ext/abc/src/opt/dau/dauNonDsd.c +0 -903
  1155. data/ext/abc/src/opt/dau/dauTree.c +0 -2022
  1156. data/ext/abc/src/opt/dau/module.make +0 -9
  1157. data/ext/abc/src/opt/dsc/dsc.c +0 -525
  1158. data/ext/abc/src/opt/dsc/dsc.h +0 -91
  1159. data/ext/abc/src/opt/dsc/module.make +0 -1
  1160. data/ext/abc/src/opt/fret/fretFlow.c +0 -700
  1161. data/ext/abc/src/opt/fret/fretInit.c +0 -1343
  1162. data/ext/abc/src/opt/fret/fretMain.c +0 -1383
  1163. data/ext/abc/src/opt/fret/fretTime.c +0 -766
  1164. data/ext/abc/src/opt/fret/fretime.h +0 -212
  1165. data/ext/abc/src/opt/fret/module.make +0 -5
  1166. data/ext/abc/src/opt/fsim/fsim.h +0 -101
  1167. data/ext/abc/src/opt/fsim/fsimCore.c +0 -88
  1168. data/ext/abc/src/opt/fsim/fsimFront.c +0 -369
  1169. data/ext/abc/src/opt/fsim/fsimInt.h +0 -138
  1170. data/ext/abc/src/opt/fsim/fsimMan.c +0 -212
  1171. data/ext/abc/src/opt/fsim/fsimSim.c +0 -569
  1172. data/ext/abc/src/opt/fsim/fsimSwitch.c +0 -40
  1173. data/ext/abc/src/opt/fsim/fsimTsim.c +0 -416
  1174. data/ext/abc/src/opt/fsim/module.make +0 -6
  1175. data/ext/abc/src/opt/fxch/Fxch.c +0 -266
  1176. data/ext/abc/src/opt/fxch/Fxch.h +0 -229
  1177. data/ext/abc/src/opt/fxch/FxchDiv.c +0 -485
  1178. data/ext/abc/src/opt/fxch/FxchMan.c +0 -785
  1179. data/ext/abc/src/opt/fxch/FxchSCHashTable.c +0 -382
  1180. data/ext/abc/src/opt/fxch/module.make +0 -4
  1181. data/ext/abc/src/opt/fxu/fxu.c +0 -260
  1182. data/ext/abc/src/opt/fxu/fxu.h +0 -97
  1183. data/ext/abc/src/opt/fxu/fxuCreate.c +0 -447
  1184. data/ext/abc/src/opt/fxu/fxuHeapD.c +0 -450
  1185. data/ext/abc/src/opt/fxu/fxuHeapS.c +0 -449
  1186. data/ext/abc/src/opt/fxu/fxuInt.h +0 -545
  1187. data/ext/abc/src/opt/fxu/fxuList.c +0 -527
  1188. data/ext/abc/src/opt/fxu/fxuMatrix.c +0 -377
  1189. data/ext/abc/src/opt/fxu/fxuPair.c +0 -560
  1190. data/ext/abc/src/opt/fxu/fxuPrint.c +0 -202
  1191. data/ext/abc/src/opt/fxu/fxuReduce.c +0 -213
  1192. data/ext/abc/src/opt/fxu/fxuSelect.c +0 -608
  1193. data/ext/abc/src/opt/fxu/fxuSingle.c +0 -289
  1194. data/ext/abc/src/opt/fxu/fxuUpdate.c +0 -811
  1195. data/ext/abc/src/opt/fxu/module.make +0 -12
  1196. data/ext/abc/src/opt/lpk/lpk.h +0 -88
  1197. data/ext/abc/src/opt/lpk/lpkAbcDec.c +0 -294
  1198. data/ext/abc/src/opt/lpk/lpkAbcDsd.c +0 -617
  1199. data/ext/abc/src/opt/lpk/lpkAbcMux.c +0 -240
  1200. data/ext/abc/src/opt/lpk/lpkAbcUtil.c +0 -249
  1201. data/ext/abc/src/opt/lpk/lpkCore.c +0 -694
  1202. data/ext/abc/src/opt/lpk/lpkCut.c +0 -689
  1203. data/ext/abc/src/opt/lpk/lpkInt.h +0 -250
  1204. data/ext/abc/src/opt/lpk/lpkMan.c +0 -127
  1205. data/ext/abc/src/opt/lpk/lpkMap.c +0 -210
  1206. data/ext/abc/src/opt/lpk/lpkMulti.c +0 -513
  1207. data/ext/abc/src/opt/lpk/lpkMux.c +0 -252
  1208. data/ext/abc/src/opt/lpk/lpkSets.c +0 -445
  1209. data/ext/abc/src/opt/lpk/lpk_.c +0 -53
  1210. data/ext/abc/src/opt/lpk/module.make +0 -11
  1211. data/ext/abc/src/opt/mfs/mfs.h +0 -89
  1212. data/ext/abc/src/opt/mfs/mfsCore.c +0 -596
  1213. data/ext/abc/src/opt/mfs/mfsCore_.c +0 -394
  1214. data/ext/abc/src/opt/mfs/mfsDiv.c +0 -309
  1215. data/ext/abc/src/opt/mfs/mfsGia.c +0 -301
  1216. data/ext/abc/src/opt/mfs/mfsInt.h +0 -192
  1217. data/ext/abc/src/opt/mfs/mfsInter.c +0 -398
  1218. data/ext/abc/src/opt/mfs/mfsMan.c +0 -202
  1219. data/ext/abc/src/opt/mfs/mfsResub.c +0 -622
  1220. data/ext/abc/src/opt/mfs/mfsResub_.c +0 -567
  1221. data/ext/abc/src/opt/mfs/mfsSat.c +0 -182
  1222. data/ext/abc/src/opt/mfs/mfsStrash.c +0 -406
  1223. data/ext/abc/src/opt/mfs/mfsWin.c +0 -117
  1224. data/ext/abc/src/opt/mfs/mfs_.c +0 -52
  1225. data/ext/abc/src/opt/mfs/module.make +0 -8
  1226. data/ext/abc/src/opt/nwk/module.make +0 -14
  1227. data/ext/abc/src/opt/nwk/ntlnwk.h +0 -113
  1228. data/ext/abc/src/opt/nwk/nwk.h +0 -307
  1229. data/ext/abc/src/opt/nwk/nwkAig.c +0 -299
  1230. data/ext/abc/src/opt/nwk/nwkBidec.c +0 -177
  1231. data/ext/abc/src/opt/nwk/nwkCheck.c +0 -76
  1232. data/ext/abc/src/opt/nwk/nwkDfs.c +0 -664
  1233. data/ext/abc/src/opt/nwk/nwkFanio.c +0 -320
  1234. data/ext/abc/src/opt/nwk/nwkFlow.c +0 -606
  1235. data/ext/abc/src/opt/nwk/nwkFlow_depth.c +0 -631
  1236. data/ext/abc/src/opt/nwk/nwkMan.c +0 -278
  1237. data/ext/abc/src/opt/nwk/nwkMap.c +0 -396
  1238. data/ext/abc/src/opt/nwk/nwkMerge.c +0 -1046
  1239. data/ext/abc/src/opt/nwk/nwkMerge.h +0 -153
  1240. data/ext/abc/src/opt/nwk/nwkObj.c +0 -204
  1241. data/ext/abc/src/opt/nwk/nwkSpeedup.c +0 -382
  1242. data/ext/abc/src/opt/nwk/nwkStrash.c +0 -149
  1243. data/ext/abc/src/opt/nwk/nwkTiming.c +0 -894
  1244. data/ext/abc/src/opt/nwk/nwkUtil.c +0 -644
  1245. data/ext/abc/src/opt/nwk/nwk_.c +0 -52
  1246. data/ext/abc/src/opt/res/module.make +0 -7
  1247. data/ext/abc/src/opt/res/res.h +0 -79
  1248. data/ext/abc/src/opt/res/resCore.c +0 -427
  1249. data/ext/abc/src/opt/res/resDivs.c +0 -290
  1250. data/ext/abc/src/opt/res/resFilter.c +0 -439
  1251. data/ext/abc/src/opt/res/resInt.h +0 -141
  1252. data/ext/abc/src/opt/res/resSat.c +0 -414
  1253. data/ext/abc/src/opt/res/resSim.c +0 -795
  1254. data/ext/abc/src/opt/res/resSim_old.c +0 -526
  1255. data/ext/abc/src/opt/res/resStrash.c +0 -122
  1256. data/ext/abc/src/opt/res/resWin.c +0 -490
  1257. data/ext/abc/src/opt/res/res_.c +0 -55
  1258. data/ext/abc/src/opt/ret/module.make +0 -8
  1259. data/ext/abc/src/opt/ret/retArea.c +0 -554
  1260. data/ext/abc/src/opt/ret/retCore.c +0 -138
  1261. data/ext/abc/src/opt/ret/retDelay.c +0 -315
  1262. data/ext/abc/src/opt/ret/retFlow.c +0 -789
  1263. data/ext/abc/src/opt/ret/retIncrem.c +0 -480
  1264. data/ext/abc/src/opt/ret/retInit.c +0 -355
  1265. data/ext/abc/src/opt/ret/retInt.h +0 -88
  1266. data/ext/abc/src/opt/ret/retLvalue.c +0 -402
  1267. data/ext/abc/src/opt/ret/ret_.c +0 -53
  1268. data/ext/abc/src/opt/rwr/module.make +0 -7
  1269. data/ext/abc/src/opt/rwr/rwr.h +0 -173
  1270. data/ext/abc/src/opt/rwr/rwrDec.c +0 -155
  1271. data/ext/abc/src/opt/rwr/rwrEva.c +0 -599
  1272. data/ext/abc/src/opt/rwr/rwrExp.c +0 -336
  1273. data/ext/abc/src/opt/rwr/rwrLib.c +0 -367
  1274. data/ext/abc/src/opt/rwr/rwrMan.c +0 -323
  1275. data/ext/abc/src/opt/rwr/rwrPrint.c +0 -271
  1276. data/ext/abc/src/opt/rwr/rwrTemp.c +0 -126
  1277. data/ext/abc/src/opt/rwr/rwrUtil.c +0 -661
  1278. data/ext/abc/src/opt/rwt/module.make +0 -3
  1279. data/ext/abc/src/opt/rwt/rwt.h +0 -165
  1280. data/ext/abc/src/opt/rwt/rwtDec.c +0 -155
  1281. data/ext/abc/src/opt/rwt/rwtMan.c +0 -363
  1282. data/ext/abc/src/opt/rwt/rwtUtil.c +0 -663
  1283. data/ext/abc/src/opt/sbd/module.make +0 -9
  1284. data/ext/abc/src/opt/sbd/sbd.c +0 -122
  1285. data/ext/abc/src/opt/sbd/sbd.h +0 -82
  1286. data/ext/abc/src/opt/sbd/sbdCnf.c +0 -147
  1287. data/ext/abc/src/opt/sbd/sbdCore.c +0 -2229
  1288. data/ext/abc/src/opt/sbd/sbdCut.c +0 -872
  1289. data/ext/abc/src/opt/sbd/sbdCut2.c +0 -431
  1290. data/ext/abc/src/opt/sbd/sbdInt.h +0 -125
  1291. data/ext/abc/src/opt/sbd/sbdLut.c +0 -311
  1292. data/ext/abc/src/opt/sbd/sbdPath.c +0 -197
  1293. data/ext/abc/src/opt/sbd/sbdSat.c +0 -793
  1294. data/ext/abc/src/opt/sbd/sbdSim.c +0 -310
  1295. data/ext/abc/src/opt/sbd/sbdWin.c +0 -464
  1296. data/ext/abc/src/opt/sfm/module.make +0 -10
  1297. data/ext/abc/src/opt/sfm/sfm.h +0 -107
  1298. data/ext/abc/src/opt/sfm/sfmArea.c +0 -380
  1299. data/ext/abc/src/opt/sfm/sfmCnf.c +0 -179
  1300. data/ext/abc/src/opt/sfm/sfmCore.c +0 -306
  1301. data/ext/abc/src/opt/sfm/sfmDec.c +0 -2168
  1302. data/ext/abc/src/opt/sfm/sfmInt.h +0 -254
  1303. data/ext/abc/src/opt/sfm/sfmLib.c +0 -766
  1304. data/ext/abc/src/opt/sfm/sfmMit.c +0 -73
  1305. data/ext/abc/src/opt/sfm/sfmNtk.c +0 -381
  1306. data/ext/abc/src/opt/sfm/sfmSat.c +0 -273
  1307. data/ext/abc/src/opt/sfm/sfmTim.c +0 -458
  1308. data/ext/abc/src/opt/sfm/sfmWin.c +0 -481
  1309. data/ext/abc/src/opt/sim/module.make +0 -9
  1310. data/ext/abc/src/opt/sim/sim.h +0 -237
  1311. data/ext/abc/src/opt/sim/simMan.c +0 -293
  1312. data/ext/abc/src/opt/sim/simSat.c +0 -53
  1313. data/ext/abc/src/opt/sim/simSeq.c +0 -176
  1314. data/ext/abc/src/opt/sim/simSupp.c +0 -603
  1315. data/ext/abc/src/opt/sim/simSwitch.c +0 -112
  1316. data/ext/abc/src/opt/sim/simSym.c +0 -148
  1317. data/ext/abc/src/opt/sim/simSymSat.c +0 -205
  1318. data/ext/abc/src/opt/sim/simSymSim.c +0 -178
  1319. data/ext/abc/src/opt/sim/simSymStr.c +0 -493
  1320. data/ext/abc/src/opt/sim/simUtils.c +0 -718
  1321. data/ext/abc/src/phys/place/Makefile +0 -30
  1322. data/ext/abc/src/phys/place/README +0 -50
  1323. data/ext/abc/src/phys/place/hpwl +0 -57
  1324. data/ext/abc/src/phys/place/libhmetis.h +0 -39
  1325. data/ext/abc/src/phys/place/module.make +0 -10
  1326. data/ext/abc/src/phys/place/place_base.c +0 -350
  1327. data/ext/abc/src/phys/place/place_base.h +0 -145
  1328. data/ext/abc/src/phys/place/place_bin.c +0 -282
  1329. data/ext/abc/src/phys/place/place_genqp.c +0 -314
  1330. data/ext/abc/src/phys/place/place_gordian.c +0 -165
  1331. data/ext/abc/src/phys/place/place_gordian.h +0 -86
  1332. data/ext/abc/src/phys/place/place_inc.c +0 -111
  1333. data/ext/abc/src/phys/place/place_io.c +0 -99
  1334. data/ext/abc/src/phys/place/place_legalize.c +0 -28
  1335. data/ext/abc/src/phys/place/place_pads.c +0 -146
  1336. data/ext/abc/src/phys/place/place_partition.c +0 -1140
  1337. data/ext/abc/src/phys/place/place_qpsolver.c +0 -1275
  1338. data/ext/abc/src/phys/place/place_qpsolver.h +0 -139
  1339. data/ext/abc/src/phys/place/place_test.c +0 -365
  1340. data/ext/abc/src/proof/abs/abs.c +0 -52
  1341. data/ext/abc/src/proof/abs/abs.h +0 -177
  1342. data/ext/abc/src/proof/abs/absDup.c +0 -445
  1343. data/ext/abc/src/proof/abs/absGla.c +0 -1901
  1344. data/ext/abc/src/proof/abs/absGlaOld.c +0 -1956
  1345. data/ext/abc/src/proof/abs/absIter.c +0 -148
  1346. data/ext/abc/src/proof/abs/absOldCex.c +0 -873
  1347. data/ext/abc/src/proof/abs/absOldRef.c +0 -474
  1348. data/ext/abc/src/proof/abs/absOldSat.c +0 -986
  1349. data/ext/abc/src/proof/abs/absOldSim.c +0 -477
  1350. data/ext/abc/src/proof/abs/absOut.c +0 -458
  1351. data/ext/abc/src/proof/abs/absPth.c +0 -205
  1352. data/ext/abc/src/proof/abs/absRef.c +0 -751
  1353. data/ext/abc/src/proof/abs/absRef.h +0 -129
  1354. data/ext/abc/src/proof/abs/absRefJ.c +0 -916
  1355. data/ext/abc/src/proof/abs/absRefJ.h +0 -67
  1356. data/ext/abc/src/proof/abs/absRefSelect.c +0 -309
  1357. data/ext/abc/src/proof/abs/absRpm.c +0 -874
  1358. data/ext/abc/src/proof/abs/absRpmOld.c +0 -201
  1359. data/ext/abc/src/proof/abs/absUtil.c +0 -257
  1360. data/ext/abc/src/proof/abs/absVta.c +0 -1764
  1361. data/ext/abc/src/proof/abs/module.make +0 -16
  1362. data/ext/abc/src/proof/acec/acec.c +0 -52
  1363. data/ext/abc/src/proof/acec/acec.h +0 -98
  1364. data/ext/abc/src/proof/acec/acec2Mult.c +0 -1211
  1365. data/ext/abc/src/proof/acec/acecBo.c +0 -216
  1366. data/ext/abc/src/proof/acec/acecCl.c +0 -445
  1367. data/ext/abc/src/proof/acec/acecCo.c +0 -429
  1368. data/ext/abc/src/proof/acec/acecCore.c +0 -553
  1369. data/ext/abc/src/proof/acec/acecCover.c +0 -263
  1370. data/ext/abc/src/proof/acec/acecFadds.c +0 -1247
  1371. data/ext/abc/src/proof/acec/acecInt.h +0 -105
  1372. data/ext/abc/src/proof/acec/acecMult.c +0 -623
  1373. data/ext/abc/src/proof/acec/acecNorm.c +0 -226
  1374. data/ext/abc/src/proof/acec/acecOrder.c +0 -254
  1375. data/ext/abc/src/proof/acec/acecPa.c +0 -277
  1376. data/ext/abc/src/proof/acec/acecPo.c +0 -655
  1377. data/ext/abc/src/proof/acec/acecPolyn.c +0 -445
  1378. data/ext/abc/src/proof/acec/acecPool.c +0 -428
  1379. data/ext/abc/src/proof/acec/acecRe.c +0 -602
  1380. data/ext/abc/src/proof/acec/acecSt.c +0 -422
  1381. data/ext/abc/src/proof/acec/acecStruct.c +0 -271
  1382. data/ext/abc/src/proof/acec/acecTree.c +0 -783
  1383. data/ext/abc/src/proof/acec/acecUtil.c +0 -122
  1384. data/ext/abc/src/proof/acec/acecXor.c +0 -434
  1385. data/ext/abc/src/proof/acec/module.make +0 -19
  1386. data/ext/abc/src/proof/cec/cec.c +0 -53
  1387. data/ext/abc/src/proof/cec/cec.h +0 -240
  1388. data/ext/abc/src/proof/cec/cecCec.c +0 -580
  1389. data/ext/abc/src/proof/cec/cecChoice.c +0 -410
  1390. data/ext/abc/src/proof/cec/cecClass.c +0 -931
  1391. data/ext/abc/src/proof/cec/cecCore.c +0 -554
  1392. data/ext/abc/src/proof/cec/cecCorr.c +0 -1229
  1393. data/ext/abc/src/proof/cec/cecInt.h +0 -227
  1394. data/ext/abc/src/proof/cec/cecIso.c +0 -375
  1395. data/ext/abc/src/proof/cec/cecMan.c +0 -297
  1396. data/ext/abc/src/proof/cec/cecPat.c +0 -578
  1397. data/ext/abc/src/proof/cec/cecSat.c +0 -1040
  1398. data/ext/abc/src/proof/cec/cecSatG.c +0 -1048
  1399. data/ext/abc/src/proof/cec/cecSeq.c +0 -449
  1400. data/ext/abc/src/proof/cec/cecSim.c +0 -53
  1401. data/ext/abc/src/proof/cec/cecSimBack.c +0 -194
  1402. data/ext/abc/src/proof/cec/cecSolve.c +0 -1107
  1403. data/ext/abc/src/proof/cec/cecSplit.c +0 -849
  1404. data/ext/abc/src/proof/cec/cecSweep.c +0 -301
  1405. data/ext/abc/src/proof/cec/cecSynth.c +0 -433
  1406. data/ext/abc/src/proof/cec/module.make +0 -15
  1407. data/ext/abc/src/proof/dch/dch.h +0 -91
  1408. data/ext/abc/src/proof/dch/dchAig.c +0 -119
  1409. data/ext/abc/src/proof/dch/dchChoice.c +0 -552
  1410. data/ext/abc/src/proof/dch/dchClass.c +0 -611
  1411. data/ext/abc/src/proof/dch/dchCnf.c +0 -334
  1412. data/ext/abc/src/proof/dch/dchCore.c +0 -161
  1413. data/ext/abc/src/proof/dch/dchInt.h +0 -170
  1414. data/ext/abc/src/proof/dch/dchMan.c +0 -191
  1415. data/ext/abc/src/proof/dch/dchSat.c +0 -167
  1416. data/ext/abc/src/proof/dch/dchSim.c +0 -297
  1417. data/ext/abc/src/proof/dch/dchSimSat.c +0 -260
  1418. data/ext/abc/src/proof/dch/dchSweep.c +0 -146
  1419. data/ext/abc/src/proof/dch/module.make +0 -10
  1420. data/ext/abc/src/proof/fra/fra.h +0 -389
  1421. data/ext/abc/src/proof/fra/fraBmc.c +0 -453
  1422. data/ext/abc/src/proof/fra/fraCec.c +0 -574
  1423. data/ext/abc/src/proof/fra/fraClass.c +0 -862
  1424. data/ext/abc/src/proof/fra/fraClau.c +0 -745
  1425. data/ext/abc/src/proof/fra/fraClaus.c +0 -1877
  1426. data/ext/abc/src/proof/fra/fraCnf.c +0 -289
  1427. data/ext/abc/src/proof/fra/fraCore.c +0 -490
  1428. data/ext/abc/src/proof/fra/fraHot.c +0 -476
  1429. data/ext/abc/src/proof/fra/fraImp.c +0 -732
  1430. data/ext/abc/src/proof/fra/fraInd.c +0 -712
  1431. data/ext/abc/src/proof/fra/fraIndVer.c +0 -166
  1432. data/ext/abc/src/proof/fra/fraLcr.c +0 -708
  1433. data/ext/abc/src/proof/fra/fraMan.c +0 -314
  1434. data/ext/abc/src/proof/fra/fraPart.c +0 -269
  1435. data/ext/abc/src/proof/fra/fraSat.c +0 -571
  1436. data/ext/abc/src/proof/fra/fraSec.c +0 -693
  1437. data/ext/abc/src/proof/fra/fraSim.c +0 -1173
  1438. data/ext/abc/src/proof/fra/fra_.c +0 -53
  1439. data/ext/abc/src/proof/fra/module.make +0 -17
  1440. data/ext/abc/src/proof/fraig/fraig.h +0 -257
  1441. data/ext/abc/src/proof/fraig/fraigApi.c +0 -299
  1442. data/ext/abc/src/proof/fraig/fraigCanon.c +0 -223
  1443. data/ext/abc/src/proof/fraig/fraigChoice.c +0 -246
  1444. data/ext/abc/src/proof/fraig/fraigFanout.c +0 -180
  1445. data/ext/abc/src/proof/fraig/fraigFeed.c +0 -914
  1446. data/ext/abc/src/proof/fraig/fraigInt.h +0 -436
  1447. data/ext/abc/src/proof/fraig/fraigMan.c +0 -546
  1448. data/ext/abc/src/proof/fraig/fraigMem.c +0 -251
  1449. data/ext/abc/src/proof/fraig/fraigNode.c +0 -319
  1450. data/ext/abc/src/proof/fraig/fraigPrime.c +0 -113
  1451. data/ext/abc/src/proof/fraig/fraigSat.c +0 -1463
  1452. data/ext/abc/src/proof/fraig/fraigTable.c +0 -664
  1453. data/ext/abc/src/proof/fraig/fraigUtil.c +0 -1039
  1454. data/ext/abc/src/proof/fraig/fraigVec.c +0 -550
  1455. data/ext/abc/src/proof/fraig/module.make +0 -12
  1456. data/ext/abc/src/proof/int/int.h +0 -96
  1457. data/ext/abc/src/proof/int/intCheck.c +0 -305
  1458. data/ext/abc/src/proof/int/intContain.c +0 -341
  1459. data/ext/abc/src/proof/int/intCore.c +0 -412
  1460. data/ext/abc/src/proof/int/intCtrex.c +0 -168
  1461. data/ext/abc/src/proof/int/intDup.c +0 -184
  1462. data/ext/abc/src/proof/int/intFrames.c +0 -124
  1463. data/ext/abc/src/proof/int/intInt.h +0 -143
  1464. data/ext/abc/src/proof/int/intInter.c +0 -145
  1465. data/ext/abc/src/proof/int/intM114.c +0 -323
  1466. data/ext/abc/src/proof/int/intM114p.c +0 -443
  1467. data/ext/abc/src/proof/int/intMan.c +0 -165
  1468. data/ext/abc/src/proof/int/intUtil.c +0 -108
  1469. data/ext/abc/src/proof/int/module.make +0 -10
  1470. data/ext/abc/src/proof/int2/int2.h +0 -90
  1471. data/ext/abc/src/proof/int2/int2Bmc.c +0 -355
  1472. data/ext/abc/src/proof/int2/int2Core.c +0 -335
  1473. data/ext/abc/src/proof/int2/int2Int.h +0 -164
  1474. data/ext/abc/src/proof/int2/int2Refine.c +0 -154
  1475. data/ext/abc/src/proof/int2/int2Util.c +0 -152
  1476. data/ext/abc/src/proof/int2/module.make +0 -4
  1477. data/ext/abc/src/proof/live/arenaViolation.c +0 -549
  1478. data/ext/abc/src/proof/live/combination.c +0 -463
  1479. data/ext/abc/src/proof/live/disjunctiveMonotone.c +0 -757
  1480. data/ext/abc/src/proof/live/kLiveConstraints.c +0 -177
  1481. data/ext/abc/src/proof/live/kliveness.c +0 -816
  1482. data/ext/abc/src/proof/live/liveness.c +0 -2575
  1483. data/ext/abc/src/proof/live/liveness_sim.c +0 -849
  1484. data/ext/abc/src/proof/live/ltl_parser.c +0 -839
  1485. data/ext/abc/src/proof/live/module.make +0 -9
  1486. data/ext/abc/src/proof/live/monotone.c +0 -507
  1487. data/ext/abc/src/proof/pdr/module.make +0 -10
  1488. data/ext/abc/src/proof/pdr/pdr.c +0 -53
  1489. data/ext/abc/src/proof/pdr/pdr.h +0 -109
  1490. data/ext/abc/src/proof/pdr/pdrClass.c +0 -223
  1491. data/ext/abc/src/proof/pdr/pdrCnf.c +0 -455
  1492. data/ext/abc/src/proof/pdr/pdrCore.c +0 -1451
  1493. data/ext/abc/src/proof/pdr/pdrIncr.c +0 -1046
  1494. data/ext/abc/src/proof/pdr/pdrInt.h +0 -275
  1495. data/ext/abc/src/proof/pdr/pdrInv.c +0 -985
  1496. data/ext/abc/src/proof/pdr/pdrMan.c +0 -549
  1497. data/ext/abc/src/proof/pdr/pdrSat.c +0 -395
  1498. data/ext/abc/src/proof/pdr/pdrTsim.c +0 -502
  1499. data/ext/abc/src/proof/pdr/pdrTsim2.c +0 -550
  1500. data/ext/abc/src/proof/pdr/pdrTsim3.c +0 -361
  1501. data/ext/abc/src/proof/pdr/pdrUtil.c +0 -800
  1502. data/ext/abc/src/proof/ssc/module.make +0 -5
  1503. data/ext/abc/src/proof/ssc/ssc.h +0 -78
  1504. data/ext/abc/src/proof/ssc/sscClass.c +0 -326
  1505. data/ext/abc/src/proof/ssc/sscCore.c +0 -469
  1506. data/ext/abc/src/proof/ssc/sscInt.h +0 -135
  1507. data/ext/abc/src/proof/ssc/sscSat.c +0 -430
  1508. data/ext/abc/src/proof/ssc/sscSim.c +0 -364
  1509. data/ext/abc/src/proof/ssc/sscUtil.c +0 -173
  1510. data/ext/abc/src/proof/ssw/module.make +0 -20
  1511. data/ext/abc/src/proof/ssw/ssw.h +0 -170
  1512. data/ext/abc/src/proof/ssw/sswAig.c +0 -258
  1513. data/ext/abc/src/proof/ssw/sswBmc.c +0 -224
  1514. data/ext/abc/src/proof/ssw/sswClass.c +0 -1170
  1515. data/ext/abc/src/proof/ssw/sswCnf.c +0 -427
  1516. data/ext/abc/src/proof/ssw/sswConstr.c +0 -718
  1517. data/ext/abc/src/proof/ssw/sswCore.c +0 -539
  1518. data/ext/abc/src/proof/ssw/sswDyn.c +0 -491
  1519. data/ext/abc/src/proof/ssw/sswFilter.c +0 -493
  1520. data/ext/abc/src/proof/ssw/sswInt.h +0 -302
  1521. data/ext/abc/src/proof/ssw/sswIslands.c +0 -598
  1522. data/ext/abc/src/proof/ssw/sswLcorr.c +0 -337
  1523. data/ext/abc/src/proof/ssw/sswMan.c +0 -217
  1524. data/ext/abc/src/proof/ssw/sswPairs.c +0 -480
  1525. data/ext/abc/src/proof/ssw/sswPart.c +0 -140
  1526. data/ext/abc/src/proof/ssw/sswRarity.c +0 -1385
  1527. data/ext/abc/src/proof/ssw/sswRarity2.c +0 -518
  1528. data/ext/abc/src/proof/ssw/sswSat.c +0 -307
  1529. data/ext/abc/src/proof/ssw/sswSemi.c +0 -323
  1530. data/ext/abc/src/proof/ssw/sswSim.c +0 -1406
  1531. data/ext/abc/src/proof/ssw/sswSimSat.c +0 -124
  1532. data/ext/abc/src/proof/ssw/sswSweep.c +0 -440
  1533. data/ext/abc/src/proof/ssw/sswUnique.c +0 -196
  1534. data/ext/abc/src/sat/bmc/bmc.c +0 -52
  1535. data/ext/abc/src/sat/bmc/bmc.h +0 -205
  1536. data/ext/abc/src/sat/bmc/bmcBCore.c +0 -273
  1537. data/ext/abc/src/sat/bmc/bmcBmc.c +0 -377
  1538. data/ext/abc/src/sat/bmc/bmcBmc2.c +0 -944
  1539. data/ext/abc/src/sat/bmc/bmcBmc3.c +0 -1893
  1540. data/ext/abc/src/sat/bmc/bmcBmcAnd.c +0 -1100
  1541. data/ext/abc/src/sat/bmc/bmcBmcG.c +0 -455
  1542. data/ext/abc/src/sat/bmc/bmcBmcS.c +0 -940
  1543. data/ext/abc/src/sat/bmc/bmcBmci.c +0 -344
  1544. data/ext/abc/src/sat/bmc/bmcCexCare.c +0 -476
  1545. data/ext/abc/src/sat/bmc/bmcCexCut.c +0 -537
  1546. data/ext/abc/src/sat/bmc/bmcCexDepth.c +0 -373
  1547. data/ext/abc/src/sat/bmc/bmcCexMin1.c +0 -578
  1548. data/ext/abc/src/sat/bmc/bmcCexMin2.c +0 -363
  1549. data/ext/abc/src/sat/bmc/bmcCexTools.c +0 -852
  1550. data/ext/abc/src/sat/bmc/bmcChain.c +0 -396
  1551. data/ext/abc/src/sat/bmc/bmcClp.c +0 -1548
  1552. data/ext/abc/src/sat/bmc/bmcEco.c +0 -312
  1553. data/ext/abc/src/sat/bmc/bmcEnum.c +0 -223
  1554. data/ext/abc/src/sat/bmc/bmcExpand.c +0 -172
  1555. data/ext/abc/src/sat/bmc/bmcFault.c +0 -1710
  1556. data/ext/abc/src/sat/bmc/bmcFx.c +0 -725
  1557. data/ext/abc/src/sat/bmc/bmcGen.c +0 -193
  1558. data/ext/abc/src/sat/bmc/bmcICheck.c +0 -540
  1559. data/ext/abc/src/sat/bmc/bmcInse.c +0 -345
  1560. data/ext/abc/src/sat/bmc/bmcLoad.c +0 -212
  1561. data/ext/abc/src/sat/bmc/bmcMaj.c +0 -745
  1562. data/ext/abc/src/sat/bmc/bmcMaj2.c +0 -852
  1563. data/ext/abc/src/sat/bmc/bmcMaxi.c +0 -282
  1564. data/ext/abc/src/sat/bmc/bmcMesh.c +0 -433
  1565. data/ext/abc/src/sat/bmc/bmcMesh2.c +0 -449
  1566. data/ext/abc/src/sat/bmc/bmcMulti.c +0 -296
  1567. data/ext/abc/src/sat/bmc/bmcUnroll.c +0 -505
  1568. data/ext/abc/src/sat/bmc/module.make +0 -31
  1569. data/ext/abc/src/sat/bsat/license +0 -21
  1570. data/ext/abc/src/sat/bsat/module.make +0 -14
  1571. data/ext/abc/src/sat/bsat/satChecker.c +0 -193
  1572. data/ext/abc/src/sat/bsat/satClause.h +0 -476
  1573. data/ext/abc/src/sat/bsat/satInter.c +0 -1077
  1574. data/ext/abc/src/sat/bsat/satInterA.c +0 -1090
  1575. data/ext/abc/src/sat/bsat/satInterB.c +0 -1115
  1576. data/ext/abc/src/sat/bsat/satInterP.c +0 -1096
  1577. data/ext/abc/src/sat/bsat/satMem.c +0 -583
  1578. data/ext/abc/src/sat/bsat/satMem.h +0 -85
  1579. data/ext/abc/src/sat/bsat/satProof.c +0 -934
  1580. data/ext/abc/src/sat/bsat/satProof2.h +0 -327
  1581. data/ext/abc/src/sat/bsat/satSolver.c +0 -2417
  1582. data/ext/abc/src/sat/bsat/satSolver.h +0 -639
  1583. data/ext/abc/src/sat/bsat/satSolver2.c +0 -1998
  1584. data/ext/abc/src/sat/bsat/satSolver2.h +0 -377
  1585. data/ext/abc/src/sat/bsat/satSolver2i.c +0 -242
  1586. data/ext/abc/src/sat/bsat/satSolver3.c +0 -2299
  1587. data/ext/abc/src/sat/bsat/satSolver3.h +0 -622
  1588. data/ext/abc/src/sat/bsat/satStore.c +0 -469
  1589. data/ext/abc/src/sat/bsat/satStore.h +0 -158
  1590. data/ext/abc/src/sat/bsat/satTrace.c +0 -112
  1591. data/ext/abc/src/sat/bsat/satTruth.c +0 -299
  1592. data/ext/abc/src/sat/bsat/satTruth.h +0 -89
  1593. data/ext/abc/src/sat/bsat/satUtil.c +0 -358
  1594. data/ext/abc/src/sat/bsat/satVec.h +0 -161
  1595. data/ext/abc/src/sat/bsat2/AbcApi.cpp +0 -59
  1596. data/ext/abc/src/sat/bsat2/Alg.h +0 -84
  1597. data/ext/abc/src/sat/bsat2/Alloc.h +0 -131
  1598. data/ext/abc/src/sat/bsat2/Dimacs.h +0 -89
  1599. data/ext/abc/src/sat/bsat2/Heap.h +0 -149
  1600. data/ext/abc/src/sat/bsat2/IntTypes.h +0 -47
  1601. data/ext/abc/src/sat/bsat2/LICENSE +0 -21
  1602. data/ext/abc/src/sat/bsat2/MainSat.cpp +0 -197
  1603. data/ext/abc/src/sat/bsat2/MainSimp.cpp +0 -206
  1604. data/ext/abc/src/sat/bsat2/Map.h +0 -193
  1605. data/ext/abc/src/sat/bsat2/Options.cpp +0 -93
  1606. data/ext/abc/src/sat/bsat2/Options.h +0 -387
  1607. data/ext/abc/src/sat/bsat2/ParseUtils.h +0 -122
  1608. data/ext/abc/src/sat/bsat2/Queue.h +0 -69
  1609. data/ext/abc/src/sat/bsat2/README +0 -24
  1610. data/ext/abc/src/sat/bsat2/ReleaseNotes-2.2.0.txt +0 -79
  1611. data/ext/abc/src/sat/bsat2/SimpSolver.cpp +0 -720
  1612. data/ext/abc/src/sat/bsat2/SimpSolver.h +0 -197
  1613. data/ext/abc/src/sat/bsat2/Solver.cpp +0 -924
  1614. data/ext/abc/src/sat/bsat2/Solver.h +0 -373
  1615. data/ext/abc/src/sat/bsat2/SolverTypes.h +0 -407
  1616. data/ext/abc/src/sat/bsat2/Sort.h +0 -98
  1617. data/ext/abc/src/sat/bsat2/System.cpp +0 -95
  1618. data/ext/abc/src/sat/bsat2/System.h +0 -60
  1619. data/ext/abc/src/sat/bsat2/Vec.h +0 -130
  1620. data/ext/abc/src/sat/bsat2/XAlloc.h +0 -45
  1621. data/ext/abc/src/sat/bsat2/module.make +0 -7
  1622. data/ext/abc/src/sat/bsat2/pstdint.h +0 -813
  1623. data/ext/abc/src/sat/cnf/cnf.h +0 -202
  1624. data/ext/abc/src/sat/cnf/cnfCore.c +0 -290
  1625. data/ext/abc/src/sat/cnf/cnfCut.c +0 -376
  1626. data/ext/abc/src/sat/cnf/cnfData.c +0 -4789
  1627. data/ext/abc/src/sat/cnf/cnfFast.c +0 -697
  1628. data/ext/abc/src/sat/cnf/cnfMan.c +0 -726
  1629. data/ext/abc/src/sat/cnf/cnfMap.c +0 -362
  1630. data/ext/abc/src/sat/cnf/cnfPost.c +0 -238
  1631. data/ext/abc/src/sat/cnf/cnfUtil.c +0 -479
  1632. data/ext/abc/src/sat/cnf/cnfWrite.c +0 -806
  1633. data/ext/abc/src/sat/cnf/cnf_.c +0 -53
  1634. data/ext/abc/src/sat/cnf/module.make +0 -9
  1635. data/ext/abc/src/sat/csat/csat_apis.c +0 -778
  1636. data/ext/abc/src/sat/csat/csat_apis.h +0 -226
  1637. data/ext/abc/src/sat/csat/module.make +0 -1
  1638. data/ext/abc/src/sat/glucose/AbcGlucose.cpp +0 -1372
  1639. data/ext/abc/src/sat/glucose/AbcGlucose.h +0 -110
  1640. data/ext/abc/src/sat/glucose/AbcGlucoseCmd.cpp +0 -144
  1641. data/ext/abc/src/sat/glucose/Alg.h +0 -84
  1642. data/ext/abc/src/sat/glucose/Alloc.h +0 -132
  1643. data/ext/abc/src/sat/glucose/BoundedQueue.h +0 -110
  1644. data/ext/abc/src/sat/glucose/Constants.h +0 -33
  1645. data/ext/abc/src/sat/glucose/Dimacs.h +0 -89
  1646. data/ext/abc/src/sat/glucose/Glucose.cpp +0 -1493
  1647. data/ext/abc/src/sat/glucose/Heap.h +0 -150
  1648. data/ext/abc/src/sat/glucose/IntTypes.h +0 -47
  1649. data/ext/abc/src/sat/glucose/Map.h +0 -193
  1650. data/ext/abc/src/sat/glucose/Options.cpp +0 -92
  1651. data/ext/abc/src/sat/glucose/Options.h +0 -388
  1652. data/ext/abc/src/sat/glucose/ParseUtils.h +0 -151
  1653. data/ext/abc/src/sat/glucose/Queue.h +0 -69
  1654. data/ext/abc/src/sat/glucose/SimpSolver.cpp +0 -774
  1655. data/ext/abc/src/sat/glucose/SimpSolver.h +0 -204
  1656. data/ext/abc/src/sat/glucose/Solver.h +0 -491
  1657. data/ext/abc/src/sat/glucose/SolverTypes.h +0 -434
  1658. data/ext/abc/src/sat/glucose/Sort.h +0 -98
  1659. data/ext/abc/src/sat/glucose/System.cpp +0 -95
  1660. data/ext/abc/src/sat/glucose/System.h +0 -60
  1661. data/ext/abc/src/sat/glucose/Vec.h +0 -130
  1662. data/ext/abc/src/sat/glucose/XAlloc.h +0 -47
  1663. data/ext/abc/src/sat/glucose/module.make +0 -6
  1664. data/ext/abc/src/sat/glucose/pstdint.h +0 -919
  1665. data/ext/abc/src/sat/glucose/stdint.h +0 -1628
  1666. data/ext/abc/src/sat/lsat/solver.h +0 -132
  1667. data/ext/abc/src/sat/msat/module.make +0 -13
  1668. data/ext/abc/src/sat/msat/msat.h +0 -168
  1669. data/ext/abc/src/sat/msat/msatActivity.c +0 -165
  1670. data/ext/abc/src/sat/msat/msatClause.c +0 -537
  1671. data/ext/abc/src/sat/msat/msatClauseVec.c +0 -237
  1672. data/ext/abc/src/sat/msat/msatInt.h +0 -295
  1673. data/ext/abc/src/sat/msat/msatMem.c +0 -534
  1674. data/ext/abc/src/sat/msat/msatOrderH.c +0 -415
  1675. data/ext/abc/src/sat/msat/msatOrderJ.c +0 -477
  1676. data/ext/abc/src/sat/msat/msatQueue.c +0 -162
  1677. data/ext/abc/src/sat/msat/msatRead.c +0 -274
  1678. data/ext/abc/src/sat/msat/msatSolverApi.c +0 -505
  1679. data/ext/abc/src/sat/msat/msatSolverCore.c +0 -215
  1680. data/ext/abc/src/sat/msat/msatSolverIo.c +0 -182
  1681. data/ext/abc/src/sat/msat/msatSolverSearch.c +0 -634
  1682. data/ext/abc/src/sat/msat/msatSort.c +0 -178
  1683. data/ext/abc/src/sat/msat/msatVec.c +0 -500
  1684. data/ext/abc/src/sat/proof/pr.c +0 -1264
  1685. data/ext/abc/src/sat/proof/pr.h +0 -69
  1686. data/ext/abc/src/sat/proof/stats.txt +0 -66
  1687. data/ext/abc/src/sat/psat/m114p.h +0 -47
  1688. data/ext/abc/src/sat/psat/m114p_types.h +0 -13
  1689. data/ext/abc/src/sat/psat/module.make +0 -1
  1690. data/ext/abc/src/sat/satoko/LICENSE +0 -22
  1691. data/ext/abc/src/sat/satoko/act_clause.h +0 -43
  1692. data/ext/abc/src/sat/satoko/act_var.h +0 -53
  1693. data/ext/abc/src/sat/satoko/cdb.h +0 -106
  1694. data/ext/abc/src/sat/satoko/clause.h +0 -77
  1695. data/ext/abc/src/sat/satoko/cnf_reader.c +0 -157
  1696. data/ext/abc/src/sat/satoko/module.make +0 -3
  1697. data/ext/abc/src/sat/satoko/satoko.h +0 -147
  1698. data/ext/abc/src/sat/satoko/solver.c +0 -771
  1699. data/ext/abc/src/sat/satoko/solver.h +0 -260
  1700. data/ext/abc/src/sat/satoko/solver_api.c +0 -669
  1701. data/ext/abc/src/sat/satoko/types.h +0 -39
  1702. data/ext/abc/src/sat/satoko/utils/b_queue.h +0 -81
  1703. data/ext/abc/src/sat/satoko/utils/heap.h +0 -178
  1704. data/ext/abc/src/sat/satoko/utils/mem.h +0 -23
  1705. data/ext/abc/src/sat/satoko/utils/misc.h +0 -35
  1706. data/ext/abc/src/sat/satoko/utils/sdbl.h +0 -133
  1707. data/ext/abc/src/sat/satoko/utils/sort.h +0 -65
  1708. data/ext/abc/src/sat/satoko/utils/vec/vec_char.h +0 -260
  1709. data/ext/abc/src/sat/satoko/utils/vec/vec_flt.h +0 -246
  1710. data/ext/abc/src/sat/satoko/utils/vec/vec_int.h +0 -240
  1711. data/ext/abc/src/sat/satoko/utils/vec/vec_sdbl.h +0 -253
  1712. data/ext/abc/src/sat/satoko/utils/vec/vec_uint.h +0 -268
  1713. data/ext/abc/src/sat/satoko/watch_list.h +0 -203
  1714. data/ext/abc/src/sat/xsat/license +0 -39
  1715. data/ext/abc/src/sat/xsat/module.make +0 -3
  1716. data/ext/abc/src/sat/xsat/xsat.h +0 -59
  1717. data/ext/abc/src/sat/xsat/xsatBQueue.h +0 -190
  1718. data/ext/abc/src/sat/xsat/xsatClause.h +0 -109
  1719. data/ext/abc/src/sat/xsat/xsatCnfReader.c +0 -236
  1720. data/ext/abc/src/sat/xsat/xsatHeap.h +0 -330
  1721. data/ext/abc/src/sat/xsat/xsatMemory.h +0 -222
  1722. data/ext/abc/src/sat/xsat/xsatSolver.c +0 -1003
  1723. data/ext/abc/src/sat/xsat/xsatSolver.h +0 -248
  1724. data/ext/abc/src/sat/xsat/xsatSolverAPI.c +0 -346
  1725. data/ext/abc/src/sat/xsat/xsatUtils.h +0 -106
  1726. data/ext/abc/src/sat/xsat/xsatWatchList.h +0 -269
  1727. data/ext/abc/src/starter.c +0 -190
  1728. data/ext/abc/src/template.c +0 -111
  1729. data/ext/extconf.rb +0 -14
  1730. data/ext/ruby_abc_wrapper.h +0 -13
@@ -1,2540 +0,0 @@
1
- <html>
2
- <head>
3
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
4
- <title>bzip2 and libbzip2, version 1.0.5</title>
5
- <meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
6
- <style type="text/css" media="screen">/* Colours:
7
- #74240f dark brown h1, h2, h3, h4
8
- #336699 medium blue links
9
- #339999 turquoise link hover colour
10
- #202020 almost black general text
11
- #761596 purple md5sum text
12
- #626262 dark gray pre border
13
- #eeeeee very light gray pre background
14
- #f2f2f9 very light blue nav table background
15
- #3366cc medium blue nav table border
16
- */
17
-
18
- a, a:link, a:visited, a:active { color: #336699; }
19
- a:hover { color: #339999; }
20
-
21
- body { font: 80%/126% sans-serif; }
22
- h1, h2, h3, h4 { color: #74240f; }
23
-
24
- dt { color: #336699; font-weight: bold }
25
- dd {
26
- margin-left: 1.5em;
27
- padding-bottom: 0.8em;
28
- }
29
-
30
- /* -- ruler -- */
31
- div.hr_blue {
32
- height: 3px;
33
- background:#ffffff url("/images/hr_blue.png") repeat-x; }
34
- div.hr_blue hr { display:none; }
35
-
36
- /* release styles */
37
- #release p { margin-top: 0.4em; }
38
- #release .md5sum { color: #761596; }
39
-
40
-
41
- /* ------ styles for docs|manuals|howto ------ */
42
- /* -- lists -- */
43
- ul {
44
- margin: 0px 4px 16px 16px;
45
- padding: 0px;
46
- list-style: url("/images/li-blue.png");
47
- }
48
- ul li {
49
- margin-bottom: 10px;
50
- }
51
- ul ul {
52
- list-style-type: none;
53
- list-style-image: none;
54
- margin-left: 0px;
55
- }
56
-
57
- /* header / footer nav tables */
58
- table.nav {
59
- border: solid 1px #3366cc;
60
- background: #f2f2f9;
61
- background-color: #f2f2f9;
62
- margin-bottom: 0.5em;
63
- }
64
- /* don't have underlined links in chunked nav menus */
65
- table.nav a { text-decoration: none; }
66
- table.nav a:hover { text-decoration: underline; }
67
- table.nav td { font-size: 85%; }
68
-
69
- code, tt, pre { font-size: 120%; }
70
- code, tt { color: #761596; }
71
-
72
- div.literallayout, pre.programlisting, pre.screen {
73
- color: #000000;
74
- padding: 0.5em;
75
- background: #eeeeee;
76
- border: 1px solid #626262;
77
- background-color: #eeeeee;
78
- margin: 4px 0px 4px 0px;
79
- }
80
- </style>
81
- </head>
82
- <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="book" lang="en">
83
- <div class="titlepage">
84
- <div>
85
- <div><h1 class="title">
86
- <a name="userman"></a>bzip2 and libbzip2, version 1.0.5</h1></div>
87
- <div><h2 class="subtitle">A program and library for data compression</h2></div>
88
- <div><div class="authorgroup"><div class="author">
89
- <h3 class="author">
90
- <span class="firstname">Julian</span> <span class="surname">Seward</span>
91
- </h3>
92
- <div class="affiliation"><span class="orgname">http://www.bzip.org<br></span></div>
93
- </div></div></div>
94
- <div><p class="releaseinfo">Version 1.0.5 of 10 December 2007</p></div>
95
- <div><p class="copyright">Copyright � 1996-2007 Julian Seward</p></div>
96
- <div><div class="legalnotice">
97
- <a name="id2499833"></a><p>This program, <code class="computeroutput">bzip2</code>, the
98
- associated library <code class="computeroutput">libbzip2</code>, and
99
- all documentation, are copyright � 1996-2007 Julian Seward.
100
- All rights reserved.</p>
101
- <p>Redistribution and use in source and binary forms, with
102
- or without modification, are permitted provided that the
103
- following conditions are met:</p>
104
- <div class="itemizedlist"><ul type="bullet">
105
- <li style="list-style-type: disc"><p>Redistributions of source code must retain the
106
- above copyright notice, this list of conditions and the
107
- following disclaimer.</p></li>
108
- <li style="list-style-type: disc"><p>The origin of this software must not be
109
- misrepresented; you must not claim that you wrote the original
110
- software. If you use this software in a product, an
111
- acknowledgment in the product documentation would be
112
- appreciated but is not required.</p></li>
113
- <li style="list-style-type: disc"><p>Altered source versions must be plainly marked
114
- as such, and must not be misrepresented as being the original
115
- software.</p></li>
116
- <li style="list-style-type: disc"><p>The name of the author may not be used to
117
- endorse or promote products derived from this software without
118
- specific prior written permission.</p></li>
119
- </ul></div>
120
- <p>THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY
121
- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
122
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
123
- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
124
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
125
- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
126
- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
127
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
128
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
129
- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
130
- IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
131
- THE POSSIBILITY OF SUCH DAMAGE.</p>
132
- <p>PATENTS: To the best of my knowledge,
133
- <code class="computeroutput">bzip2</code> and
134
- <code class="computeroutput">libbzip2</code> do not use any patented
135
- algorithms. However, I do not have the resources to carry
136
- out a patent search. Therefore I cannot give any guarantee of
137
- the above statement.
138
- </p>
139
- </div></div>
140
- </div>
141
- <hr>
142
- </div>
143
- <div class="toc">
144
- <p><b>Table of Contents</b></p>
145
- <dl>
146
- <dt><span class="chapter"><a href="#intro">1. Introduction</a></span></dt>
147
- <dt><span class="chapter"><a href="#using">2. How to use bzip2</a></span></dt>
148
- <dd><dl>
149
- <dt><span class="sect1"><a href="#name">2.1. NAME</a></span></dt>
150
- <dt><span class="sect1"><a href="#synopsis">2.2. SYNOPSIS</a></span></dt>
151
- <dt><span class="sect1"><a href="#description">2.3. DESCRIPTION</a></span></dt>
152
- <dt><span class="sect1"><a href="#options">2.4. OPTIONS</a></span></dt>
153
- <dt><span class="sect1"><a href="#memory-management">2.5. MEMORY MANAGEMENT</a></span></dt>
154
- <dt><span class="sect1"><a href="#recovering">2.6. RECOVERING DATA FROM DAMAGED FILES</a></span></dt>
155
- <dt><span class="sect1"><a href="#performance">2.7. PERFORMANCE NOTES</a></span></dt>
156
- <dt><span class="sect1"><a href="#caveats">2.8. CAVEATS</a></span></dt>
157
- <dt><span class="sect1"><a href="#author">2.9. AUTHOR</a></span></dt>
158
- </dl></dd>
159
- <dt><span class="chapter"><a href="#libprog">3.
160
- Programming with <code class="computeroutput">libbzip2</code>
161
- </a></span></dt>
162
- <dd><dl>
163
- <dt><span class="sect1"><a href="#top-level">3.1. Top-level structure</a></span></dt>
164
- <dd><dl>
165
- <dt><span class="sect2"><a href="#ll-summary">3.1.1. Low-level summary</a></span></dt>
166
- <dt><span class="sect2"><a href="#hl-summary">3.1.2. High-level summary</a></span></dt>
167
- <dt><span class="sect2"><a href="#util-fns-summary">3.1.3. Utility functions summary</a></span></dt>
168
- </dl></dd>
169
- <dt><span class="sect1"><a href="#err-handling">3.2. Error handling</a></span></dt>
170
- <dt><span class="sect1"><a href="#low-level">3.3. Low-level interface</a></span></dt>
171
- <dd><dl>
172
- <dt><span class="sect2"><a href="#bzcompress-init">3.3.1. <code class="computeroutput">BZ2_bzCompressInit</code></a></span></dt>
173
- <dt><span class="sect2"><a href="#bzCompress">3.3.2. <code class="computeroutput">BZ2_bzCompress</code></a></span></dt>
174
- <dt><span class="sect2"><a href="#bzCompress-end">3.3.3. <code class="computeroutput">BZ2_bzCompressEnd</code></a></span></dt>
175
- <dt><span class="sect2"><a href="#bzDecompress-init">3.3.4. <code class="computeroutput">BZ2_bzDecompressInit</code></a></span></dt>
176
- <dt><span class="sect2"><a href="#bzDecompress">3.3.5. <code class="computeroutput">BZ2_bzDecompress</code></a></span></dt>
177
- <dt><span class="sect2"><a href="#bzDecompress-end">3.3.6. <code class="computeroutput">BZ2_bzDecompressEnd</code></a></span></dt>
178
- </dl></dd>
179
- <dt><span class="sect1"><a href="#hl-interface">3.4. High-level interface</a></span></dt>
180
- <dd><dl>
181
- <dt><span class="sect2"><a href="#bzreadopen">3.4.1. <code class="computeroutput">BZ2_bzReadOpen</code></a></span></dt>
182
- <dt><span class="sect2"><a href="#bzread">3.4.2. <code class="computeroutput">BZ2_bzRead</code></a></span></dt>
183
- <dt><span class="sect2"><a href="#bzreadgetunused">3.4.3. <code class="computeroutput">BZ2_bzReadGetUnused</code></a></span></dt>
184
- <dt><span class="sect2"><a href="#bzreadclose">3.4.4. <code class="computeroutput">BZ2_bzReadClose</code></a></span></dt>
185
- <dt><span class="sect2"><a href="#bzwriteopen">3.4.5. <code class="computeroutput">BZ2_bzWriteOpen</code></a></span></dt>
186
- <dt><span class="sect2"><a href="#bzwrite">3.4.6. <code class="computeroutput">BZ2_bzWrite</code></a></span></dt>
187
- <dt><span class="sect2"><a href="#bzwriteclose">3.4.7. <code class="computeroutput">BZ2_bzWriteClose</code></a></span></dt>
188
- <dt><span class="sect2"><a href="#embed">3.4.8. Handling embedded compressed data streams</a></span></dt>
189
- <dt><span class="sect2"><a href="#std-rdwr">3.4.9. Standard file-reading/writing code</a></span></dt>
190
- </dl></dd>
191
- <dt><span class="sect1"><a href="#util-fns">3.5. Utility functions</a></span></dt>
192
- <dd><dl>
193
- <dt><span class="sect2"><a href="#bzbufftobuffcompress">3.5.1. <code class="computeroutput">BZ2_bzBuffToBuffCompress</code></a></span></dt>
194
- <dt><span class="sect2"><a href="#bzbufftobuffdecompress">3.5.2. <code class="computeroutput">BZ2_bzBuffToBuffDecompress</code></a></span></dt>
195
- </dl></dd>
196
- <dt><span class="sect1"><a href="#zlib-compat">3.6. <code class="computeroutput">zlib</code> compatibility functions</a></span></dt>
197
- <dt><span class="sect1"><a href="#stdio-free">3.7. Using the library in a <code class="computeroutput">stdio</code>-free environment</a></span></dt>
198
- <dd><dl>
199
- <dt><span class="sect2"><a href="#stdio-bye">3.7.1. Getting rid of <code class="computeroutput">stdio</code></a></span></dt>
200
- <dt><span class="sect2"><a href="#critical-error">3.7.2. Critical error handling</a></span></dt>
201
- </dl></dd>
202
- <dt><span class="sect1"><a href="#win-dll">3.8. Making a Windows DLL</a></span></dt>
203
- </dl></dd>
204
- <dt><span class="chapter"><a href="#misc">4. Miscellanea</a></span></dt>
205
- <dd><dl>
206
- <dt><span class="sect1"><a href="#limits">4.1. Limitations of the compressed file format</a></span></dt>
207
- <dt><span class="sect1"><a href="#port-issues">4.2. Portability issues</a></span></dt>
208
- <dt><span class="sect1"><a href="#bugs">4.3. Reporting bugs</a></span></dt>
209
- <dt><span class="sect1"><a href="#package">4.4. Did you get the right package?</a></span></dt>
210
- <dt><span class="sect1"><a href="#reading">4.5. Further Reading</a></span></dt>
211
- </dl></dd>
212
- </dl>
213
- </div>
214
- <div class="chapter" lang="en">
215
- <div class="titlepage"><div><div><h2 class="title">
216
- <a name="intro"></a>1.�Introduction</h2></div></div></div>
217
- <p><code class="computeroutput">bzip2</code> compresses files
218
- using the Burrows-Wheeler block-sorting text compression
219
- algorithm, and Huffman coding. Compression is generally
220
- considerably better than that achieved by more conventional
221
- LZ77/LZ78-based compressors, and approaches the performance of
222
- the PPM family of statistical compressors.</p>
223
- <p><code class="computeroutput">bzip2</code> is built on top of
224
- <code class="computeroutput">libbzip2</code>, a flexible library for
225
- handling compressed data in the
226
- <code class="computeroutput">bzip2</code> format. This manual
227
- describes both how to use the program and how to work with the
228
- library interface. Most of the manual is devoted to this
229
- library, not the program, which is good news if your interest is
230
- only in the program.</p>
231
- <div class="itemizedlist"><ul type="bullet">
232
- <li style="list-style-type: disc"><p><a href="#using">How to use bzip2</a> describes how to use
233
- <code class="computeroutput">bzip2</code>; this is the only part
234
- you need to read if you just want to know how to operate the
235
- program.</p></li>
236
- <li style="list-style-type: disc"><p><a href="#libprog">Programming with libbzip2</a> describes the
237
- programming interfaces in detail, and</p></li>
238
- <li style="list-style-type: disc"><p><a href="#misc">Miscellanea</a> records some
239
- miscellaneous notes which I thought ought to be recorded
240
- somewhere.</p></li>
241
- </ul></div>
242
- </div>
243
- <div class="chapter" lang="en">
244
- <div class="titlepage"><div><div><h2 class="title">
245
- <a name="using"></a>2.�How to use bzip2</h2></div></div></div>
246
- <div class="toc">
247
- <p><b>Table of Contents</b></p>
248
- <dl>
249
- <dt><span class="sect1"><a href="#name">2.1. NAME</a></span></dt>
250
- <dt><span class="sect1"><a href="#synopsis">2.2. SYNOPSIS</a></span></dt>
251
- <dt><span class="sect1"><a href="#description">2.3. DESCRIPTION</a></span></dt>
252
- <dt><span class="sect1"><a href="#options">2.4. OPTIONS</a></span></dt>
253
- <dt><span class="sect1"><a href="#memory-management">2.5. MEMORY MANAGEMENT</a></span></dt>
254
- <dt><span class="sect1"><a href="#recovering">2.6. RECOVERING DATA FROM DAMAGED FILES</a></span></dt>
255
- <dt><span class="sect1"><a href="#performance">2.7. PERFORMANCE NOTES</a></span></dt>
256
- <dt><span class="sect1"><a href="#caveats">2.8. CAVEATS</a></span></dt>
257
- <dt><span class="sect1"><a href="#author">2.9. AUTHOR</a></span></dt>
258
- </dl>
259
- </div>
260
- <p>This chapter contains a copy of the
261
- <code class="computeroutput">bzip2</code> man page, and nothing
262
- else.</p>
263
- <div class="sect1" lang="en">
264
- <div class="titlepage"><div><div><h2 class="title" style="clear: both">
265
- <a name="name"></a>2.1.�NAME</h2></div></div></div>
266
- <div class="itemizedlist"><ul type="bullet">
267
- <li style="list-style-type: disc"><p><code class="computeroutput">bzip2</code>,
268
- <code class="computeroutput">bunzip2</code> - a block-sorting file
269
- compressor, v1.0.4</p></li>
270
- <li style="list-style-type: disc"><p><code class="computeroutput">bzcat</code> -
271
- decompresses files to stdout</p></li>
272
- <li style="list-style-type: disc"><p><code class="computeroutput">bzip2recover</code> -
273
- recovers data from damaged bzip2 files</p></li>
274
- </ul></div>
275
- </div>
276
- <div class="sect1" lang="en">
277
- <div class="titlepage"><div><div><h2 class="title" style="clear: both">
278
- <a name="synopsis"></a>2.2.�SYNOPSIS</h2></div></div></div>
279
- <div class="itemizedlist"><ul type="bullet">
280
- <li style="list-style-type: disc"><p><code class="computeroutput">bzip2</code> [
281
- -cdfkqstvzVL123456789 ] [ filenames ... ]</p></li>
282
- <li style="list-style-type: disc"><p><code class="computeroutput">bunzip2</code> [
283
- -fkvsVL ] [ filenames ... ]</p></li>
284
- <li style="list-style-type: disc"><p><code class="computeroutput">bzcat</code> [ -s ] [
285
- filenames ... ]</p></li>
286
- <li style="list-style-type: disc"><p><code class="computeroutput">bzip2recover</code>
287
- filename</p></li>
288
- </ul></div>
289
- </div>
290
- <div class="sect1" lang="en">
291
- <div class="titlepage"><div><div><h2 class="title" style="clear: both">
292
- <a name="description"></a>2.3.�DESCRIPTION</h2></div></div></div>
293
- <p><code class="computeroutput">bzip2</code> compresses files
294
- using the Burrows-Wheeler block sorting text compression
295
- algorithm, and Huffman coding. Compression is generally
296
- considerably better than that achieved by more conventional
297
- LZ77/LZ78-based compressors, and approaches the performance of
298
- the PPM family of statistical compressors.</p>
299
- <p>The command-line options are deliberately very similar to
300
- those of GNU <code class="computeroutput">gzip</code>, but they are
301
- not identical.</p>
302
- <p><code class="computeroutput">bzip2</code> expects a list of
303
- file names to accompany the command-line flags. Each file is
304
- replaced by a compressed version of itself, with the name
305
- <code class="computeroutput">original_name.bz2</code>. Each
306
- compressed file has the same modification date, permissions, and,
307
- when possible, ownership as the corresponding original, so that
308
- these properties can be correctly restored at decompression time.
309
- File name handling is naive in the sense that there is no
310
- mechanism for preserving original file names, permissions,
311
- ownerships or dates in filesystems which lack these concepts, or
312
- have serious file name length restrictions, such as
313
- MS-DOS.</p>
314
- <p><code class="computeroutput">bzip2</code> and
315
- <code class="computeroutput">bunzip2</code> will by default not
316
- overwrite existing files. If you want this to happen, specify
317
- the <code class="computeroutput">-f</code> flag.</p>
318
- <p>If no file names are specified,
319
- <code class="computeroutput">bzip2</code> compresses from standard
320
- input to standard output. In this case,
321
- <code class="computeroutput">bzip2</code> will decline to write
322
- compressed output to a terminal, as this would be entirely
323
- incomprehensible and therefore pointless.</p>
324
- <p><code class="computeroutput">bunzip2</code> (or
325
- <code class="computeroutput">bzip2 -d</code>) decompresses all
326
- specified files. Files which were not created by
327
- <code class="computeroutput">bzip2</code> will be detected and
328
- ignored, and a warning issued.
329
- <code class="computeroutput">bzip2</code> attempts to guess the
330
- filename for the decompressed file from that of the compressed
331
- file as follows:</p>
332
- <div class="itemizedlist"><ul type="bullet">
333
- <li style="list-style-type: disc"><p><code class="computeroutput">filename.bz2 </code>
334
- becomes
335
- <code class="computeroutput">filename</code></p></li>
336
- <li style="list-style-type: disc"><p><code class="computeroutput">filename.bz </code>
337
- becomes
338
- <code class="computeroutput">filename</code></p></li>
339
- <li style="list-style-type: disc"><p><code class="computeroutput">filename.tbz2</code>
340
- becomes
341
- <code class="computeroutput">filename.tar</code></p></li>
342
- <li style="list-style-type: disc"><p><code class="computeroutput">filename.tbz </code>
343
- becomes
344
- <code class="computeroutput">filename.tar</code></p></li>
345
- <li style="list-style-type: disc"><p><code class="computeroutput">anyothername </code>
346
- becomes
347
- <code class="computeroutput">anyothername.out</code></p></li>
348
- </ul></div>
349
- <p>If the file does not end in one of the recognised endings,
350
- <code class="computeroutput">.bz2</code>,
351
- <code class="computeroutput">.bz</code>,
352
- <code class="computeroutput">.tbz2</code> or
353
- <code class="computeroutput">.tbz</code>,
354
- <code class="computeroutput">bzip2</code> complains that it cannot
355
- guess the name of the original file, and uses the original name
356
- with <code class="computeroutput">.out</code> appended.</p>
357
- <p>As with compression, supplying no filenames causes
358
- decompression from standard input to standard output.</p>
359
- <p><code class="computeroutput">bunzip2</code> will correctly
360
- decompress a file which is the concatenation of two or more
361
- compressed files. The result is the concatenation of the
362
- corresponding uncompressed files. Integrity testing
363
- (<code class="computeroutput">-t</code>) of concatenated compressed
364
- files is also supported.</p>
365
- <p>You can also compress or decompress files to the standard
366
- output by giving the <code class="computeroutput">-c</code> flag.
367
- Multiple files may be compressed and decompressed like this. The
368
- resulting outputs are fed sequentially to stdout. Compression of
369
- multiple files in this manner generates a stream containing
370
- multiple compressed file representations. Such a stream can be
371
- decompressed correctly only by
372
- <code class="computeroutput">bzip2</code> version 0.9.0 or later.
373
- Earlier versions of <code class="computeroutput">bzip2</code> will
374
- stop after decompressing the first file in the stream.</p>
375
- <p><code class="computeroutput">bzcat</code> (or
376
- <code class="computeroutput">bzip2 -dc</code>) decompresses all
377
- specified files to the standard output.</p>
378
- <p><code class="computeroutput">bzip2</code> will read arguments
379
- from the environment variables
380
- <code class="computeroutput">BZIP2</code> and
381
- <code class="computeroutput">BZIP</code>, in that order, and will
382
- process them before any arguments read from the command line.
383
- This gives a convenient way to supply default arguments.</p>
384
- <p>Compression is always performed, even if the compressed
385
- file is slightly larger than the original. Files of less than
386
- about one hundred bytes tend to get larger, since the compression
387
- mechanism has a constant overhead in the region of 50 bytes.
388
- Random data (including the output of most file compressors) is
389
- coded at about 8.05 bits per byte, giving an expansion of around
390
- 0.5%.</p>
391
- <p>As a self-check for your protection,
392
- <code class="computeroutput">bzip2</code> uses 32-bit CRCs to make
393
- sure that the decompressed version of a file is identical to the
394
- original. This guards against corruption of the compressed data,
395
- and against undetected bugs in
396
- <code class="computeroutput">bzip2</code> (hopefully very unlikely).
397
- The chances of data corruption going undetected is microscopic,
398
- about one chance in four billion for each file processed. Be
399
- aware, though, that the check occurs upon decompression, so it
400
- can only tell you that something is wrong. It can't help you
401
- recover the original uncompressed data. You can use
402
- <code class="computeroutput">bzip2recover</code> to try to recover
403
- data from damaged files.</p>
404
- <p>Return values: 0 for a normal exit, 1 for environmental
405
- problems (file not found, invalid flags, I/O errors, etc.), 2
406
- to indicate a corrupt compressed file, 3 for an internal
407
- consistency error (eg, bug) which caused
408
- <code class="computeroutput">bzip2</code> to panic.</p>
409
- </div>
410
- <div class="sect1" lang="en">
411
- <div class="titlepage"><div><div><h2 class="title" style="clear: both">
412
- <a name="options"></a>2.4.�OPTIONS</h2></div></div></div>
413
- <div class="variablelist"><dl>
414
- <dt><span class="term"><code class="computeroutput">-c --stdout</code></span></dt>
415
- <dd><p>Compress or decompress to standard
416
- output.</p></dd>
417
- <dt><span class="term"><code class="computeroutput">-d --decompress</code></span></dt>
418
- <dd><p>Force decompression.
419
- <code class="computeroutput">bzip2</code>,
420
- <code class="computeroutput">bunzip2</code> and
421
- <code class="computeroutput">bzcat</code> are really the same
422
- program, and the decision about what actions to take is done on
423
- the basis of which name is used. This flag overrides that
424
- mechanism, and forces bzip2 to decompress.</p></dd>
425
- <dt><span class="term"><code class="computeroutput">-z --compress</code></span></dt>
426
- <dd><p>The complement to
427
- <code class="computeroutput">-d</code>: forces compression,
428
- regardless of the invokation name.</p></dd>
429
- <dt><span class="term"><code class="computeroutput">-t --test</code></span></dt>
430
- <dd><p>Check integrity of the specified file(s), but
431
- don't decompress them. This really performs a trial
432
- decompression and throws away the result.</p></dd>
433
- <dt><span class="term"><code class="computeroutput">-f --force</code></span></dt>
434
- <dd>
435
- <p>Force overwrite of output files. Normally,
436
- <code class="computeroutput">bzip2</code> will not overwrite
437
- existing output files. Also forces
438
- <code class="computeroutput">bzip2</code> to break hard links to
439
- files, which it otherwise wouldn't do.</p>
440
- <p><code class="computeroutput">bzip2</code> normally declines
441
- to decompress files which don't have the correct magic header
442
- bytes. If forced (<code class="computeroutput">-f</code>),
443
- however, it will pass such files through unmodified. This is
444
- how GNU <code class="computeroutput">gzip</code> behaves.</p>
445
- </dd>
446
- <dt><span class="term"><code class="computeroutput">-k --keep</code></span></dt>
447
- <dd><p>Keep (don't delete) input files during
448
- compression or decompression.</p></dd>
449
- <dt><span class="term"><code class="computeroutput">-s --small</code></span></dt>
450
- <dd>
451
- <p>Reduce memory usage, for compression,
452
- decompression and testing. Files are decompressed and tested
453
- using a modified algorithm which only requires 2.5 bytes per
454
- block byte. This means any file can be decompressed in 2300k
455
- of memory, albeit at about half the normal speed.</p>
456
- <p>During compression, <code class="computeroutput">-s</code>
457
- selects a block size of 200k, which limits memory use to around
458
- the same figure, at the expense of your compression ratio. In
459
- short, if your machine is low on memory (8 megabytes or less),
460
- use <code class="computeroutput">-s</code> for everything. See
461
- <a href="#memory-management">MEMORY MANAGEMENT</a> below.</p>
462
- </dd>
463
- <dt><span class="term"><code class="computeroutput">-q --quiet</code></span></dt>
464
- <dd><p>Suppress non-essential warning messages.
465
- Messages pertaining to I/O errors and other critical events
466
- will not be suppressed.</p></dd>
467
- <dt><span class="term"><code class="computeroutput">-v --verbose</code></span></dt>
468
- <dd><p>Verbose mode -- show the compression ratio for
469
- each file processed. Further
470
- <code class="computeroutput">-v</code>'s increase the verbosity
471
- level, spewing out lots of information which is primarily of
472
- interest for diagnostic purposes.</p></dd>
473
- <dt><span class="term"><code class="computeroutput">-L --license -V --version</code></span></dt>
474
- <dd><p>Display the software version, license terms and
475
- conditions.</p></dd>
476
- <dt><span class="term"><code class="computeroutput">-1</code> (or
477
- <code class="computeroutput">--fast</code>) to
478
- <code class="computeroutput">-9</code> (or
479
- <code class="computeroutput">-best</code>)</span></dt>
480
- <dd><p>Set the block size to 100 k, 200 k ... 900 k
481
- when compressing. Has no effect when decompressing. See <a href="#memory-management">MEMORY MANAGEMENT</a> below. The
482
- <code class="computeroutput">--fast</code> and
483
- <code class="computeroutput">--best</code> aliases are primarily
484
- for GNU <code class="computeroutput">gzip</code> compatibility.
485
- In particular, <code class="computeroutput">--fast</code> doesn't
486
- make things significantly faster. And
487
- <code class="computeroutput">--best</code> merely selects the
488
- default behaviour.</p></dd>
489
- <dt><span class="term"><code class="computeroutput">--</code></span></dt>
490
- <dd><p>Treats all subsequent arguments as file names,
491
- even if they start with a dash. This is so you can handle
492
- files with names beginning with a dash, for example:
493
- <code class="computeroutput">bzip2 --
494
- -myfilename</code>.</p></dd>
495
- <dt>
496
- <span class="term"><code class="computeroutput">--repetitive-fast</code>, </span><span class="term"><code class="computeroutput">--repetitive-best</code></span>
497
- </dt>
498
- <dd><p>These flags are redundant in versions 0.9.5 and
499
- above. They provided some coarse control over the behaviour of
500
- the sorting algorithm in earlier versions, which was sometimes
501
- useful. 0.9.5 and above have an improved algorithm which
502
- renders these flags irrelevant.</p></dd>
503
- </dl></div>
504
- </div>
505
- <div class="sect1" lang="en">
506
- <div class="titlepage"><div><div><h2 class="title" style="clear: both">
507
- <a name="memory-management"></a>2.5.�MEMORY MANAGEMENT</h2></div></div></div>
508
- <p><code class="computeroutput">bzip2</code> compresses large
509
- files in blocks. The block size affects both the compression
510
- ratio achieved, and the amount of memory needed for compression
511
- and decompression. The flags <code class="computeroutput">-1</code>
512
- through <code class="computeroutput">-9</code> specify the block
513
- size to be 100,000 bytes through 900,000 bytes (the default)
514
- respectively. At decompression time, the block size used for
515
- compression is read from the header of the compressed file, and
516
- <code class="computeroutput">bunzip2</code> then allocates itself
517
- just enough memory to decompress the file. Since block sizes are
518
- stored in compressed files, it follows that the flags
519
- <code class="computeroutput">-1</code> to
520
- <code class="computeroutput">-9</code> are irrelevant to and so
521
- ignored during decompression.</p>
522
- <p>Compression and decompression requirements, in bytes, can be
523
- estimated as:</p>
524
- <pre class="programlisting">Compression: 400k + ( 8 x block size )
525
-
526
- Decompression: 100k + ( 4 x block size ), or
527
- 100k + ( 2.5 x block size )</pre>
528
- <p>Larger block sizes give rapidly diminishing marginal
529
- returns. Most of the compression comes from the first two or
530
- three hundred k of block size, a fact worth bearing in mind when
531
- using <code class="computeroutput">bzip2</code> on small machines.
532
- It is also important to appreciate that the decompression memory
533
- requirement is set at compression time by the choice of block
534
- size.</p>
535
- <p>For files compressed with the default 900k block size,
536
- <code class="computeroutput">bunzip2</code> will require about 3700
537
- kbytes to decompress. To support decompression of any file on a
538
- 4 megabyte machine, <code class="computeroutput">bunzip2</code> has
539
- an option to decompress using approximately half this amount of
540
- memory, about 2300 kbytes. Decompression speed is also halved,
541
- so you should use this option only where necessary. The relevant
542
- flag is <code class="computeroutput">-s</code>.</p>
543
- <p>In general, try and use the largest block size memory
544
- constraints allow, since that maximises the compression achieved.
545
- Compression and decompression speed are virtually unaffected by
546
- block size.</p>
547
- <p>Another significant point applies to files which fit in a
548
- single block -- that means most files you'd encounter using a
549
- large block size. The amount of real memory touched is
550
- proportional to the size of the file, since the file is smaller
551
- than a block. For example, compressing a file 20,000 bytes long
552
- with the flag <code class="computeroutput">-9</code> will cause the
553
- compressor to allocate around 7600k of memory, but only touch
554
- 400k + 20000 * 8 = 560 kbytes of it. Similarly, the decompressor
555
- will allocate 3700k but only touch 100k + 20000 * 4 = 180
556
- kbytes.</p>
557
- <p>Here is a table which summarises the maximum memory usage
558
- for different block sizes. Also recorded is the total compressed
559
- size for 14 files of the Calgary Text Compression Corpus
560
- totalling 3,141,622 bytes. This column gives some feel for how
561
- compression varies with block size. These figures tend to
562
- understate the advantage of larger block sizes for larger files,
563
- since the Corpus is dominated by smaller files.</p>
564
- <pre class="programlisting"> Compress Decompress Decompress Corpus
565
- Flag usage usage -s usage Size
566
-
567
- -1 1200k 500k 350k 914704
568
- -2 2000k 900k 600k 877703
569
- -3 2800k 1300k 850k 860338
570
- -4 3600k 1700k 1100k 846899
571
- -5 4400k 2100k 1350k 845160
572
- -6 5200k 2500k 1600k 838626
573
- -7 6100k 2900k 1850k 834096
574
- -8 6800k 3300k 2100k 828642
575
- -9 7600k 3700k 2350k 828642</pre>
576
- </div>
577
- <div class="sect1" lang="en">
578
- <div class="titlepage"><div><div><h2 class="title" style="clear: both">
579
- <a name="recovering"></a>2.6.�RECOVERING DATA FROM DAMAGED FILES</h2></div></div></div>
580
- <p><code class="computeroutput">bzip2</code> compresses files in
581
- blocks, usually 900kbytes long. Each block is handled
582
- independently. If a media or transmission error causes a
583
- multi-block <code class="computeroutput">.bz2</code> file to become
584
- damaged, it may be possible to recover data from the undamaged
585
- blocks in the file.</p>
586
- <p>The compressed representation of each block is delimited by
587
- a 48-bit pattern, which makes it possible to find the block
588
- boundaries with reasonable certainty. Each block also carries
589
- its own 32-bit CRC, so damaged blocks can be distinguished from
590
- undamaged ones.</p>
591
- <p><code class="computeroutput">bzip2recover</code> is a simple
592
- program whose purpose is to search for blocks in
593
- <code class="computeroutput">.bz2</code> files, and write each block
594
- out into its own <code class="computeroutput">.bz2</code> file. You
595
- can then use <code class="computeroutput">bzip2 -t</code> to test
596
- the integrity of the resulting files, and decompress those which
597
- are undamaged.</p>
598
- <p><code class="computeroutput">bzip2recover</code> takes a
599
- single argument, the name of the damaged file, and writes a
600
- number of files <code class="computeroutput">rec0001file.bz2</code>,
601
- <code class="computeroutput">rec0002file.bz2</code>, etc, containing
602
- the extracted blocks. The output filenames are designed so that
603
- the use of wildcards in subsequent processing -- for example,
604
- <code class="computeroutput">bzip2 -dc rec*file.bz2 &gt;
605
- recovered_data</code> -- lists the files in the correct
606
- order.</p>
607
- <p><code class="computeroutput">bzip2recover</code> should be of
608
- most use dealing with large <code class="computeroutput">.bz2</code>
609
- files, as these will contain many blocks. It is clearly futile
610
- to use it on damaged single-block files, since a damaged block
611
- cannot be recovered. If you wish to minimise any potential data
612
- loss through media or transmission errors, you might consider
613
- compressing with a smaller block size.</p>
614
- </div>
615
- <div class="sect1" lang="en">
616
- <div class="titlepage"><div><div><h2 class="title" style="clear: both">
617
- <a name="performance"></a>2.7.�PERFORMANCE NOTES</h2></div></div></div>
618
- <p>The sorting phase of compression gathers together similar
619
- strings in the file. Because of this, files containing very long
620
- runs of repeated symbols, like "aabaabaabaab ..." (repeated
621
- several hundred times) may compress more slowly than normal.
622
- Versions 0.9.5 and above fare much better than previous versions
623
- in this respect. The ratio between worst-case and average-case
624
- compression time is in the region of 10:1. For previous
625
- versions, this figure was more like 100:1. You can use the
626
- <code class="computeroutput">-vvvv</code> option to monitor progress
627
- in great detail, if you want.</p>
628
- <p>Decompression speed is unaffected by these
629
- phenomena.</p>
630
- <p><code class="computeroutput">bzip2</code> usually allocates
631
- several megabytes of memory to operate in, and then charges all
632
- over it in a fairly random fashion. This means that performance,
633
- both for compressing and decompressing, is largely determined by
634
- the speed at which your machine can service cache misses.
635
- Because of this, small changes to the code to reduce the miss
636
- rate have been observed to give disproportionately large
637
- performance improvements. I imagine
638
- <code class="computeroutput">bzip2</code> will perform best on
639
- machines with very large caches.</p>
640
- </div>
641
- <div class="sect1" lang="en">
642
- <div class="titlepage"><div><div><h2 class="title" style="clear: both">
643
- <a name="caveats"></a>2.8.�CAVEATS</h2></div></div></div>
644
- <p>I/O error messages are not as helpful as they could be.
645
- <code class="computeroutput">bzip2</code> tries hard to detect I/O
646
- errors and exit cleanly, but the details of what the problem is
647
- sometimes seem rather misleading.</p>
648
- <p>This manual page pertains to version 1.0.5 of
649
- <code class="computeroutput">bzip2</code>. Compressed data created by
650
- this version is entirely forwards and backwards compatible with the
651
- previous public releases, versions 0.1pl2, 0.9.0 and 0.9.5, 1.0.0,
652
- 1.0.1, 1.0.2 and 1.0.3, but with the following exception: 0.9.0 and
653
- above can correctly decompress multiple concatenated compressed files.
654
- 0.1pl2 cannot do this; it will stop after decompressing just the first
655
- file in the stream.</p>
656
- <p><code class="computeroutput">bzip2recover</code> versions
657
- prior to 1.0.2 used 32-bit integers to represent bit positions in
658
- compressed files, so it could not handle compressed files more
659
- than 512 megabytes long. Versions 1.0.2 and above use 64-bit ints
660
- on some platforms which support them (GNU supported targets, and
661
- Windows). To establish whether or not
662
- <code class="computeroutput">bzip2recover</code> was built with such
663
- a limitation, run it without arguments. In any event you can
664
- build yourself an unlimited version if you can recompile it with
665
- <code class="computeroutput">MaybeUInt64</code> set to be an
666
- unsigned 64-bit integer.</p>
667
- </div>
668
- <div class="sect1" lang="en">
669
- <div class="titlepage"><div><div><h2 class="title" style="clear: both">
670
- <a name="author"></a>2.9.�AUTHOR</h2></div></div></div>
671
- <p>Julian Seward,
672
- <code class="computeroutput">jseward@bzip.org</code></p>
673
- <p>The ideas embodied in
674
- <code class="computeroutput">bzip2</code> are due to (at least) the
675
- following people: Michael Burrows and David Wheeler (for the
676
- block sorting transformation), David Wheeler (again, for the
677
- Huffman coder), Peter Fenwick (for the structured coding model in
678
- the original <code class="computeroutput">bzip</code>, and many
679
- refinements), and Alistair Moffat, Radford Neal and Ian Witten
680
- (for the arithmetic coder in the original
681
- <code class="computeroutput">bzip</code>). I am much indebted for
682
- their help, support and advice. See the manual in the source
683
- distribution for pointers to sources of documentation. Christian
684
- von Roques encouraged me to look for faster sorting algorithms,
685
- so as to speed up compression. Bela Lubkin encouraged me to
686
- improve the worst-case compression performance.
687
- Donna Robinson XMLised the documentation.
688
- Many people sent
689
- patches, helped with portability problems, lent machines, gave
690
- advice and were generally helpful.</p>
691
- </div>
692
- </div>
693
- <div class="chapter" lang="en">
694
- <div class="titlepage"><div><div><h2 class="title">
695
- <a name="libprog"></a>3.�
696
- Programming with <code class="computeroutput">libbzip2</code>
697
- </h2></div></div></div>
698
- <div class="toc">
699
- <p><b>Table of Contents</b></p>
700
- <dl>
701
- <dt><span class="sect1"><a href="#top-level">3.1. Top-level structure</a></span></dt>
702
- <dd><dl>
703
- <dt><span class="sect2"><a href="#ll-summary">3.1.1. Low-level summary</a></span></dt>
704
- <dt><span class="sect2"><a href="#hl-summary">3.1.2. High-level summary</a></span></dt>
705
- <dt><span class="sect2"><a href="#util-fns-summary">3.1.3. Utility functions summary</a></span></dt>
706
- </dl></dd>
707
- <dt><span class="sect1"><a href="#err-handling">3.2. Error handling</a></span></dt>
708
- <dt><span class="sect1"><a href="#low-level">3.3. Low-level interface</a></span></dt>
709
- <dd><dl>
710
- <dt><span class="sect2"><a href="#bzcompress-init">3.3.1. <code class="computeroutput">BZ2_bzCompressInit</code></a></span></dt>
711
- <dt><span class="sect2"><a href="#bzCompress">3.3.2. <code class="computeroutput">BZ2_bzCompress</code></a></span></dt>
712
- <dt><span class="sect2"><a href="#bzCompress-end">3.3.3. <code class="computeroutput">BZ2_bzCompressEnd</code></a></span></dt>
713
- <dt><span class="sect2"><a href="#bzDecompress-init">3.3.4. <code class="computeroutput">BZ2_bzDecompressInit</code></a></span></dt>
714
- <dt><span class="sect2"><a href="#bzDecompress">3.3.5. <code class="computeroutput">BZ2_bzDecompress</code></a></span></dt>
715
- <dt><span class="sect2"><a href="#bzDecompress-end">3.3.6. <code class="computeroutput">BZ2_bzDecompressEnd</code></a></span></dt>
716
- </dl></dd>
717
- <dt><span class="sect1"><a href="#hl-interface">3.4. High-level interface</a></span></dt>
718
- <dd><dl>
719
- <dt><span class="sect2"><a href="#bzreadopen">3.4.1. <code class="computeroutput">BZ2_bzReadOpen</code></a></span></dt>
720
- <dt><span class="sect2"><a href="#bzread">3.4.2. <code class="computeroutput">BZ2_bzRead</code></a></span></dt>
721
- <dt><span class="sect2"><a href="#bzreadgetunused">3.4.3. <code class="computeroutput">BZ2_bzReadGetUnused</code></a></span></dt>
722
- <dt><span class="sect2"><a href="#bzreadclose">3.4.4. <code class="computeroutput">BZ2_bzReadClose</code></a></span></dt>
723
- <dt><span class="sect2"><a href="#bzwriteopen">3.4.5. <code class="computeroutput">BZ2_bzWriteOpen</code></a></span></dt>
724
- <dt><span class="sect2"><a href="#bzwrite">3.4.6. <code class="computeroutput">BZ2_bzWrite</code></a></span></dt>
725
- <dt><span class="sect2"><a href="#bzwriteclose">3.4.7. <code class="computeroutput">BZ2_bzWriteClose</code></a></span></dt>
726
- <dt><span class="sect2"><a href="#embed">3.4.8. Handling embedded compressed data streams</a></span></dt>
727
- <dt><span class="sect2"><a href="#std-rdwr">3.4.9. Standard file-reading/writing code</a></span></dt>
728
- </dl></dd>
729
- <dt><span class="sect1"><a href="#util-fns">3.5. Utility functions</a></span></dt>
730
- <dd><dl>
731
- <dt><span class="sect2"><a href="#bzbufftobuffcompress">3.5.1. <code class="computeroutput">BZ2_bzBuffToBuffCompress</code></a></span></dt>
732
- <dt><span class="sect2"><a href="#bzbufftobuffdecompress">3.5.2. <code class="computeroutput">BZ2_bzBuffToBuffDecompress</code></a></span></dt>
733
- </dl></dd>
734
- <dt><span class="sect1"><a href="#zlib-compat">3.6. <code class="computeroutput">zlib</code> compatibility functions</a></span></dt>
735
- <dt><span class="sect1"><a href="#stdio-free">3.7. Using the library in a <code class="computeroutput">stdio</code>-free environment</a></span></dt>
736
- <dd><dl>
737
- <dt><span class="sect2"><a href="#stdio-bye">3.7.1. Getting rid of <code class="computeroutput">stdio</code></a></span></dt>
738
- <dt><span class="sect2"><a href="#critical-error">3.7.2. Critical error handling</a></span></dt>
739
- </dl></dd>
740
- <dt><span class="sect1"><a href="#win-dll">3.8. Making a Windows DLL</a></span></dt>
741
- </dl>
742
- </div>
743
- <p>This chapter describes the programming interface to
744
- <code class="computeroutput">libbzip2</code>.</p>
745
- <p>For general background information, particularly about
746
- memory use and performance aspects, you'd be well advised to read
747
- <a href="#using">How to use bzip2</a> as well.</p>
748
- <div class="sect1" lang="en">
749
- <div class="titlepage"><div><div><h2 class="title" style="clear: both">
750
- <a name="top-level"></a>3.1.�Top-level structure</h2></div></div></div>
751
- <p><code class="computeroutput">libbzip2</code> is a flexible
752
- library for compressing and decompressing data in the
753
- <code class="computeroutput">bzip2</code> data format. Although
754
- packaged as a single entity, it helps to regard the library as
755
- three separate parts: the low level interface, and the high level
756
- interface, and some utility functions.</p>
757
- <p>The structure of
758
- <code class="computeroutput">libbzip2</code>'s interfaces is similar
759
- to that of Jean-loup Gailly's and Mark Adler's excellent
760
- <code class="computeroutput">zlib</code> library.</p>
761
- <p>All externally visible symbols have names beginning
762
- <code class="computeroutput">BZ2_</code>. This is new in version
763
- 1.0. The intention is to minimise pollution of the namespaces of
764
- library clients.</p>
765
- <p>To use any part of the library, you need to
766
- <code class="computeroutput">#include &lt;bzlib.h&gt;</code>
767
- into your sources.</p>
768
- <div class="sect2" lang="en">
769
- <div class="titlepage"><div><div><h3 class="title">
770
- <a name="ll-summary"></a>3.1.1.�Low-level summary</h3></div></div></div>
771
- <p>This interface provides services for compressing and
772
- decompressing data in memory. There's no provision for dealing
773
- with files, streams or any other I/O mechanisms, just straight
774
- memory-to-memory work. In fact, this part of the library can be
775
- compiled without inclusion of
776
- <code class="computeroutput">stdio.h</code>, which may be helpful
777
- for embedded applications.</p>
778
- <p>The low-level part of the library has no global variables
779
- and is therefore thread-safe.</p>
780
- <p>Six routines make up the low level interface:
781
- <code class="computeroutput">BZ2_bzCompressInit</code>,
782
- <code class="computeroutput">BZ2_bzCompress</code>, and
783
- <code class="computeroutput">BZ2_bzCompressEnd</code> for
784
- compression, and a corresponding trio
785
- <code class="computeroutput">BZ2_bzDecompressInit</code>,
786
- <code class="computeroutput">BZ2_bzDecompress</code> and
787
- <code class="computeroutput">BZ2_bzDecompressEnd</code> for
788
- decompression. The <code class="computeroutput">*Init</code>
789
- functions allocate memory for compression/decompression and do
790
- other initialisations, whilst the
791
- <code class="computeroutput">*End</code> functions close down
792
- operations and release memory.</p>
793
- <p>The real work is done by
794
- <code class="computeroutput">BZ2_bzCompress</code> and
795
- <code class="computeroutput">BZ2_bzDecompress</code>. These
796
- compress and decompress data from a user-supplied input buffer to
797
- a user-supplied output buffer. These buffers can be any size;
798
- arbitrary quantities of data are handled by making repeated calls
799
- to these functions. This is a flexible mechanism allowing a
800
- consumer-pull style of activity, or producer-push, or a mixture
801
- of both.</p>
802
- </div>
803
- <div class="sect2" lang="en">
804
- <div class="titlepage"><div><div><h3 class="title">
805
- <a name="hl-summary"></a>3.1.2.�High-level summary</h3></div></div></div>
806
- <p>This interface provides some handy wrappers around the
807
- low-level interface to facilitate reading and writing
808
- <code class="computeroutput">bzip2</code> format files
809
- (<code class="computeroutput">.bz2</code> files). The routines
810
- provide hooks to facilitate reading files in which the
811
- <code class="computeroutput">bzip2</code> data stream is embedded
812
- within some larger-scale file structure, or where there are
813
- multiple <code class="computeroutput">bzip2</code> data streams
814
- concatenated end-to-end.</p>
815
- <p>For reading files,
816
- <code class="computeroutput">BZ2_bzReadOpen</code>,
817
- <code class="computeroutput">BZ2_bzRead</code>,
818
- <code class="computeroutput">BZ2_bzReadClose</code> and
819
- <code class="computeroutput">BZ2_bzReadGetUnused</code> are
820
- supplied. For writing files,
821
- <code class="computeroutput">BZ2_bzWriteOpen</code>,
822
- <code class="computeroutput">BZ2_bzWrite</code> and
823
- <code class="computeroutput">BZ2_bzWriteFinish</code> are
824
- available.</p>
825
- <p>As with the low-level library, no global variables are used
826
- so the library is per se thread-safe. However, if I/O errors
827
- occur whilst reading or writing the underlying compressed files,
828
- you may have to consult <code class="computeroutput">errno</code> to
829
- determine the cause of the error. In that case, you'd need a C
830
- library which correctly supports
831
- <code class="computeroutput">errno</code> in a multithreaded
832
- environment.</p>
833
- <p>To make the library a little simpler and more portable,
834
- <code class="computeroutput">BZ2_bzReadOpen</code> and
835
- <code class="computeroutput">BZ2_bzWriteOpen</code> require you to
836
- pass them file handles (<code class="computeroutput">FILE*</code>s)
837
- which have previously been opened for reading or writing
838
- respectively. That avoids portability problems associated with
839
- file operations and file attributes, whilst not being much of an
840
- imposition on the programmer.</p>
841
- </div>
842
- <div class="sect2" lang="en">
843
- <div class="titlepage"><div><div><h3 class="title">
844
- <a name="util-fns-summary"></a>3.1.3.�Utility functions summary</h3></div></div></div>
845
- <p>For very simple needs,
846
- <code class="computeroutput">BZ2_bzBuffToBuffCompress</code> and
847
- <code class="computeroutput">BZ2_bzBuffToBuffDecompress</code> are
848
- provided. These compress data in memory from one buffer to
849
- another buffer in a single function call. You should assess
850
- whether these functions fulfill your memory-to-memory
851
- compression/decompression requirements before investing effort in
852
- understanding the more general but more complex low-level
853
- interface.</p>
854
- <p>Yoshioka Tsuneo
855
- (<code class="computeroutput">tsuneo@rr.iij4u.or.jp</code>) has
856
- contributed some functions to give better
857
- <code class="computeroutput">zlib</code> compatibility. These
858
- functions are <code class="computeroutput">BZ2_bzopen</code>,
859
- <code class="computeroutput">BZ2_bzread</code>,
860
- <code class="computeroutput">BZ2_bzwrite</code>,
861
- <code class="computeroutput">BZ2_bzflush</code>,
862
- <code class="computeroutput">BZ2_bzclose</code>,
863
- <code class="computeroutput">BZ2_bzerror</code> and
864
- <code class="computeroutput">BZ2_bzlibVersion</code>. You may find
865
- these functions more convenient for simple file reading and
866
- writing, than those in the high-level interface. These functions
867
- are not (yet) officially part of the library, and are minimally
868
- documented here. If they break, you get to keep all the pieces.
869
- I hope to document them properly when time permits.</p>
870
- <p>Yoshioka also contributed modifications to allow the
871
- library to be built as a Windows DLL.</p>
872
- </div>
873
- </div>
874
- <div class="sect1" lang="en">
875
- <div class="titlepage"><div><div><h2 class="title" style="clear: both">
876
- <a name="err-handling"></a>3.2.�Error handling</h2></div></div></div>
877
- <p>The library is designed to recover cleanly in all
878
- situations, including the worst-case situation of decompressing
879
- random data. I'm not 100% sure that it can always do this, so
880
- you might want to add a signal handler to catch segmentation
881
- violations during decompression if you are feeling especially
882
- paranoid. I would be interested in hearing more about the
883
- robustness of the library to corrupted compressed data.</p>
884
- <p>Version 1.0.3 more robust in this respect than any
885
- previous version. Investigations with Valgrind (a tool for detecting
886
- problems with memory management) indicate
887
- that, at least for the few files I tested, all single-bit errors
888
- in the decompressed data are caught properly, with no
889
- segmentation faults, no uses of uninitialised data, no out of
890
- range reads or writes, and no infinite looping in the decompressor.
891
- So it's certainly pretty robust, although
892
- I wouldn't claim it to be totally bombproof.</p>
893
- <p>The file <code class="computeroutput">bzlib.h</code> contains
894
- all definitions needed to use the library. In particular, you
895
- should definitely not include
896
- <code class="computeroutput">bzlib_private.h</code>.</p>
897
- <p>In <code class="computeroutput">bzlib.h</code>, the various
898
- return values are defined. The following list is not intended as
899
- an exhaustive description of the circumstances in which a given
900
- value may be returned -- those descriptions are given later.
901
- Rather, it is intended to convey the rough meaning of each return
902
- value. The first five actions are normal and not intended to
903
- denote an error situation.</p>
904
- <div class="variablelist"><dl>
905
- <dt><span class="term"><code class="computeroutput">BZ_OK</code></span></dt>
906
- <dd><p>The requested action was completed
907
- successfully.</p></dd>
908
- <dt><span class="term"><code class="computeroutput">BZ_RUN_OK, BZ_FLUSH_OK,
909
- BZ_FINISH_OK</code></span></dt>
910
- <dd><p>In
911
- <code class="computeroutput">BZ2_bzCompress</code>, the requested
912
- flush/finish/nothing-special action was completed
913
- successfully.</p></dd>
914
- <dt><span class="term"><code class="computeroutput">BZ_STREAM_END</code></span></dt>
915
- <dd><p>Compression of data was completed, or the
916
- logical stream end was detected during
917
- decompression.</p></dd>
918
- </dl></div>
919
- <p>The following return values indicate an error of some
920
- kind.</p>
921
- <div class="variablelist"><dl>
922
- <dt><span class="term"><code class="computeroutput">BZ_CONFIG_ERROR</code></span></dt>
923
- <dd><p>Indicates that the library has been improperly
924
- compiled on your platform -- a major configuration error.
925
- Specifically, it means that
926
- <code class="computeroutput">sizeof(char)</code>,
927
- <code class="computeroutput">sizeof(short)</code> and
928
- <code class="computeroutput">sizeof(int)</code> are not 1, 2 and
929
- 4 respectively, as they should be. Note that the library
930
- should still work properly on 64-bit platforms which follow
931
- the LP64 programming model -- that is, where
932
- <code class="computeroutput">sizeof(long)</code> and
933
- <code class="computeroutput">sizeof(void*)</code> are 8. Under
934
- LP64, <code class="computeroutput">sizeof(int)</code> is still 4,
935
- so <code class="computeroutput">libbzip2</code>, which doesn't
936
- use the <code class="computeroutput">long</code> type, is
937
- OK.</p></dd>
938
- <dt><span class="term"><code class="computeroutput">BZ_SEQUENCE_ERROR</code></span></dt>
939
- <dd><p>When using the library, it is important to call
940
- the functions in the correct sequence and with data structures
941
- (buffers etc) in the correct states.
942
- <code class="computeroutput">libbzip2</code> checks as much as it
943
- can to ensure this is happening, and returns
944
- <code class="computeroutput">BZ_SEQUENCE_ERROR</code> if not.
945
- Code which complies precisely with the function semantics, as
946
- detailed below, should never receive this value; such an event
947
- denotes buggy code which you should
948
- investigate.</p></dd>
949
- <dt><span class="term"><code class="computeroutput">BZ_PARAM_ERROR</code></span></dt>
950
- <dd><p>Returned when a parameter to a function call is
951
- out of range or otherwise manifestly incorrect. As with
952
- <code class="computeroutput">BZ_SEQUENCE_ERROR</code>, this
953
- denotes a bug in the client code. The distinction between
954
- <code class="computeroutput">BZ_PARAM_ERROR</code> and
955
- <code class="computeroutput">BZ_SEQUENCE_ERROR</code> is a bit
956
- hazy, but still worth making.</p></dd>
957
- <dt><span class="term"><code class="computeroutput">BZ_MEM_ERROR</code></span></dt>
958
- <dd><p>Returned when a request to allocate memory
959
- failed. Note that the quantity of memory needed to decompress
960
- a stream cannot be determined until the stream's header has
961
- been read. So
962
- <code class="computeroutput">BZ2_bzDecompress</code> and
963
- <code class="computeroutput">BZ2_bzRead</code> may return
964
- <code class="computeroutput">BZ_MEM_ERROR</code> even though some
965
- of the compressed data has been read. The same is not true
966
- for compression; once
967
- <code class="computeroutput">BZ2_bzCompressInit</code> or
968
- <code class="computeroutput">BZ2_bzWriteOpen</code> have
969
- successfully completed,
970
- <code class="computeroutput">BZ_MEM_ERROR</code> cannot
971
- occur.</p></dd>
972
- <dt><span class="term"><code class="computeroutput">BZ_DATA_ERROR</code></span></dt>
973
- <dd><p>Returned when a data integrity error is
974
- detected during decompression. Most importantly, this means
975
- when stored and computed CRCs for the data do not match. This
976
- value is also returned upon detection of any other anomaly in
977
- the compressed data.</p></dd>
978
- <dt><span class="term"><code class="computeroutput">BZ_DATA_ERROR_MAGIC</code></span></dt>
979
- <dd><p>As a special case of
980
- <code class="computeroutput">BZ_DATA_ERROR</code>, it is
981
- sometimes useful to know when the compressed stream does not
982
- start with the correct magic bytes (<code class="computeroutput">'B' 'Z'
983
- 'h'</code>).</p></dd>
984
- <dt><span class="term"><code class="computeroutput">BZ_IO_ERROR</code></span></dt>
985
- <dd><p>Returned by
986
- <code class="computeroutput">BZ2_bzRead</code> and
987
- <code class="computeroutput">BZ2_bzWrite</code> when there is an
988
- error reading or writing in the compressed file, and by
989
- <code class="computeroutput">BZ2_bzReadOpen</code> and
990
- <code class="computeroutput">BZ2_bzWriteOpen</code> for attempts
991
- to use a file for which the error indicator (viz,
992
- <code class="computeroutput">ferror(f)</code>) is set. On
993
- receipt of <code class="computeroutput">BZ_IO_ERROR</code>, the
994
- caller should consult <code class="computeroutput">errno</code>
995
- and/or <code class="computeroutput">perror</code> to acquire
996
- operating-system specific information about the
997
- problem.</p></dd>
998
- <dt><span class="term"><code class="computeroutput">BZ_UNEXPECTED_EOF</code></span></dt>
999
- <dd><p>Returned by
1000
- <code class="computeroutput">BZ2_bzRead</code> when the
1001
- compressed file finishes before the logical end of stream is
1002
- detected.</p></dd>
1003
- <dt><span class="term"><code class="computeroutput">BZ_OUTBUFF_FULL</code></span></dt>
1004
- <dd><p>Returned by
1005
- <code class="computeroutput">BZ2_bzBuffToBuffCompress</code> and
1006
- <code class="computeroutput">BZ2_bzBuffToBuffDecompress</code> to
1007
- indicate that the output data will not fit into the output
1008
- buffer provided.</p></dd>
1009
- </dl></div>
1010
- </div>
1011
- <div class="sect1" lang="en">
1012
- <div class="titlepage"><div><div><h2 class="title" style="clear: both">
1013
- <a name="low-level"></a>3.3.�Low-level interface</h2></div></div></div>
1014
- <div class="sect2" lang="en">
1015
- <div class="titlepage"><div><div><h3 class="title">
1016
- <a name="bzcompress-init"></a>3.3.1.�<code class="computeroutput">BZ2_bzCompressInit</code></h3></div></div></div>
1017
- <pre class="programlisting">typedef struct {
1018
- char *next_in;
1019
- unsigned int avail_in;
1020
- unsigned int total_in_lo32;
1021
- unsigned int total_in_hi32;
1022
-
1023
- char *next_out;
1024
- unsigned int avail_out;
1025
- unsigned int total_out_lo32;
1026
- unsigned int total_out_hi32;
1027
-
1028
- void *state;
1029
-
1030
- void *(*bzalloc)(void *,int,int);
1031
- void (*bzfree)(void *,void *);
1032
- void *opaque;
1033
- } bz_stream;
1034
-
1035
- int BZ2_bzCompressInit ( bz_stream *strm,
1036
- int blockSize100k,
1037
- int verbosity,
1038
- int workFactor );</pre>
1039
- <p>Prepares for compression. The
1040
- <code class="computeroutput">bz_stream</code> structure holds all
1041
- data pertaining to the compression activity. A
1042
- <code class="computeroutput">bz_stream</code> structure should be
1043
- allocated and initialised prior to the call. The fields of
1044
- <code class="computeroutput">bz_stream</code> comprise the entirety
1045
- of the user-visible data. <code class="computeroutput">state</code>
1046
- is a pointer to the private data structures required for
1047
- compression.</p>
1048
- <p>Custom memory allocators are supported, via fields
1049
- <code class="computeroutput">bzalloc</code>,
1050
- <code class="computeroutput">bzfree</code>, and
1051
- <code class="computeroutput">opaque</code>. The value
1052
- <code class="computeroutput">opaque</code> is passed to as the first
1053
- argument to all calls to <code class="computeroutput">bzalloc</code>
1054
- and <code class="computeroutput">bzfree</code>, but is otherwise
1055
- ignored by the library. The call <code class="computeroutput">bzalloc (
1056
- opaque, n, m )</code> is expected to return a pointer
1057
- <code class="computeroutput">p</code> to <code class="computeroutput">n *
1058
- m</code> bytes of memory, and <code class="computeroutput">bzfree (
1059
- opaque, p )</code> should free that memory.</p>
1060
- <p>If you don't want to use a custom memory allocator, set
1061
- <code class="computeroutput">bzalloc</code>,
1062
- <code class="computeroutput">bzfree</code> and
1063
- <code class="computeroutput">opaque</code> to
1064
- <code class="computeroutput">NULL</code>, and the library will then
1065
- use the standard <code class="computeroutput">malloc</code> /
1066
- <code class="computeroutput">free</code> routines.</p>
1067
- <p>Before calling
1068
- <code class="computeroutput">BZ2_bzCompressInit</code>, fields
1069
- <code class="computeroutput">bzalloc</code>,
1070
- <code class="computeroutput">bzfree</code> and
1071
- <code class="computeroutput">opaque</code> should be filled
1072
- appropriately, as just described. Upon return, the internal
1073
- state will have been allocated and initialised, and
1074
- <code class="computeroutput">total_in_lo32</code>,
1075
- <code class="computeroutput">total_in_hi32</code>,
1076
- <code class="computeroutput">total_out_lo32</code> and
1077
- <code class="computeroutput">total_out_hi32</code> will have been
1078
- set to zero. These four fields are used by the library to inform
1079
- the caller of the total amount of data passed into and out of the
1080
- library, respectively. You should not try to change them. As of
1081
- version 1.0, 64-bit counts are maintained, even on 32-bit
1082
- platforms, using the <code class="computeroutput">_hi32</code>
1083
- fields to store the upper 32 bits of the count. So, for example,
1084
- the total amount of data in is <code class="computeroutput">(total_in_hi32
1085
- &lt;&lt; 32) + total_in_lo32</code>.</p>
1086
- <p>Parameter <code class="computeroutput">blockSize100k</code>
1087
- specifies the block size to be used for compression. It should
1088
- be a value between 1 and 9 inclusive, and the actual block size
1089
- used is 100000 x this figure. 9 gives the best compression but
1090
- takes most memory.</p>
1091
- <p>Parameter <code class="computeroutput">verbosity</code> should
1092
- be set to a number between 0 and 4 inclusive. 0 is silent, and
1093
- greater numbers give increasingly verbose monitoring/debugging
1094
- output. If the library has been compiled with
1095
- <code class="computeroutput">-DBZ_NO_STDIO</code>, no such output
1096
- will appear for any verbosity setting.</p>
1097
- <p>Parameter <code class="computeroutput">workFactor</code>
1098
- controls how the compression phase behaves when presented with
1099
- worst case, highly repetitive, input data. If compression runs
1100
- into difficulties caused by repetitive data, the library switches
1101
- from the standard sorting algorithm to a fallback algorithm. The
1102
- fallback is slower than the standard algorithm by perhaps a
1103
- factor of three, but always behaves reasonably, no matter how bad
1104
- the input.</p>
1105
- <p>Lower values of <code class="computeroutput">workFactor</code>
1106
- reduce the amount of effort the standard algorithm will expend
1107
- before resorting to the fallback. You should set this parameter
1108
- carefully; too low, and many inputs will be handled by the
1109
- fallback algorithm and so compress rather slowly, too high, and
1110
- your average-to-worst case compression times can become very
1111
- large. The default value of 30 gives reasonable behaviour over a
1112
- wide range of circumstances.</p>
1113
- <p>Allowable values range from 0 to 250 inclusive. 0 is a
1114
- special case, equivalent to using the default value of 30.</p>
1115
- <p>Note that the compressed output generated is the same
1116
- regardless of whether or not the fallback algorithm is
1117
- used.</p>
1118
- <p>Be aware also that this parameter may disappear entirely in
1119
- future versions of the library. In principle it should be
1120
- possible to devise a good way to automatically choose which
1121
- algorithm to use. Such a mechanism would render the parameter
1122
- obsolete.</p>
1123
- <p>Possible return values:</p>
1124
- <pre class="programlisting">BZ_CONFIG_ERROR
1125
- if the library has been mis-compiled
1126
- BZ_PARAM_ERROR
1127
- if strm is NULL
1128
- or blockSize &lt; 1 or blockSize &gt; 9
1129
- or verbosity &lt; 0 or verbosity &gt; 4
1130
- or workFactor &lt; 0 or workFactor &gt; 250
1131
- BZ_MEM_ERROR
1132
- if not enough memory is available
1133
- BZ_OK
1134
- otherwise</pre>
1135
- <p>Allowable next actions:</p>
1136
- <pre class="programlisting">BZ2_bzCompress
1137
- if BZ_OK is returned
1138
- no specific action needed in case of error</pre>
1139
- </div>
1140
- <div class="sect2" lang="en">
1141
- <div class="titlepage"><div><div><h3 class="title">
1142
- <a name="bzCompress"></a>3.3.2.�<code class="computeroutput">BZ2_bzCompress</code></h3></div></div></div>
1143
- <pre class="programlisting">int BZ2_bzCompress ( bz_stream *strm, int action );</pre>
1144
- <p>Provides more input and/or output buffer space for the
1145
- library. The caller maintains input and output buffers, and
1146
- calls <code class="computeroutput">BZ2_bzCompress</code> to transfer
1147
- data between them.</p>
1148
- <p>Before each call to
1149
- <code class="computeroutput">BZ2_bzCompress</code>,
1150
- <code class="computeroutput">next_in</code> should point at the data
1151
- to be compressed, and <code class="computeroutput">avail_in</code>
1152
- should indicate how many bytes the library may read.
1153
- <code class="computeroutput">BZ2_bzCompress</code> updates
1154
- <code class="computeroutput">next_in</code>,
1155
- <code class="computeroutput">avail_in</code> and
1156
- <code class="computeroutput">total_in</code> to reflect the number
1157
- of bytes it has read.</p>
1158
- <p>Similarly, <code class="computeroutput">next_out</code> should
1159
- point to a buffer in which the compressed data is to be placed,
1160
- with <code class="computeroutput">avail_out</code> indicating how
1161
- much output space is available.
1162
- <code class="computeroutput">BZ2_bzCompress</code> updates
1163
- <code class="computeroutput">next_out</code>,
1164
- <code class="computeroutput">avail_out</code> and
1165
- <code class="computeroutput">total_out</code> to reflect the number
1166
- of bytes output.</p>
1167
- <p>You may provide and remove as little or as much data as you
1168
- like on each call of
1169
- <code class="computeroutput">BZ2_bzCompress</code>. In the limit,
1170
- it is acceptable to supply and remove data one byte at a time,
1171
- although this would be terribly inefficient. You should always
1172
- ensure that at least one byte of output space is available at
1173
- each call.</p>
1174
- <p>A second purpose of
1175
- <code class="computeroutput">BZ2_bzCompress</code> is to request a
1176
- change of mode of the compressed stream.</p>
1177
- <p>Conceptually, a compressed stream can be in one of four
1178
- states: IDLE, RUNNING, FLUSHING and FINISHING. Before
1179
- initialisation
1180
- (<code class="computeroutput">BZ2_bzCompressInit</code>) and after
1181
- termination (<code class="computeroutput">BZ2_bzCompressEnd</code>),
1182
- a stream is regarded as IDLE.</p>
1183
- <p>Upon initialisation
1184
- (<code class="computeroutput">BZ2_bzCompressInit</code>), the stream
1185
- is placed in the RUNNING state. Subsequent calls to
1186
- <code class="computeroutput">BZ2_bzCompress</code> should pass
1187
- <code class="computeroutput">BZ_RUN</code> as the requested action;
1188
- other actions are illegal and will result in
1189
- <code class="computeroutput">BZ_SEQUENCE_ERROR</code>.</p>
1190
- <p>At some point, the calling program will have provided all
1191
- the input data it wants to. It will then want to finish up -- in
1192
- effect, asking the library to process any data it might have
1193
- buffered internally. In this state,
1194
- <code class="computeroutput">BZ2_bzCompress</code> will no longer
1195
- attempt to read data from
1196
- <code class="computeroutput">next_in</code>, but it will want to
1197
- write data to <code class="computeroutput">next_out</code>. Because
1198
- the output buffer supplied by the user can be arbitrarily small,
1199
- the finishing-up operation cannot necessarily be done with a
1200
- single call of
1201
- <code class="computeroutput">BZ2_bzCompress</code>.</p>
1202
- <p>Instead, the calling program passes
1203
- <code class="computeroutput">BZ_FINISH</code> as an action to
1204
- <code class="computeroutput">BZ2_bzCompress</code>. This changes
1205
- the stream's state to FINISHING. Any remaining input (ie,
1206
- <code class="computeroutput">next_in[0 .. avail_in-1]</code>) is
1207
- compressed and transferred to the output buffer. To do this,
1208
- <code class="computeroutput">BZ2_bzCompress</code> must be called
1209
- repeatedly until all the output has been consumed. At that
1210
- point, <code class="computeroutput">BZ2_bzCompress</code> returns
1211
- <code class="computeroutput">BZ_STREAM_END</code>, and the stream's
1212
- state is set back to IDLE.
1213
- <code class="computeroutput">BZ2_bzCompressEnd</code> should then be
1214
- called.</p>
1215
- <p>Just to make sure the calling program does not cheat, the
1216
- library makes a note of <code class="computeroutput">avail_in</code>
1217
- at the time of the first call to
1218
- <code class="computeroutput">BZ2_bzCompress</code> which has
1219
- <code class="computeroutput">BZ_FINISH</code> as an action (ie, at
1220
- the time the program has announced its intention to not supply
1221
- any more input). By comparing this value with that of
1222
- <code class="computeroutput">avail_in</code> over subsequent calls
1223
- to <code class="computeroutput">BZ2_bzCompress</code>, the library
1224
- can detect any attempts to slip in more data to compress. Any
1225
- calls for which this is detected will return
1226
- <code class="computeroutput">BZ_SEQUENCE_ERROR</code>. This
1227
- indicates a programming mistake which should be corrected.</p>
1228
- <p>Instead of asking to finish, the calling program may ask
1229
- <code class="computeroutput">BZ2_bzCompress</code> to take all the
1230
- remaining input, compress it and terminate the current
1231
- (Burrows-Wheeler) compression block. This could be useful for
1232
- error control purposes. The mechanism is analogous to that for
1233
- finishing: call <code class="computeroutput">BZ2_bzCompress</code>
1234
- with an action of <code class="computeroutput">BZ_FLUSH</code>,
1235
- remove output data, and persist with the
1236
- <code class="computeroutput">BZ_FLUSH</code> action until the value
1237
- <code class="computeroutput">BZ_RUN</code> is returned. As with
1238
- finishing, <code class="computeroutput">BZ2_bzCompress</code>
1239
- detects any attempt to provide more input data once the flush has
1240
- begun.</p>
1241
- <p>Once the flush is complete, the stream returns to the
1242
- normal RUNNING state.</p>
1243
- <p>This all sounds pretty complex, but isn't really. Here's a
1244
- table which shows which actions are allowable in each state, what
1245
- action will be taken, what the next state is, and what the
1246
- non-error return values are. Note that you can't explicitly ask
1247
- what state the stream is in, but nor do you need to -- it can be
1248
- inferred from the values returned by
1249
- <code class="computeroutput">BZ2_bzCompress</code>.</p>
1250
- <pre class="programlisting">IDLE/any
1251
- Illegal. IDLE state only exists after BZ2_bzCompressEnd or
1252
- before BZ2_bzCompressInit.
1253
- Return value = BZ_SEQUENCE_ERROR
1254
-
1255
- RUNNING/BZ_RUN
1256
- Compress from next_in to next_out as much as possible.
1257
- Next state = RUNNING
1258
- Return value = BZ_RUN_OK
1259
-
1260
- RUNNING/BZ_FLUSH
1261
- Remember current value of next_in. Compress from next_in
1262
- to next_out as much as possible, but do not accept any more input.
1263
- Next state = FLUSHING
1264
- Return value = BZ_FLUSH_OK
1265
-
1266
- RUNNING/BZ_FINISH
1267
- Remember current value of next_in. Compress from next_in
1268
- to next_out as much as possible, but do not accept any more input.
1269
- Next state = FINISHING
1270
- Return value = BZ_FINISH_OK
1271
-
1272
- FLUSHING/BZ_FLUSH
1273
- Compress from next_in to next_out as much as possible,
1274
- but do not accept any more input.
1275
- If all the existing input has been used up and all compressed
1276
- output has been removed
1277
- Next state = RUNNING; Return value = BZ_RUN_OK
1278
- else
1279
- Next state = FLUSHING; Return value = BZ_FLUSH_OK
1280
-
1281
- FLUSHING/other
1282
- Illegal.
1283
- Return value = BZ_SEQUENCE_ERROR
1284
-
1285
- FINISHING/BZ_FINISH
1286
- Compress from next_in to next_out as much as possible,
1287
- but to not accept any more input.
1288
- If all the existing input has been used up and all compressed
1289
- output has been removed
1290
- Next state = IDLE; Return value = BZ_STREAM_END
1291
- else
1292
- Next state = FINISHING; Return value = BZ_FINISH_OK
1293
-
1294
- FINISHING/other
1295
- Illegal.
1296
- Return value = BZ_SEQUENCE_ERROR</pre>
1297
- <p>That still looks complicated? Well, fair enough. The
1298
- usual sequence of calls for compressing a load of data is:</p>
1299
- <div class="orderedlist"><ol type="1">
1300
- <li><p>Get started with
1301
- <code class="computeroutput">BZ2_bzCompressInit</code>.</p></li>
1302
- <li><p>Shovel data in and shlurp out its compressed form
1303
- using zero or more calls of
1304
- <code class="computeroutput">BZ2_bzCompress</code> with action =
1305
- <code class="computeroutput">BZ_RUN</code>.</p></li>
1306
- <li><p>Finish up. Repeatedly call
1307
- <code class="computeroutput">BZ2_bzCompress</code> with action =
1308
- <code class="computeroutput">BZ_FINISH</code>, copying out the
1309
- compressed output, until
1310
- <code class="computeroutput">BZ_STREAM_END</code> is
1311
- returned.</p></li>
1312
- <li><p>Close up and go home. Call
1313
- <code class="computeroutput">BZ2_bzCompressEnd</code>.</p></li>
1314
- </ol></div>
1315
- <p>If the data you want to compress fits into your input
1316
- buffer all at once, you can skip the calls of
1317
- <code class="computeroutput">BZ2_bzCompress ( ..., BZ_RUN )</code>
1318
- and just do the <code class="computeroutput">BZ2_bzCompress ( ..., BZ_FINISH
1319
- )</code> calls.</p>
1320
- <p>All required memory is allocated by
1321
- <code class="computeroutput">BZ2_bzCompressInit</code>. The
1322
- compression library can accept any data at all (obviously). So
1323
- you shouldn't get any error return values from the
1324
- <code class="computeroutput">BZ2_bzCompress</code> calls. If you
1325
- do, they will be
1326
- <code class="computeroutput">BZ_SEQUENCE_ERROR</code>, and indicate
1327
- a bug in your programming.</p>
1328
- <p>Trivial other possible return values:</p>
1329
- <pre class="programlisting">BZ_PARAM_ERROR
1330
- if strm is NULL, or strm-&gt;s is NULL</pre>
1331
- </div>
1332
- <div class="sect2" lang="en">
1333
- <div class="titlepage"><div><div><h3 class="title">
1334
- <a name="bzCompress-end"></a>3.3.3.�<code class="computeroutput">BZ2_bzCompressEnd</code></h3></div></div></div>
1335
- <pre class="programlisting">int BZ2_bzCompressEnd ( bz_stream *strm );</pre>
1336
- <p>Releases all memory associated with a compression
1337
- stream.</p>
1338
- <p>Possible return values:</p>
1339
- <pre class="programlisting">BZ_PARAM_ERROR if strm is NULL or strm-&gt;s is NULL
1340
- BZ_OK otherwise</pre>
1341
- </div>
1342
- <div class="sect2" lang="en">
1343
- <div class="titlepage"><div><div><h3 class="title">
1344
- <a name="bzDecompress-init"></a>3.3.4.�<code class="computeroutput">BZ2_bzDecompressInit</code></h3></div></div></div>
1345
- <pre class="programlisting">int BZ2_bzDecompressInit ( bz_stream *strm, int verbosity, int small );</pre>
1346
- <p>Prepares for decompression. As with
1347
- <code class="computeroutput">BZ2_bzCompressInit</code>, a
1348
- <code class="computeroutput">bz_stream</code> record should be
1349
- allocated and initialised before the call. Fields
1350
- <code class="computeroutput">bzalloc</code>,
1351
- <code class="computeroutput">bzfree</code> and
1352
- <code class="computeroutput">opaque</code> should be set if a custom
1353
- memory allocator is required, or made
1354
- <code class="computeroutput">NULL</code> for the normal
1355
- <code class="computeroutput">malloc</code> /
1356
- <code class="computeroutput">free</code> routines. Upon return, the
1357
- internal state will have been initialised, and
1358
- <code class="computeroutput">total_in</code> and
1359
- <code class="computeroutput">total_out</code> will be zero.</p>
1360
- <p>For the meaning of parameter
1361
- <code class="computeroutput">verbosity</code>, see
1362
- <code class="computeroutput">BZ2_bzCompressInit</code>.</p>
1363
- <p>If <code class="computeroutput">small</code> is nonzero, the
1364
- library will use an alternative decompression algorithm which
1365
- uses less memory but at the cost of decompressing more slowly
1366
- (roughly speaking, half the speed, but the maximum memory
1367
- requirement drops to around 2300k). See <a href="#using">How to use bzip2</a>
1368
- for more information on memory management.</p>
1369
- <p>Note that the amount of memory needed to decompress a
1370
- stream cannot be determined until the stream's header has been
1371
- read, so even if
1372
- <code class="computeroutput">BZ2_bzDecompressInit</code> succeeds, a
1373
- subsequent <code class="computeroutput">BZ2_bzDecompress</code>
1374
- could fail with
1375
- <code class="computeroutput">BZ_MEM_ERROR</code>.</p>
1376
- <p>Possible return values:</p>
1377
- <pre class="programlisting">BZ_CONFIG_ERROR
1378
- if the library has been mis-compiled
1379
- BZ_PARAM_ERROR
1380
- if ( small != 0 &amp;&amp; small != 1 )
1381
- or (verbosity &lt;; 0 || verbosity &gt; 4)
1382
- BZ_MEM_ERROR
1383
- if insufficient memory is available</pre>
1384
- <p>Allowable next actions:</p>
1385
- <pre class="programlisting">BZ2_bzDecompress
1386
- if BZ_OK was returned
1387
- no specific action required in case of error</pre>
1388
- </div>
1389
- <div class="sect2" lang="en">
1390
- <div class="titlepage"><div><div><h3 class="title">
1391
- <a name="bzDecompress"></a>3.3.5.�<code class="computeroutput">BZ2_bzDecompress</code></h3></div></div></div>
1392
- <pre class="programlisting">int BZ2_bzDecompress ( bz_stream *strm );</pre>
1393
- <p>Provides more input and/out output buffer space for the
1394
- library. The caller maintains input and output buffers, and uses
1395
- <code class="computeroutput">BZ2_bzDecompress</code> to transfer
1396
- data between them.</p>
1397
- <p>Before each call to
1398
- <code class="computeroutput">BZ2_bzDecompress</code>,
1399
- <code class="computeroutput">next_in</code> should point at the
1400
- compressed data, and <code class="computeroutput">avail_in</code>
1401
- should indicate how many bytes the library may read.
1402
- <code class="computeroutput">BZ2_bzDecompress</code> updates
1403
- <code class="computeroutput">next_in</code>,
1404
- <code class="computeroutput">avail_in</code> and
1405
- <code class="computeroutput">total_in</code> to reflect the number
1406
- of bytes it has read.</p>
1407
- <p>Similarly, <code class="computeroutput">next_out</code> should
1408
- point to a buffer in which the uncompressed output is to be
1409
- placed, with <code class="computeroutput">avail_out</code>
1410
- indicating how much output space is available.
1411
- <code class="computeroutput">BZ2_bzCompress</code> updates
1412
- <code class="computeroutput">next_out</code>,
1413
- <code class="computeroutput">avail_out</code> and
1414
- <code class="computeroutput">total_out</code> to reflect the number
1415
- of bytes output.</p>
1416
- <p>You may provide and remove as little or as much data as you
1417
- like on each call of
1418
- <code class="computeroutput">BZ2_bzDecompress</code>. In the limit,
1419
- it is acceptable to supply and remove data one byte at a time,
1420
- although this would be terribly inefficient. You should always
1421
- ensure that at least one byte of output space is available at
1422
- each call.</p>
1423
- <p>Use of <code class="computeroutput">BZ2_bzDecompress</code> is
1424
- simpler than
1425
- <code class="computeroutput">BZ2_bzCompress</code>.</p>
1426
- <p>You should provide input and remove output as described
1427
- above, and repeatedly call
1428
- <code class="computeroutput">BZ2_bzDecompress</code> until
1429
- <code class="computeroutput">BZ_STREAM_END</code> is returned.
1430
- Appearance of <code class="computeroutput">BZ_STREAM_END</code>
1431
- denotes that <code class="computeroutput">BZ2_bzDecompress</code>
1432
- has detected the logical end of the compressed stream.
1433
- <code class="computeroutput">BZ2_bzDecompress</code> will not
1434
- produce <code class="computeroutput">BZ_STREAM_END</code> until all
1435
- output data has been placed into the output buffer, so once
1436
- <code class="computeroutput">BZ_STREAM_END</code> appears, you are
1437
- guaranteed to have available all the decompressed output, and
1438
- <code class="computeroutput">BZ2_bzDecompressEnd</code> can safely
1439
- be called.</p>
1440
- <p>If case of an error return value, you should call
1441
- <code class="computeroutput">BZ2_bzDecompressEnd</code> to clean up
1442
- and release memory.</p>
1443
- <p>Possible return values:</p>
1444
- <pre class="programlisting">BZ_PARAM_ERROR
1445
- if strm is NULL or strm-&gt;s is NULL
1446
- or strm-&gt;avail_out &lt; 1
1447
- BZ_DATA_ERROR
1448
- if a data integrity error is detected in the compressed stream
1449
- BZ_DATA_ERROR_MAGIC
1450
- if the compressed stream doesn't begin with the right magic bytes
1451
- BZ_MEM_ERROR
1452
- if there wasn't enough memory available
1453
- BZ_STREAM_END
1454
- if the logical end of the data stream was detected and all
1455
- output in has been consumed, eg s--&gt;avail_out &gt; 0
1456
- BZ_OK
1457
- otherwise</pre>
1458
- <p>Allowable next actions:</p>
1459
- <pre class="programlisting">BZ2_bzDecompress
1460
- if BZ_OK was returned
1461
- BZ2_bzDecompressEnd
1462
- otherwise</pre>
1463
- </div>
1464
- <div class="sect2" lang="en">
1465
- <div class="titlepage"><div><div><h3 class="title">
1466
- <a name="bzDecompress-end"></a>3.3.6.�<code class="computeroutput">BZ2_bzDecompressEnd</code></h3></div></div></div>
1467
- <pre class="programlisting">int BZ2_bzDecompressEnd ( bz_stream *strm );</pre>
1468
- <p>Releases all memory associated with a decompression
1469
- stream.</p>
1470
- <p>Possible return values:</p>
1471
- <pre class="programlisting">BZ_PARAM_ERROR
1472
- if strm is NULL or strm-&gt;s is NULL
1473
- BZ_OK
1474
- otherwise</pre>
1475
- <p>Allowable next actions:</p>
1476
- <pre class="programlisting"> None.</pre>
1477
- </div>
1478
- </div>
1479
- <div class="sect1" lang="en">
1480
- <div class="titlepage"><div><div><h2 class="title" style="clear: both">
1481
- <a name="hl-interface"></a>3.4.�High-level interface</h2></div></div></div>
1482
- <p>This interface provides functions for reading and writing
1483
- <code class="computeroutput">bzip2</code> format files. First, some
1484
- general points.</p>
1485
- <div class="itemizedlist"><ul type="bullet">
1486
- <li style="list-style-type: disc"><p>All of the functions take an
1487
- <code class="computeroutput">int*</code> first argument,
1488
- <code class="computeroutput">bzerror</code>. After each call,
1489
- <code class="computeroutput">bzerror</code> should be consulted
1490
- first to determine the outcome of the call. If
1491
- <code class="computeroutput">bzerror</code> is
1492
- <code class="computeroutput">BZ_OK</code>, the call completed
1493
- successfully, and only then should the return value of the
1494
- function (if any) be consulted. If
1495
- <code class="computeroutput">bzerror</code> is
1496
- <code class="computeroutput">BZ_IO_ERROR</code>, there was an
1497
- error reading/writing the underlying compressed file, and you
1498
- should then consult <code class="computeroutput">errno</code> /
1499
- <code class="computeroutput">perror</code> to determine the cause
1500
- of the difficulty. <code class="computeroutput">bzerror</code>
1501
- may also be set to various other values; precise details are
1502
- given on a per-function basis below.</p></li>
1503
- <li style="list-style-type: disc"><p>If <code class="computeroutput">bzerror</code> indicates
1504
- an error (ie, anything except
1505
- <code class="computeroutput">BZ_OK</code> and
1506
- <code class="computeroutput">BZ_STREAM_END</code>), you should
1507
- immediately call
1508
- <code class="computeroutput">BZ2_bzReadClose</code> (or
1509
- <code class="computeroutput">BZ2_bzWriteClose</code>, depending on
1510
- whether you are attempting to read or to write) to free up all
1511
- resources associated with the stream. Once an error has been
1512
- indicated, behaviour of all calls except
1513
- <code class="computeroutput">BZ2_bzReadClose</code>
1514
- (<code class="computeroutput">BZ2_bzWriteClose</code>) is
1515
- undefined. The implication is that (1)
1516
- <code class="computeroutput">bzerror</code> should be checked
1517
- after each call, and (2) if
1518
- <code class="computeroutput">bzerror</code> indicates an error,
1519
- <code class="computeroutput">BZ2_bzReadClose</code>
1520
- (<code class="computeroutput">BZ2_bzWriteClose</code>) should then
1521
- be called to clean up.</p></li>
1522
- <li style="list-style-type: disc"><p>The <code class="computeroutput">FILE*</code> arguments
1523
- passed to <code class="computeroutput">BZ2_bzReadOpen</code> /
1524
- <code class="computeroutput">BZ2_bzWriteOpen</code> should be set
1525
- to binary mode. Most Unix systems will do this by default, but
1526
- other platforms, including Windows and Mac, will not. If you
1527
- omit this, you may encounter problems when moving code to new
1528
- platforms.</p></li>
1529
- <li style="list-style-type: disc"><p>Memory allocation requests are handled by
1530
- <code class="computeroutput">malloc</code> /
1531
- <code class="computeroutput">free</code>. At present there is no
1532
- facility for user-defined memory allocators in the file I/O
1533
- functions (could easily be added, though).</p></li>
1534
- </ul></div>
1535
- <div class="sect2" lang="en">
1536
- <div class="titlepage"><div><div><h3 class="title">
1537
- <a name="bzreadopen"></a>3.4.1.�<code class="computeroutput">BZ2_bzReadOpen</code></h3></div></div></div>
1538
- <pre class="programlisting">typedef void BZFILE;
1539
-
1540
- BZFILE *BZ2_bzReadOpen( int *bzerror, FILE *f,
1541
- int verbosity, int small,
1542
- void *unused, int nUnused );</pre>
1543
- <p>Prepare to read compressed data from file handle
1544
- <code class="computeroutput">f</code>.
1545
- <code class="computeroutput">f</code> should refer to a file which
1546
- has been opened for reading, and for which the error indicator
1547
- (<code class="computeroutput">ferror(f)</code>)is not set. If
1548
- <code class="computeroutput">small</code> is 1, the library will try
1549
- to decompress using less memory, at the expense of speed.</p>
1550
- <p>For reasons explained below,
1551
- <code class="computeroutput">BZ2_bzRead</code> will decompress the
1552
- <code class="computeroutput">nUnused</code> bytes starting at
1553
- <code class="computeroutput">unused</code>, before starting to read
1554
- from the file <code class="computeroutput">f</code>. At most
1555
- <code class="computeroutput">BZ_MAX_UNUSED</code> bytes may be
1556
- supplied like this. If this facility is not required, you should
1557
- pass <code class="computeroutput">NULL</code> and
1558
- <code class="computeroutput">0</code> for
1559
- <code class="computeroutput">unused</code> and
1560
- n<code class="computeroutput">Unused</code> respectively.</p>
1561
- <p>For the meaning of parameters
1562
- <code class="computeroutput">small</code> and
1563
- <code class="computeroutput">verbosity</code>, see
1564
- <code class="computeroutput">BZ2_bzDecompressInit</code>.</p>
1565
- <p>The amount of memory needed to decompress a file cannot be
1566
- determined until the file's header has been read. So it is
1567
- possible that <code class="computeroutput">BZ2_bzReadOpen</code>
1568
- returns <code class="computeroutput">BZ_OK</code> but a subsequent
1569
- call of <code class="computeroutput">BZ2_bzRead</code> will return
1570
- <code class="computeroutput">BZ_MEM_ERROR</code>.</p>
1571
- <p>Possible assignments to
1572
- <code class="computeroutput">bzerror</code>:</p>
1573
- <pre class="programlisting">BZ_CONFIG_ERROR
1574
- if the library has been mis-compiled
1575
- BZ_PARAM_ERROR
1576
- if f is NULL
1577
- or small is neither 0 nor 1
1578
- or ( unused == NULL &amp;&amp; nUnused != 0 )
1579
- or ( unused != NULL &amp;&amp; !(0 &lt;= nUnused &lt;= BZ_MAX_UNUSED) )
1580
- BZ_IO_ERROR
1581
- if ferror(f) is nonzero
1582
- BZ_MEM_ERROR
1583
- if insufficient memory is available
1584
- BZ_OK
1585
- otherwise.</pre>
1586
- <p>Possible return values:</p>
1587
- <pre class="programlisting">Pointer to an abstract BZFILE
1588
- if bzerror is BZ_OK
1589
- NULL
1590
- otherwise</pre>
1591
- <p>Allowable next actions:</p>
1592
- <pre class="programlisting">BZ2_bzRead
1593
- if bzerror is BZ_OK
1594
- BZ2_bzClose
1595
- otherwise</pre>
1596
- </div>
1597
- <div class="sect2" lang="en">
1598
- <div class="titlepage"><div><div><h3 class="title">
1599
- <a name="bzread"></a>3.4.2.�<code class="computeroutput">BZ2_bzRead</code></h3></div></div></div>
1600
- <pre class="programlisting">int BZ2_bzRead ( int *bzerror, BZFILE *b, void *buf, int len );</pre>
1601
- <p>Reads up to <code class="computeroutput">len</code>
1602
- (uncompressed) bytes from the compressed file
1603
- <code class="computeroutput">b</code> into the buffer
1604
- <code class="computeroutput">buf</code>. If the read was
1605
- successful, <code class="computeroutput">bzerror</code> is set to
1606
- <code class="computeroutput">BZ_OK</code> and the number of bytes
1607
- read is returned. If the logical end-of-stream was detected,
1608
- <code class="computeroutput">bzerror</code> will be set to
1609
- <code class="computeroutput">BZ_STREAM_END</code>, and the number of
1610
- bytes read is returned. All other
1611
- <code class="computeroutput">bzerror</code> values denote an
1612
- error.</p>
1613
- <p><code class="computeroutput">BZ2_bzRead</code> will supply
1614
- <code class="computeroutput">len</code> bytes, unless the logical
1615
- stream end is detected or an error occurs. Because of this, it
1616
- is possible to detect the stream end by observing when the number
1617
- of bytes returned is less than the number requested.
1618
- Nevertheless, this is regarded as inadvisable; you should instead
1619
- check <code class="computeroutput">bzerror</code> after every call
1620
- and watch out for
1621
- <code class="computeroutput">BZ_STREAM_END</code>.</p>
1622
- <p>Internally, <code class="computeroutput">BZ2_bzRead</code>
1623
- copies data from the compressed file in chunks of size
1624
- <code class="computeroutput">BZ_MAX_UNUSED</code> bytes before
1625
- decompressing it. If the file contains more bytes than strictly
1626
- needed to reach the logical end-of-stream,
1627
- <code class="computeroutput">BZ2_bzRead</code> will almost certainly
1628
- read some of the trailing data before signalling
1629
- <code class="computeroutput">BZ_SEQUENCE_END</code>. To collect the
1630
- read but unused data once
1631
- <code class="computeroutput">BZ_SEQUENCE_END</code> has appeared,
1632
- call <code class="computeroutput">BZ2_bzReadGetUnused</code>
1633
- immediately before
1634
- <code class="computeroutput">BZ2_bzReadClose</code>.</p>
1635
- <p>Possible assignments to
1636
- <code class="computeroutput">bzerror</code>:</p>
1637
- <pre class="programlisting">BZ_PARAM_ERROR
1638
- if b is NULL or buf is NULL or len &lt; 0
1639
- BZ_SEQUENCE_ERROR
1640
- if b was opened with BZ2_bzWriteOpen
1641
- BZ_IO_ERROR
1642
- if there is an error reading from the compressed file
1643
- BZ_UNEXPECTED_EOF
1644
- if the compressed file ended before
1645
- the logical end-of-stream was detected
1646
- BZ_DATA_ERROR
1647
- if a data integrity error was detected in the compressed stream
1648
- BZ_DATA_ERROR_MAGIC
1649
- if the stream does not begin with the requisite header bytes
1650
- (ie, is not a bzip2 data file). This is really
1651
- a special case of BZ_DATA_ERROR.
1652
- BZ_MEM_ERROR
1653
- if insufficient memory was available
1654
- BZ_STREAM_END
1655
- if the logical end of stream was detected.
1656
- BZ_OK
1657
- otherwise.</pre>
1658
- <p>Possible return values:</p>
1659
- <pre class="programlisting">number of bytes read
1660
- if bzerror is BZ_OK or BZ_STREAM_END
1661
- undefined
1662
- otherwise</pre>
1663
- <p>Allowable next actions:</p>
1664
- <pre class="programlisting">collect data from buf, then BZ2_bzRead or BZ2_bzReadClose
1665
- if bzerror is BZ_OK
1666
- collect data from buf, then BZ2_bzReadClose or BZ2_bzReadGetUnused
1667
- if bzerror is BZ_SEQUENCE_END
1668
- BZ2_bzReadClose
1669
- otherwise</pre>
1670
- </div>
1671
- <div class="sect2" lang="en">
1672
- <div class="titlepage"><div><div><h3 class="title">
1673
- <a name="bzreadgetunused"></a>3.4.3.�<code class="computeroutput">BZ2_bzReadGetUnused</code></h3></div></div></div>
1674
- <pre class="programlisting">void BZ2_bzReadGetUnused( int* bzerror, BZFILE *b,
1675
- void** unused, int* nUnused );</pre>
1676
- <p>Returns data which was read from the compressed file but
1677
- was not needed to get to the logical end-of-stream.
1678
- <code class="computeroutput">*unused</code> is set to the address of
1679
- the data, and <code class="computeroutput">*nUnused</code> to the
1680
- number of bytes. <code class="computeroutput">*nUnused</code> will
1681
- be set to a value between <code class="computeroutput">0</code> and
1682
- <code class="computeroutput">BZ_MAX_UNUSED</code> inclusive.</p>
1683
- <p>This function may only be called once
1684
- <code class="computeroutput">BZ2_bzRead</code> has signalled
1685
- <code class="computeroutput">BZ_STREAM_END</code> but before
1686
- <code class="computeroutput">BZ2_bzReadClose</code>.</p>
1687
- <p>Possible assignments to
1688
- <code class="computeroutput">bzerror</code>:</p>
1689
- <pre class="programlisting">BZ_PARAM_ERROR
1690
- if b is NULL
1691
- or unused is NULL or nUnused is NULL
1692
- BZ_SEQUENCE_ERROR
1693
- if BZ_STREAM_END has not been signalled
1694
- or if b was opened with BZ2_bzWriteOpen
1695
- BZ_OK
1696
- otherwise</pre>
1697
- <p>Allowable next actions:</p>
1698
- <pre class="programlisting">BZ2_bzReadClose</pre>
1699
- </div>
1700
- <div class="sect2" lang="en">
1701
- <div class="titlepage"><div><div><h3 class="title">
1702
- <a name="bzreadclose"></a>3.4.4.�<code class="computeroutput">BZ2_bzReadClose</code></h3></div></div></div>
1703
- <pre class="programlisting">void BZ2_bzReadClose ( int *bzerror, BZFILE *b );</pre>
1704
- <p>Releases all memory pertaining to the compressed file
1705
- <code class="computeroutput">b</code>.
1706
- <code class="computeroutput">BZ2_bzReadClose</code> does not call
1707
- <code class="computeroutput">fclose</code> on the underlying file
1708
- handle, so you should do that yourself if appropriate.
1709
- <code class="computeroutput">BZ2_bzReadClose</code> should be called
1710
- to clean up after all error situations.</p>
1711
- <p>Possible assignments to
1712
- <code class="computeroutput">bzerror</code>:</p>
1713
- <pre class="programlisting">BZ_SEQUENCE_ERROR
1714
- if b was opened with BZ2_bzOpenWrite
1715
- BZ_OK
1716
- otherwise</pre>
1717
- <p>Allowable next actions:</p>
1718
- <pre class="programlisting">none</pre>
1719
- </div>
1720
- <div class="sect2" lang="en">
1721
- <div class="titlepage"><div><div><h3 class="title">
1722
- <a name="bzwriteopen"></a>3.4.5.�<code class="computeroutput">BZ2_bzWriteOpen</code></h3></div></div></div>
1723
- <pre class="programlisting">BZFILE *BZ2_bzWriteOpen( int *bzerror, FILE *f,
1724
- int blockSize100k, int verbosity,
1725
- int workFactor );</pre>
1726
- <p>Prepare to write compressed data to file handle
1727
- <code class="computeroutput">f</code>.
1728
- <code class="computeroutput">f</code> should refer to a file which
1729
- has been opened for writing, and for which the error indicator
1730
- (<code class="computeroutput">ferror(f)</code>)is not set.</p>
1731
- <p>For the meaning of parameters
1732
- <code class="computeroutput">blockSize100k</code>,
1733
- <code class="computeroutput">verbosity</code> and
1734
- <code class="computeroutput">workFactor</code>, see
1735
- <code class="computeroutput">BZ2_bzCompressInit</code>.</p>
1736
- <p>All required memory is allocated at this stage, so if the
1737
- call completes successfully,
1738
- <code class="computeroutput">BZ_MEM_ERROR</code> cannot be signalled
1739
- by a subsequent call to
1740
- <code class="computeroutput">BZ2_bzWrite</code>.</p>
1741
- <p>Possible assignments to
1742
- <code class="computeroutput">bzerror</code>:</p>
1743
- <pre class="programlisting">BZ_CONFIG_ERROR
1744
- if the library has been mis-compiled
1745
- BZ_PARAM_ERROR
1746
- if f is NULL
1747
- or blockSize100k &lt; 1 or blockSize100k &gt; 9
1748
- BZ_IO_ERROR
1749
- if ferror(f) is nonzero
1750
- BZ_MEM_ERROR
1751
- if insufficient memory is available
1752
- BZ_OK
1753
- otherwise</pre>
1754
- <p>Possible return values:</p>
1755
- <pre class="programlisting">Pointer to an abstract BZFILE
1756
- if bzerror is BZ_OK
1757
- NULL
1758
- otherwise</pre>
1759
- <p>Allowable next actions:</p>
1760
- <pre class="programlisting">BZ2_bzWrite
1761
- if bzerror is BZ_OK
1762
- (you could go directly to BZ2_bzWriteClose, but this would be pretty pointless)
1763
- BZ2_bzWriteClose
1764
- otherwise</pre>
1765
- </div>
1766
- <div class="sect2" lang="en">
1767
- <div class="titlepage"><div><div><h3 class="title">
1768
- <a name="bzwrite"></a>3.4.6.�<code class="computeroutput">BZ2_bzWrite</code></h3></div></div></div>
1769
- <pre class="programlisting">void BZ2_bzWrite ( int *bzerror, BZFILE *b, void *buf, int len );</pre>
1770
- <p>Absorbs <code class="computeroutput">len</code> bytes from the
1771
- buffer <code class="computeroutput">buf</code>, eventually to be
1772
- compressed and written to the file.</p>
1773
- <p>Possible assignments to
1774
- <code class="computeroutput">bzerror</code>:</p>
1775
- <pre class="programlisting">BZ_PARAM_ERROR
1776
- if b is NULL or buf is NULL or len &lt; 0
1777
- BZ_SEQUENCE_ERROR
1778
- if b was opened with BZ2_bzReadOpen
1779
- BZ_IO_ERROR
1780
- if there is an error writing the compressed file.
1781
- BZ_OK
1782
- otherwise</pre>
1783
- </div>
1784
- <div class="sect2" lang="en">
1785
- <div class="titlepage"><div><div><h3 class="title">
1786
- <a name="bzwriteclose"></a>3.4.7.�<code class="computeroutput">BZ2_bzWriteClose</code></h3></div></div></div>
1787
- <pre class="programlisting">void BZ2_bzWriteClose( int *bzerror, BZFILE* f,
1788
- int abandon,
1789
- unsigned int* nbytes_in,
1790
- unsigned int* nbytes_out );
1791
-
1792
- void BZ2_bzWriteClose64( int *bzerror, BZFILE* f,
1793
- int abandon,
1794
- unsigned int* nbytes_in_lo32,
1795
- unsigned int* nbytes_in_hi32,
1796
- unsigned int* nbytes_out_lo32,
1797
- unsigned int* nbytes_out_hi32 );</pre>
1798
- <p>Compresses and flushes to the compressed file all data so
1799
- far supplied by <code class="computeroutput">BZ2_bzWrite</code>.
1800
- The logical end-of-stream markers are also written, so subsequent
1801
- calls to <code class="computeroutput">BZ2_bzWrite</code> are
1802
- illegal. All memory associated with the compressed file
1803
- <code class="computeroutput">b</code> is released.
1804
- <code class="computeroutput">fflush</code> is called on the
1805
- compressed file, but it is not
1806
- <code class="computeroutput">fclose</code>'d.</p>
1807
- <p>If <code class="computeroutput">BZ2_bzWriteClose</code> is
1808
- called to clean up after an error, the only action is to release
1809
- the memory. The library records the error codes issued by
1810
- previous calls, so this situation will be detected automatically.
1811
- There is no attempt to complete the compression operation, nor to
1812
- <code class="computeroutput">fflush</code> the compressed file. You
1813
- can force this behaviour to happen even in the case of no error,
1814
- by passing a nonzero value to
1815
- <code class="computeroutput">abandon</code>.</p>
1816
- <p>If <code class="computeroutput">nbytes_in</code> is non-null,
1817
- <code class="computeroutput">*nbytes_in</code> will be set to be the
1818
- total volume of uncompressed data handled. Similarly,
1819
- <code class="computeroutput">nbytes_out</code> will be set to the
1820
- total volume of compressed data written. For compatibility with
1821
- older versions of the library,
1822
- <code class="computeroutput">BZ2_bzWriteClose</code> only yields the
1823
- lower 32 bits of these counts. Use
1824
- <code class="computeroutput">BZ2_bzWriteClose64</code> if you want
1825
- the full 64 bit counts. These two functions are otherwise
1826
- absolutely identical.</p>
1827
- <p>Possible assignments to
1828
- <code class="computeroutput">bzerror</code>:</p>
1829
- <pre class="programlisting">BZ_SEQUENCE_ERROR
1830
- if b was opened with BZ2_bzReadOpen
1831
- BZ_IO_ERROR
1832
- if there is an error writing the compressed file
1833
- BZ_OK
1834
- otherwise</pre>
1835
- </div>
1836
- <div class="sect2" lang="en">
1837
- <div class="titlepage"><div><div><h3 class="title">
1838
- <a name="embed"></a>3.4.8.�Handling embedded compressed data streams</h3></div></div></div>
1839
- <p>The high-level library facilitates use of
1840
- <code class="computeroutput">bzip2</code> data streams which form
1841
- some part of a surrounding, larger data stream.</p>
1842
- <div class="itemizedlist"><ul type="bullet">
1843
- <li style="list-style-type: disc"><p>For writing, the library takes an open file handle,
1844
- writes compressed data to it,
1845
- <code class="computeroutput">fflush</code>es it but does not
1846
- <code class="computeroutput">fclose</code> it. The calling
1847
- application can write its own data before and after the
1848
- compressed data stream, using that same file handle.</p></li>
1849
- <li style="list-style-type: disc"><p>Reading is more complex, and the facilities are not as
1850
- general as they could be since generality is hard to reconcile
1851
- with efficiency. <code class="computeroutput">BZ2_bzRead</code>
1852
- reads from the compressed file in blocks of size
1853
- <code class="computeroutput">BZ_MAX_UNUSED</code> bytes, and in
1854
- doing so probably will overshoot the logical end of compressed
1855
- stream. To recover this data once decompression has ended,
1856
- call <code class="computeroutput">BZ2_bzReadGetUnused</code> after
1857
- the last call of <code class="computeroutput">BZ2_bzRead</code>
1858
- (the one returning
1859
- <code class="computeroutput">BZ_STREAM_END</code>) but before
1860
- calling
1861
- <code class="computeroutput">BZ2_bzReadClose</code>.</p></li>
1862
- </ul></div>
1863
- <p>This mechanism makes it easy to decompress multiple
1864
- <code class="computeroutput">bzip2</code> streams placed end-to-end.
1865
- As the end of one stream, when
1866
- <code class="computeroutput">BZ2_bzRead</code> returns
1867
- <code class="computeroutput">BZ_STREAM_END</code>, call
1868
- <code class="computeroutput">BZ2_bzReadGetUnused</code> to collect
1869
- the unused data (copy it into your own buffer somewhere). That
1870
- data forms the start of the next compressed stream. To start
1871
- uncompressing that next stream, call
1872
- <code class="computeroutput">BZ2_bzReadOpen</code> again, feeding in
1873
- the unused data via the <code class="computeroutput">unused</code> /
1874
- <code class="computeroutput">nUnused</code> parameters. Keep doing
1875
- this until <code class="computeroutput">BZ_STREAM_END</code> return
1876
- coincides with the physical end of file
1877
- (<code class="computeroutput">feof(f)</code>). In this situation
1878
- <code class="computeroutput">BZ2_bzReadGetUnused</code> will of
1879
- course return no data.</p>
1880
- <p>This should give some feel for how the high-level interface
1881
- can be used. If you require extra flexibility, you'll have to
1882
- bite the bullet and get to grips with the low-level
1883
- interface.</p>
1884
- </div>
1885
- <div class="sect2" lang="en">
1886
- <div class="titlepage"><div><div><h3 class="title">
1887
- <a name="std-rdwr"></a>3.4.9.�Standard file-reading/writing code</h3></div></div></div>
1888
- <p>Here's how you'd write data to a compressed file:</p>
1889
- <pre class="programlisting">FILE* f;
1890
- BZFILE* b;
1891
- int nBuf;
1892
- char buf[ /* whatever size you like */ ];
1893
- int bzerror;
1894
- int nWritten;
1895
-
1896
- f = fopen ( "myfile.bz2", "w" );
1897
- if ( !f ) {
1898
- /* handle error */
1899
- }
1900
- b = BZ2_bzWriteOpen( &amp;bzerror, f, 9 );
1901
- if (bzerror != BZ_OK) {
1902
- BZ2_bzWriteClose ( b );
1903
- /* handle error */
1904
- }
1905
-
1906
- while ( /* condition */ ) {
1907
- /* get data to write into buf, and set nBuf appropriately */
1908
- nWritten = BZ2_bzWrite ( &amp;bzerror, b, buf, nBuf );
1909
- if (bzerror == BZ_IO_ERROR) {
1910
- BZ2_bzWriteClose ( &amp;bzerror, b );
1911
- /* handle error */
1912
- }
1913
- }
1914
-
1915
- BZ2_bzWriteClose( &amp;bzerror, b );
1916
- if (bzerror == BZ_IO_ERROR) {
1917
- /* handle error */
1918
- }</pre>
1919
- <p>And to read from a compressed file:</p>
1920
- <pre class="programlisting">FILE* f;
1921
- BZFILE* b;
1922
- int nBuf;
1923
- char buf[ /* whatever size you like */ ];
1924
- int bzerror;
1925
- int nWritten;
1926
-
1927
- f = fopen ( "myfile.bz2", "r" );
1928
- if ( !f ) {
1929
- /* handle error */
1930
- }
1931
- b = BZ2_bzReadOpen ( &amp;bzerror, f, 0, NULL, 0 );
1932
- if ( bzerror != BZ_OK ) {
1933
- BZ2_bzReadClose ( &amp;bzerror, b );
1934
- /* handle error */
1935
- }
1936
-
1937
- bzerror = BZ_OK;
1938
- while ( bzerror == BZ_OK &amp;&amp; /* arbitrary other conditions */) {
1939
- nBuf = BZ2_bzRead ( &amp;bzerror, b, buf, /* size of buf */ );
1940
- if ( bzerror == BZ_OK ) {
1941
- /* do something with buf[0 .. nBuf-1] */
1942
- }
1943
- }
1944
- if ( bzerror != BZ_STREAM_END ) {
1945
- BZ2_bzReadClose ( &amp;bzerror, b );
1946
- /* handle error */
1947
- } else {
1948
- BZ2_bzReadClose ( &amp;bzerror, b );
1949
- }</pre>
1950
- </div>
1951
- </div>
1952
- <div class="sect1" lang="en">
1953
- <div class="titlepage"><div><div><h2 class="title" style="clear: both">
1954
- <a name="util-fns"></a>3.5.�Utility functions</h2></div></div></div>
1955
- <div class="sect2" lang="en">
1956
- <div class="titlepage"><div><div><h3 class="title">
1957
- <a name="bzbufftobuffcompress"></a>3.5.1.�<code class="computeroutput">BZ2_bzBuffToBuffCompress</code></h3></div></div></div>
1958
- <pre class="programlisting">int BZ2_bzBuffToBuffCompress( char* dest,
1959
- unsigned int* destLen,
1960
- char* source,
1961
- unsigned int sourceLen,
1962
- int blockSize100k,
1963
- int verbosity,
1964
- int workFactor );</pre>
1965
- <p>Attempts to compress the data in <code class="computeroutput">source[0
1966
- .. sourceLen-1]</code> into the destination buffer,
1967
- <code class="computeroutput">dest[0 .. *destLen-1]</code>. If the
1968
- destination buffer is big enough,
1969
- <code class="computeroutput">*destLen</code> is set to the size of
1970
- the compressed data, and <code class="computeroutput">BZ_OK</code>
1971
- is returned. If the compressed data won't fit,
1972
- <code class="computeroutput">*destLen</code> is unchanged, and
1973
- <code class="computeroutput">BZ_OUTBUFF_FULL</code> is
1974
- returned.</p>
1975
- <p>Compression in this manner is a one-shot event, done with a
1976
- single call to this function. The resulting compressed data is a
1977
- complete <code class="computeroutput">bzip2</code> format data
1978
- stream. There is no mechanism for making additional calls to
1979
- provide extra input data. If you want that kind of mechanism,
1980
- use the low-level interface.</p>
1981
- <p>For the meaning of parameters
1982
- <code class="computeroutput">blockSize100k</code>,
1983
- <code class="computeroutput">verbosity</code> and
1984
- <code class="computeroutput">workFactor</code>, see
1985
- <code class="computeroutput">BZ2_bzCompressInit</code>.</p>
1986
- <p>To guarantee that the compressed data will fit in its
1987
- buffer, allocate an output buffer of size 1% larger than the
1988
- uncompressed data, plus six hundred extra bytes.</p>
1989
- <p><code class="computeroutput">BZ2_bzBuffToBuffDecompress</code>
1990
- will not write data at or beyond
1991
- <code class="computeroutput">dest[*destLen]</code>, even in case of
1992
- buffer overflow.</p>
1993
- <p>Possible return values:</p>
1994
- <pre class="programlisting">BZ_CONFIG_ERROR
1995
- if the library has been mis-compiled
1996
- BZ_PARAM_ERROR
1997
- if dest is NULL or destLen is NULL
1998
- or blockSize100k &lt; 1 or blockSize100k &gt; 9
1999
- or verbosity &lt; 0 or verbosity &gt; 4
2000
- or workFactor &lt; 0 or workFactor &gt; 250
2001
- BZ_MEM_ERROR
2002
- if insufficient memory is available
2003
- BZ_OUTBUFF_FULL
2004
- if the size of the compressed data exceeds *destLen
2005
- BZ_OK
2006
- otherwise</pre>
2007
- </div>
2008
- <div class="sect2" lang="en">
2009
- <div class="titlepage"><div><div><h3 class="title">
2010
- <a name="bzbufftobuffdecompress"></a>3.5.2.�<code class="computeroutput">BZ2_bzBuffToBuffDecompress</code></h3></div></div></div>
2011
- <pre class="programlisting">int BZ2_bzBuffToBuffDecompress( char* dest,
2012
- unsigned int* destLen,
2013
- char* source,
2014
- unsigned int sourceLen,
2015
- int small,
2016
- int verbosity );</pre>
2017
- <p>Attempts to decompress the data in <code class="computeroutput">source[0
2018
- .. sourceLen-1]</code> into the destination buffer,
2019
- <code class="computeroutput">dest[0 .. *destLen-1]</code>. If the
2020
- destination buffer is big enough,
2021
- <code class="computeroutput">*destLen</code> is set to the size of
2022
- the uncompressed data, and <code class="computeroutput">BZ_OK</code>
2023
- is returned. If the compressed data won't fit,
2024
- <code class="computeroutput">*destLen</code> is unchanged, and
2025
- <code class="computeroutput">BZ_OUTBUFF_FULL</code> is
2026
- returned.</p>
2027
- <p><code class="computeroutput">source</code> is assumed to hold
2028
- a complete <code class="computeroutput">bzip2</code> format data
2029
- stream.
2030
- <code class="computeroutput">BZ2_bzBuffToBuffDecompress</code> tries
2031
- to decompress the entirety of the stream into the output
2032
- buffer.</p>
2033
- <p>For the meaning of parameters
2034
- <code class="computeroutput">small</code> and
2035
- <code class="computeroutput">verbosity</code>, see
2036
- <code class="computeroutput">BZ2_bzDecompressInit</code>.</p>
2037
- <p>Because the compression ratio of the compressed data cannot
2038
- be known in advance, there is no easy way to guarantee that the
2039
- output buffer will be big enough. You may of course make
2040
- arrangements in your code to record the size of the uncompressed
2041
- data, but such a mechanism is beyond the scope of this
2042
- library.</p>
2043
- <p><code class="computeroutput">BZ2_bzBuffToBuffDecompress</code>
2044
- will not write data at or beyond
2045
- <code class="computeroutput">dest[*destLen]</code>, even in case of
2046
- buffer overflow.</p>
2047
- <p>Possible return values:</p>
2048
- <pre class="programlisting">BZ_CONFIG_ERROR
2049
- if the library has been mis-compiled
2050
- BZ_PARAM_ERROR
2051
- if dest is NULL or destLen is NULL
2052
- or small != 0 &amp;&amp; small != 1
2053
- or verbosity &lt; 0 or verbosity &gt; 4
2054
- BZ_MEM_ERROR
2055
- if insufficient memory is available
2056
- BZ_OUTBUFF_FULL
2057
- if the size of the compressed data exceeds *destLen
2058
- BZ_DATA_ERROR
2059
- if a data integrity error was detected in the compressed data
2060
- BZ_DATA_ERROR_MAGIC
2061
- if the compressed data doesn't begin with the right magic bytes
2062
- BZ_UNEXPECTED_EOF
2063
- if the compressed data ends unexpectedly
2064
- BZ_OK
2065
- otherwise</pre>
2066
- </div>
2067
- </div>
2068
- <div class="sect1" lang="en">
2069
- <div class="titlepage"><div><div><h2 class="title" style="clear: both">
2070
- <a name="zlib-compat"></a>3.6.�<code class="computeroutput">zlib</code> compatibility functions</h2></div></div></div>
2071
- <p>Yoshioka Tsuneo has contributed some functions to give
2072
- better <code class="computeroutput">zlib</code> compatibility.
2073
- These functions are <code class="computeroutput">BZ2_bzopen</code>,
2074
- <code class="computeroutput">BZ2_bzread</code>,
2075
- <code class="computeroutput">BZ2_bzwrite</code>,
2076
- <code class="computeroutput">BZ2_bzflush</code>,
2077
- <code class="computeroutput">BZ2_bzclose</code>,
2078
- <code class="computeroutput">BZ2_bzerror</code> and
2079
- <code class="computeroutput">BZ2_bzlibVersion</code>. These
2080
- functions are not (yet) officially part of the library. If they
2081
- break, you get to keep all the pieces. Nevertheless, I think
2082
- they work ok.</p>
2083
- <pre class="programlisting">typedef void BZFILE;
2084
-
2085
- const char * BZ2_bzlibVersion ( void );</pre>
2086
- <p>Returns a string indicating the library version.</p>
2087
- <pre class="programlisting">BZFILE * BZ2_bzopen ( const char *path, const char *mode );
2088
- BZFILE * BZ2_bzdopen ( int fd, const char *mode );</pre>
2089
- <p>Opens a <code class="computeroutput">.bz2</code> file for
2090
- reading or writing, using either its name or a pre-existing file
2091
- descriptor. Analogous to <code class="computeroutput">fopen</code>
2092
- and <code class="computeroutput">fdopen</code>.</p>
2093
- <pre class="programlisting">int BZ2_bzread ( BZFILE* b, void* buf, int len );
2094
- int BZ2_bzwrite ( BZFILE* b, void* buf, int len );</pre>
2095
- <p>Reads/writes data from/to a previously opened
2096
- <code class="computeroutput">BZFILE</code>. Analogous to
2097
- <code class="computeroutput">fread</code> and
2098
- <code class="computeroutput">fwrite</code>.</p>
2099
- <pre class="programlisting">int BZ2_bzflush ( BZFILE* b );
2100
- void BZ2_bzclose ( BZFILE* b );</pre>
2101
- <p>Flushes/closes a <code class="computeroutput">BZFILE</code>.
2102
- <code class="computeroutput">BZ2_bzflush</code> doesn't actually do
2103
- anything. Analogous to <code class="computeroutput">fflush</code>
2104
- and <code class="computeroutput">fclose</code>.</p>
2105
- <pre class="programlisting">const char * BZ2_bzerror ( BZFILE *b, int *errnum )</pre>
2106
- <p>Returns a string describing the more recent error status of
2107
- <code class="computeroutput">b</code>, and also sets
2108
- <code class="computeroutput">*errnum</code> to its numerical
2109
- value.</p>
2110
- </div>
2111
- <div class="sect1" lang="en">
2112
- <div class="titlepage"><div><div><h2 class="title" style="clear: both">
2113
- <a name="stdio-free"></a>3.7.�Using the library in a <code class="computeroutput">stdio</code>-free environment</h2></div></div></div>
2114
- <div class="sect2" lang="en">
2115
- <div class="titlepage"><div><div><h3 class="title">
2116
- <a name="stdio-bye"></a>3.7.1.�Getting rid of <code class="computeroutput">stdio</code></h3></div></div></div>
2117
- <p>In a deeply embedded application, you might want to use
2118
- just the memory-to-memory functions. You can do this
2119
- conveniently by compiling the library with preprocessor symbol
2120
- <code class="computeroutput">BZ_NO_STDIO</code> defined. Doing this
2121
- gives you a library containing only the following eight
2122
- functions:</p>
2123
- <p><code class="computeroutput">BZ2_bzCompressInit</code>,
2124
- <code class="computeroutput">BZ2_bzCompress</code>,
2125
- <code class="computeroutput">BZ2_bzCompressEnd</code>
2126
- <code class="computeroutput">BZ2_bzDecompressInit</code>,
2127
- <code class="computeroutput">BZ2_bzDecompress</code>,
2128
- <code class="computeroutput">BZ2_bzDecompressEnd</code>
2129
- <code class="computeroutput">BZ2_bzBuffToBuffCompress</code>,
2130
- <code class="computeroutput">BZ2_bzBuffToBuffDecompress</code></p>
2131
- <p>When compiled like this, all functions will ignore
2132
- <code class="computeroutput">verbosity</code> settings.</p>
2133
- </div>
2134
- <div class="sect2" lang="en">
2135
- <div class="titlepage"><div><div><h3 class="title">
2136
- <a name="critical-error"></a>3.7.2.�Critical error handling</h3></div></div></div>
2137
- <p><code class="computeroutput">libbzip2</code> contains a number
2138
- of internal assertion checks which should, needless to say, never
2139
- be activated. Nevertheless, if an assertion should fail,
2140
- behaviour depends on whether or not the library was compiled with
2141
- <code class="computeroutput">BZ_NO_STDIO</code> set.</p>
2142
- <p>For a normal compile, an assertion failure yields the
2143
- message:</p>
2144
- <div class="blockquote"><blockquote class="blockquote">
2145
- <p>bzip2/libbzip2: internal error number N.</p>
2146
- <p>This is a bug in bzip2/libbzip2, 1.0.5 of 10 December 2007.
2147
- Please report it to me at: jseward@bzip.org. If this happened
2148
- when you were using some program which uses libbzip2 as a
2149
- component, you should also report this bug to the author(s)
2150
- of that program. Please make an effort to report this bug;
2151
- timely and accurate bug reports eventually lead to higher
2152
- quality software. Thanks. Julian Seward, 10 December 2007.
2153
- </p>
2154
- </blockquote></div>
2155
- <p>where <code class="computeroutput">N</code> is some error code
2156
- number. If <code class="computeroutput">N == 1007</code>, it also
2157
- prints some extra text advising the reader that unreliable memory
2158
- is often associated with internal error 1007. (This is a
2159
- frequently-observed-phenomenon with versions 1.0.0/1.0.1).</p>
2160
- <p><code class="computeroutput">exit(3)</code> is then
2161
- called.</p>
2162
- <p>For a <code class="computeroutput">stdio</code>-free library,
2163
- assertion failures result in a call to a function declared
2164
- as:</p>
2165
- <pre class="programlisting">extern void bz_internal_error ( int errcode );</pre>
2166
- <p>The relevant code is passed as a parameter. You should
2167
- supply such a function.</p>
2168
- <p>In either case, once an assertion failure has occurred, any
2169
- <code class="computeroutput">bz_stream</code> records involved can
2170
- be regarded as invalid. You should not attempt to resume normal
2171
- operation with them.</p>
2172
- <p>You may, of course, change critical error handling to suit
2173
- your needs. As I said above, critical errors indicate bugs in
2174
- the library and should not occur. All "normal" error situations
2175
- are indicated via error return codes from functions, and can be
2176
- recovered from.</p>
2177
- </div>
2178
- </div>
2179
- <div class="sect1" lang="en">
2180
- <div class="titlepage"><div><div><h2 class="title" style="clear: both">
2181
- <a name="win-dll"></a>3.8.�Making a Windows DLL</h2></div></div></div>
2182
- <p>Everything related to Windows has been contributed by
2183
- Yoshioka Tsuneo
2184
- (<code class="computeroutput">tsuneo@rr.iij4u.or.jp</code>), so
2185
- you should send your queries to him (but perhaps Cc: me,
2186
- <code class="computeroutput">jseward@bzip.org</code>).</p>
2187
- <p>My vague understanding of what to do is: using Visual C++
2188
- 5.0, open the project file
2189
- <code class="computeroutput">libbz2.dsp</code>, and build. That's
2190
- all.</p>
2191
- <p>If you can't open the project file for some reason, make a
2192
- new one, naming these files:
2193
- <code class="computeroutput">blocksort.c</code>,
2194
- <code class="computeroutput">bzlib.c</code>,
2195
- <code class="computeroutput">compress.c</code>,
2196
- <code class="computeroutput">crctable.c</code>,
2197
- <code class="computeroutput">decompress.c</code>,
2198
- <code class="computeroutput">huffman.c</code>,
2199
- <code class="computeroutput">randtable.c</code> and
2200
- <code class="computeroutput">libbz2.def</code>. You will also need
2201
- to name the header files <code class="computeroutput">bzlib.h</code>
2202
- and <code class="computeroutput">bzlib_private.h</code>.</p>
2203
- <p>If you don't use VC++, you may need to define the
2204
- proprocessor symbol
2205
- <code class="computeroutput">_WIN32</code>.</p>
2206
- <p>Finally, <code class="computeroutput">dlltest.c</code> is a
2207
- sample program using the DLL. It has a project file,
2208
- <code class="computeroutput">dlltest.dsp</code>.</p>
2209
- <p>If you just want a makefile for Visual C, have a look at
2210
- <code class="computeroutput">makefile.msc</code>.</p>
2211
- <p>Be aware that if you compile
2212
- <code class="computeroutput">bzip2</code> itself on Win32, you must
2213
- set <code class="computeroutput">BZ_UNIX</code> to 0 and
2214
- <code class="computeroutput">BZ_LCCWIN32</code> to 1, in the file
2215
- <code class="computeroutput">bzip2.c</code>, before compiling.
2216
- Otherwise the resulting binary won't work correctly.</p>
2217
- <p>I haven't tried any of this stuff myself, but it all looks
2218
- plausible.</p>
2219
- </div>
2220
- </div>
2221
- <div class="chapter" lang="en">
2222
- <div class="titlepage"><div><div><h2 class="title">
2223
- <a name="misc"></a>4.�Miscellanea</h2></div></div></div>
2224
- <div class="toc">
2225
- <p><b>Table of Contents</b></p>
2226
- <dl>
2227
- <dt><span class="sect1"><a href="#limits">4.1. Limitations of the compressed file format</a></span></dt>
2228
- <dt><span class="sect1"><a href="#port-issues">4.2. Portability issues</a></span></dt>
2229
- <dt><span class="sect1"><a href="#bugs">4.3. Reporting bugs</a></span></dt>
2230
- <dt><span class="sect1"><a href="#package">4.4. Did you get the right package?</a></span></dt>
2231
- <dt><span class="sect1"><a href="#reading">4.5. Further Reading</a></span></dt>
2232
- </dl>
2233
- </div>
2234
- <p>These are just some random thoughts of mine. Your mileage
2235
- may vary.</p>
2236
- <div class="sect1" lang="en">
2237
- <div class="titlepage"><div><div><h2 class="title" style="clear: both">
2238
- <a name="limits"></a>4.1.�Limitations of the compressed file format</h2></div></div></div>
2239
- <p><code class="computeroutput">bzip2-1.0.X</code>,
2240
- <code class="computeroutput">0.9.5</code> and
2241
- <code class="computeroutput">0.9.0</code> use exactly the same file
2242
- format as the original version,
2243
- <code class="computeroutput">bzip2-0.1</code>. This decision was
2244
- made in the interests of stability. Creating yet another
2245
- incompatible compressed file format would create further
2246
- confusion and disruption for users.</p>
2247
- <p>Nevertheless, this is not a painless decision. Development
2248
- work since the release of
2249
- <code class="computeroutput">bzip2-0.1</code> in August 1997 has
2250
- shown complexities in the file format which slow down
2251
- decompression and, in retrospect, are unnecessary. These
2252
- are:</p>
2253
- <div class="itemizedlist"><ul type="bullet">
2254
- <li style="list-style-type: disc"><p>The run-length encoder, which is the first of the
2255
- compression transformations, is entirely irrelevant. The
2256
- original purpose was to protect the sorting algorithm from the
2257
- very worst case input: a string of repeated symbols. But
2258
- algorithm steps Q6a and Q6b in the original Burrows-Wheeler
2259
- technical report (SRC-124) show how repeats can be handled
2260
- without difficulty in block sorting.</p></li>
2261
- <li style="list-style-type: disc">
2262
- <p>The randomisation mechanism doesn't really need to be
2263
- there. Udi Manber and Gene Myers published a suffix array
2264
- construction algorithm a few years back, which can be employed
2265
- to sort any block, no matter how repetitive, in O(N log N)
2266
- time. Subsequent work by Kunihiko Sadakane has produced a
2267
- derivative O(N (log N)^2) algorithm which usually outperforms
2268
- the Manber-Myers algorithm.</p>
2269
- <p>I could have changed to Sadakane's algorithm, but I find
2270
- it to be slower than <code class="computeroutput">bzip2</code>'s
2271
- existing algorithm for most inputs, and the randomisation
2272
- mechanism protects adequately against bad cases. I didn't
2273
- think it was a good tradeoff to make. Partly this is due to
2274
- the fact that I was not flooded with email complaints about
2275
- <code class="computeroutput">bzip2-0.1</code>'s performance on
2276
- repetitive data, so perhaps it isn't a problem for real
2277
- inputs.</p>
2278
- <p>Probably the best long-term solution, and the one I have
2279
- incorporated into 0.9.5 and above, is to use the existing
2280
- sorting algorithm initially, and fall back to a O(N (log N)^2)
2281
- algorithm if the standard algorithm gets into
2282
- difficulties.</p>
2283
- </li>
2284
- <li style="list-style-type: disc"><p>The compressed file format was never designed to be
2285
- handled by a library, and I have had to jump though some hoops
2286
- to produce an efficient implementation of decompression. It's
2287
- a bit hairy. Try passing
2288
- <code class="computeroutput">decompress.c</code> through the C
2289
- preprocessor and you'll see what I mean. Much of this
2290
- complexity could have been avoided if the compressed size of
2291
- each block of data was recorded in the data stream.</p></li>
2292
- <li style="list-style-type: disc"><p>An Adler-32 checksum, rather than a CRC32 checksum,
2293
- would be faster to compute.</p></li>
2294
- </ul></div>
2295
- <p>It would be fair to say that the
2296
- <code class="computeroutput">bzip2</code> format was frozen before I
2297
- properly and fully understood the performance consequences of
2298
- doing so.</p>
2299
- <p>Improvements which I was able to incorporate into 0.9.0,
2300
- despite using the same file format, are:</p>
2301
- <div class="itemizedlist"><ul type="bullet">
2302
- <li style="list-style-type: disc"><p>Single array implementation of the inverse BWT. This
2303
- significantly speeds up decompression, presumably because it
2304
- reduces the number of cache misses.</p></li>
2305
- <li style="list-style-type: disc"><p>Faster inverse MTF transform for large MTF values.
2306
- The new implementation is based on the notion of sliding blocks
2307
- of values.</p></li>
2308
- <li style="list-style-type: disc"><p><code class="computeroutput">bzip2-0.9.0</code> now reads
2309
- and writes files with <code class="computeroutput">fread</code>
2310
- and <code class="computeroutput">fwrite</code>; version 0.1 used
2311
- <code class="computeroutput">putc</code> and
2312
- <code class="computeroutput">getc</code>. Duh! Well, you live
2313
- and learn.</p></li>
2314
- </ul></div>
2315
- <p>Further ahead, it would be nice to be able to do random
2316
- access into files. This will require some careful design of
2317
- compressed file formats.</p>
2318
- </div>
2319
- <div class="sect1" lang="en">
2320
- <div class="titlepage"><div><div><h2 class="title" style="clear: both">
2321
- <a name="port-issues"></a>4.2.�Portability issues</h2></div></div></div>
2322
- <p>After some consideration, I have decided not to use GNU
2323
- <code class="computeroutput">autoconf</code> to configure 0.9.5 or
2324
- 1.0.</p>
2325
- <p><code class="computeroutput">autoconf</code>, admirable and
2326
- wonderful though it is, mainly assists with portability problems
2327
- between Unix-like platforms. But
2328
- <code class="computeroutput">bzip2</code> doesn't have much in the
2329
- way of portability problems on Unix; most of the difficulties
2330
- appear when porting to the Mac, or to Microsoft's operating
2331
- systems. <code class="computeroutput">autoconf</code> doesn't help
2332
- in those cases, and brings in a whole load of new
2333
- complexity.</p>
2334
- <p>Most people should be able to compile the library and
2335
- program under Unix straight out-of-the-box, so to speak,
2336
- especially if you have a version of GNU C available.</p>
2337
- <p>There are a couple of
2338
- <code class="computeroutput">__inline__</code> directives in the
2339
- code. GNU C (<code class="computeroutput">gcc</code>) should be
2340
- able to handle them. If you're not using GNU C, your C compiler
2341
- shouldn't see them at all. If your compiler does, for some
2342
- reason, see them and doesn't like them, just
2343
- <code class="computeroutput">#define</code>
2344
- <code class="computeroutput">__inline__</code> to be
2345
- <code class="computeroutput">/* */</code>. One easy way to do this
2346
- is to compile with the flag
2347
- <code class="computeroutput">-D__inline__=</code>, which should be
2348
- understood by most Unix compilers.</p>
2349
- <p>If you still have difficulties, try compiling with the
2350
- macro <code class="computeroutput">BZ_STRICT_ANSI</code> defined.
2351
- This should enable you to build the library in a strictly ANSI
2352
- compliant environment. Building the program itself like this is
2353
- dangerous and not supported, since you remove
2354
- <code class="computeroutput">bzip2</code>'s checks against
2355
- compressing directories, symbolic links, devices, and other
2356
- not-really-a-file entities. This could cause filesystem
2357
- corruption!</p>
2358
- <p>One other thing: if you create a
2359
- <code class="computeroutput">bzip2</code> binary for public distribution,
2360
- please consider linking it statically (<code class="computeroutput">gcc
2361
- -static</code>). This avoids all sorts of library-version
2362
- issues that others may encounter later on.</p>
2363
- <p>If you build <code class="computeroutput">bzip2</code> on
2364
- Win32, you must set <code class="computeroutput">BZ_UNIX</code> to 0
2365
- and <code class="computeroutput">BZ_LCCWIN32</code> to 1, in the
2366
- file <code class="computeroutput">bzip2.c</code>, before compiling.
2367
- Otherwise the resulting binary won't work correctly.</p>
2368
- </div>
2369
- <div class="sect1" lang="en">
2370
- <div class="titlepage"><div><div><h2 class="title" style="clear: both">
2371
- <a name="bugs"></a>4.3.�Reporting bugs</h2></div></div></div>
2372
- <p>I tried pretty hard to make sure
2373
- <code class="computeroutput">bzip2</code> is bug free, both by
2374
- design and by testing. Hopefully you'll never need to read this
2375
- section for real.</p>
2376
- <p>Nevertheless, if <code class="computeroutput">bzip2</code> dies
2377
- with a segmentation fault, a bus error or an internal assertion
2378
- failure, it will ask you to email me a bug report. Experience from
2379
- years of feedback of bzip2 users indicates that almost all these
2380
- problems can be traced to either compiler bugs or hardware
2381
- problems.</p>
2382
- <div class="itemizedlist"><ul type="bullet">
2383
- <li style="list-style-type: disc">
2384
- <p>Recompile the program with no optimisation, and
2385
- see if it works. And/or try a different compiler. I heard all
2386
- sorts of stories about various flavours of GNU C (and other
2387
- compilers) generating bad code for
2388
- <code class="computeroutput">bzip2</code>, and I've run across two
2389
- such examples myself.</p>
2390
- <p>2.7.X versions of GNU C are known to generate bad code
2391
- from time to time, at high optimisation levels. If you get
2392
- problems, try using the flags
2393
- <code class="computeroutput">-O2</code>
2394
- <code class="computeroutput">-fomit-frame-pointer</code>
2395
- <code class="computeroutput">-fno-strength-reduce</code>. You
2396
- should specifically <span class="emphasis"><em>not</em></span> use
2397
- <code class="computeroutput">-funroll-loops</code>.</p>
2398
- <p>You may notice that the Makefile runs six tests as part
2399
- of the build process. If the program passes all of these, it's
2400
- a pretty good (but not 100%) indication that the compiler has
2401
- done its job correctly.</p>
2402
- </li>
2403
- <li style="list-style-type: disc">
2404
- <p>If <code class="computeroutput">bzip2</code>
2405
- crashes randomly, and the crashes are not repeatable, you may
2406
- have a flaky memory subsystem.
2407
- <code class="computeroutput">bzip2</code> really hammers your
2408
- memory hierarchy, and if it's a bit marginal, you may get these
2409
- problems. Ditto if your disk or I/O subsystem is slowly
2410
- failing. Yup, this really does happen.</p>
2411
- <p>Try using a different machine of the same type, and see
2412
- if you can repeat the problem.</p>
2413
- </li>
2414
- <li style="list-style-type: disc"><p>This isn't really a bug, but ... If
2415
- <code class="computeroutput">bzip2</code> tells you your file is
2416
- corrupted on decompression, and you obtained the file via FTP,
2417
- there is a possibility that you forgot to tell FTP to do a
2418
- binary mode transfer. That absolutely will cause the file to
2419
- be non-decompressible. You'll have to transfer it
2420
- again.</p></li>
2421
- </ul></div>
2422
- <p>If you've incorporated
2423
- <code class="computeroutput">libbzip2</code> into your own program
2424
- and are getting problems, please, please, please, check that the
2425
- parameters you are passing in calls to the library, are correct,
2426
- and in accordance with what the documentation says is allowable.
2427
- I have tried to make the library robust against such problems,
2428
- but I'm sure I haven't succeeded.</p>
2429
- <p>Finally, if the above comments don't help, you'll have to
2430
- send me a bug report. Now, it's just amazing how many people
2431
- will send me a bug report saying something like:</p>
2432
- <pre class="programlisting">bzip2 crashed with segmentation fault on my machine</pre>
2433
- <p>and absolutely nothing else. Needless to say, a such a
2434
- report is <span class="emphasis"><em>totally, utterly, completely and
2435
- comprehensively 100% useless; a waste of your time, my time, and
2436
- net bandwidth</em></span>. With no details at all, there's no way
2437
- I can possibly begin to figure out what the problem is.</p>
2438
- <p>The rules of the game are: facts, facts, facts. Don't omit
2439
- them because "oh, they won't be relevant". At the bare
2440
- minimum:</p>
2441
- <pre class="programlisting">Machine type. Operating system version.
2442
- Exact version of bzip2 (do bzip2 -V).
2443
- Exact version of the compiler used.
2444
- Flags passed to the compiler.</pre>
2445
- <p>However, the most important single thing that will help me
2446
- is the file that you were trying to compress or decompress at the
2447
- time the problem happened. Without that, my ability to do
2448
- anything more than speculate about the cause, is limited.</p>
2449
- </div>
2450
- <div class="sect1" lang="en">
2451
- <div class="titlepage"><div><div><h2 class="title" style="clear: both">
2452
- <a name="package"></a>4.4.�Did you get the right package?</h2></div></div></div>
2453
- <p><code class="computeroutput">bzip2</code> is a resource hog.
2454
- It soaks up large amounts of CPU cycles and memory. Also, it
2455
- gives very large latencies. In the worst case, you can feed many
2456
- megabytes of uncompressed data into the library before getting
2457
- any compressed output, so this probably rules out applications
2458
- requiring interactive behaviour.</p>
2459
- <p>These aren't faults of my implementation, I hope, but more
2460
- an intrinsic property of the Burrows-Wheeler transform
2461
- (unfortunately). Maybe this isn't what you want.</p>
2462
- <p>If you want a compressor and/or library which is faster,
2463
- uses less memory but gets pretty good compression, and has
2464
- minimal latency, consider Jean-loup Gailly's and Mark Adler's
2465
- work, <code class="computeroutput">zlib-1.2.1</code> and
2466
- <code class="computeroutput">gzip-1.2.4</code>. Look for them at
2467
- <a href="http://www.zlib.org" target="_top">http://www.zlib.org</a> and
2468
- <a href="http://www.gzip.org" target="_top">http://www.gzip.org</a>
2469
- respectively.</p>
2470
- <p>For something faster and lighter still, you might try Markus F
2471
- X J Oberhumer's <code class="computeroutput">LZO</code> real-time
2472
- compression/decompression library, at
2473
- <a href="http://www.oberhumer.com/opensource" target="_top">http://www.oberhumer.com/opensource</a>.</p>
2474
- </div>
2475
- <div class="sect1" lang="en">
2476
- <div class="titlepage"><div><div><h2 class="title" style="clear: both">
2477
- <a name="reading"></a>4.5.�Further Reading</h2></div></div></div>
2478
- <p><code class="computeroutput">bzip2</code> is not research
2479
- work, in the sense that it doesn't present any new ideas.
2480
- Rather, it's an engineering exercise based on existing
2481
- ideas.</p>
2482
- <p>Four documents describe essentially all the ideas behind
2483
- <code class="computeroutput">bzip2</code>:</p>
2484
- <div class="literallayout"><p>Michael�Burrows�and�D.�J.�Wheeler:<br>
2485
- ��"A�block-sorting�lossless�data�compression�algorithm"<br>
2486
- ���10th�May�1994.�<br>
2487
- ���Digital�SRC�Research�Report�124.<br>
2488
- ���ftp://ftp.digital.com/pub/DEC/SRC/research-reports/SRC-124.ps.gz<br>
2489
- ���If�you�have�trouble�finding�it,�try�searching�at�the<br>
2490
- ���New�Zealand�Digital�Library,�http://www.nzdl.org.<br>
2491
- <br>
2492
- Daniel�S.�Hirschberg�and�Debra�A.�LeLewer<br>
2493
- ��"Efficient�Decoding�of�Prefix�Codes"<br>
2494
- ���Communications�of�the�ACM,�April�1990,�Vol�33,�Number�4.<br>
2495
- ���You�might�be�able�to�get�an�electronic�copy�of�this<br>
2496
- ���from�the�ACM�Digital�Library.<br>
2497
- <br>
2498
- David�J.�Wheeler<br>
2499
- ���Program�bred3.c�and�accompanying�document�bred3.ps.<br>
2500
- ���This�contains�the�idea�behind�the�multi-table�Huffman�coding�scheme.<br>
2501
- ���ftp://ftp.cl.cam.ac.uk/users/djw3/<br>
2502
- <br>
2503
- Jon�L.�Bentley�and�Robert�Sedgewick<br>
2504
- ��"Fast�Algorithms�for�Sorting�and�Searching�Strings"<br>
2505
- ���Available�from�Sedgewick's�web�page,<br>
2506
- ���www.cs.princeton.edu/~rs<br>
2507
- </p></div>
2508
- <p>The following paper gives valuable additional insights into
2509
- the algorithm, but is not immediately the basis of any code used
2510
- in bzip2.</p>
2511
- <div class="literallayout"><p>Peter�Fenwick:<br>
2512
- ���Block�Sorting�Text�Compression<br>
2513
- ���Proceedings�of�the�19th�Australasian�Computer�Science�Conference,<br>
2514
- �����Melbourne,�Australia.��Jan�31�-�Feb�2,�1996.<br>
2515
- ���ftp://ftp.cs.auckland.ac.nz/pub/peter-f/ACSC96paper.ps</p></div>
2516
- <p>Kunihiko Sadakane's sorting algorithm, mentioned above, is
2517
- available from:</p>
2518
- <div class="literallayout"><p>http://naomi.is.s.u-tokyo.ac.jp/~sada/papers/Sada98b.ps.gz<br>
2519
- </p></div>
2520
- <p>The Manber-Myers suffix array construction algorithm is
2521
- described in a paper available from:</p>
2522
- <div class="literallayout"><p>http://www.cs.arizona.edu/people/gene/PAPERS/suffix.ps<br>
2523
- </p></div>
2524
- <p>Finally, the following papers document some
2525
- investigations I made into the performance of sorting
2526
- and decompression algorithms:</p>
2527
- <div class="literallayout"><p>Julian�Seward<br>
2528
- ���On�the�Performance�of�BWT�Sorting�Algorithms<br>
2529
- ���Proceedings�of�the�IEEE�Data�Compression�Conference�2000<br>
2530
- �����Snowbird,�Utah.��28-30�March�2000.<br>
2531
- <br>
2532
- Julian�Seward<br>
2533
- ���Space-time�Tradeoffs�in�the�Inverse�B-W�Transform<br>
2534
- ���Proceedings�of�the�IEEE�Data�Compression�Conference�2001<br>
2535
- �����Snowbird,�Utah.��27-29�March�2001.<br>
2536
- </p></div>
2537
- </div>
2538
- </div>
2539
- </div></body>
2540
- </html>