%!PS-Adobe-2.0 %%Creator: dvips(k) 5.78 Copyright 1998 Radical Eye Software (www.radicaleye.com) %%Title: manual.dvi %%Pages: 39 %%PageOrder: Ascend %%BoundingBox: 0 0 596 842 %%EndComments %DVIPSCommandLine: dvips -o manual.ps manual.dvi %DVIPSParameters: dpi=600, compressed %DVIPSSource: TeX output 2000.03.23:2343 %%BeginProcSet: texc.pro %! /TeXDict 300 dict def TeXDict begin /N{def}def /B{bind def}N /S{exch}N /X{S N}B /TR{translate}N /isls false N /vsize 11 72 mul N /hsize 8.5 72 mul N /landplus90{false}def /@rigin{isls{[0 landplus90{1 -1}{-1 1} ifelse 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[matrix currentmatrix{dup dup round sub abs 0.00001 lt{round}if} forall round exch round exch]setmatrix}N /@landscape{/isls true N}B /@manualfeed{statusdict /manualfeed true put}B /@copies{/#copies X}B /FMat[1 0 0 -1 0 0]N /FBB[0 0 0 0]N /nn 0 N /IE 0 N /ctr 0 N /df-tail{ /nn 8 dict N nn begin /FontType 3 N /FontMatrix fntrx N /FontBBox FBB N string /base X array /BitMaps X /BuildChar{CharBuilder}N /Encoding IE N end dup{/foo setfont}2 array copy cvx N load 0 nn put /ctr 0 N[}B /df{ /sf 1 N /fntrx FMat N df-tail}B /dfs{div /sf X /fntrx[sf 0 0 sf neg 0 0] N df-tail}B /E{pop nn dup definefont setfont}B /ch-width{ch-data dup length 5 sub get}B /ch-height{ch-data dup length 4 sub get}B /ch-xoff{ 128 ch-data dup length 3 sub get sub}B /ch-yoff{ch-data dup length 2 sub get 127 sub}B /ch-dx{ch-data dup length 1 sub get}B /ch-image{ch-data dup type /stringtype ne{ctr get /ctr ctr 1 add N}if}B /id 0 N /rw 0 N /rc 0 N /gp 0 N /cp 0 N /G 0 N /sf 0 N /CharBuilder{save 3 1 roll S dup /base get 2 index get S /BitMaps get S get /ch-data X pop /ctr 0 N ch-dx 0 ch-xoff ch-yoff ch-height sub ch-xoff ch-width add ch-yoff setcachedevice ch-width ch-height true[1 0 0 -1 -.1 ch-xoff sub ch-yoff .1 sub]/id ch-image N /rw ch-width 7 add 8 idiv string N /rc 0 N /gp 0 N /cp 0 N{rc 0 ne{rc 1 sub /rc X rw}{G}ifelse}imagemask restore}B /G{{id gp get /gp gp 1 add N dup 18 mod S 18 idiv pl S get exec}loop}B /adv{cp add /cp X}B /chg{rw cp id gp 4 index getinterval putinterval dup gp add /gp X adv}B /nd{/cp 0 N rw exit}B /lsh{rw cp 2 copy get dup 0 eq{pop 1}{ dup 255 eq{pop 254}{dup dup add 255 and S 1 and or}ifelse}ifelse put 1 adv}B /rsh{rw cp 2 copy get dup 0 eq{pop 128}{dup 255 eq{pop 127}{dup 2 idiv S 128 and or}ifelse}ifelse put 1 adv}B /clr{rw cp 2 index string putinterval adv}B /set{rw cp fillstr 0 4 index getinterval putinterval adv}B /fillstr 18 string 0 1 17{2 copy 255 put pop}for N /pl[{adv 1 chg} {adv 1 chg nd}{1 add chg}{1 add chg nd}{adv lsh}{adv lsh nd}{adv rsh}{ adv rsh nd}{1 add adv}{/rc X nd}{1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]dup{bind pop}forall N /D{/cc X dup type /stringtype ne{] }if nn /base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{dup dup length 1 sub dup 2 index S get sf div put}if put /ctr ctr 1 add N}B /I{ cc 1 add D}B /bop{userdict /bop-hook known{bop-hook}if /SI save N @rigin 0 0 moveto /V matrix currentmatrix dup 1 get dup mul exch 0 get dup mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N /eop{SI restore userdict /eop-hook known{eop-hook}if showpage}N /@start{userdict /start-hook known{start-hook}if pop /VResolution X /Resolution X 1000 div /DVImag X /IE 256 array N 2 string 0 1 255{IE S dup 360 add 36 4 index cvrs cvn put}for pop 65781.76 div /vsize X 65781.76 div /hsize X}N /p{show}N /RMat[1 0 0 -1 0 0]N /BDot 260 string N /rulex 0 N /ruley 0 N /v{/ruley X /rulex X V}B /V{}B /RV statusdict begin /product where{pop false[ (Display)(NeXT)(LaserWriter 16/600)]{dup length product length le{dup length product exch 0 exch getinterval eq{pop true exit}if}{pop}ifelse} forall}{false}ifelse end{{gsave TR -.1 .1 TR 1 1 scale rulex ruley false RMat{BDot}imagemask grestore}}{{gsave TR -.1 .1 TR rulex ruley scale 1 1 false RMat{BDot}imagemask grestore}}ifelse B /QV{gsave newpath transform round exch round exch itransform moveto rulex 0 rlineto 0 ruley neg rlineto rulex neg 0 rlineto fill grestore}B /a{moveto}B /delta 0 N /tail {dup /delta X 0 rmoveto}B /M{S p delta add tail}B /b{S p tail}B /c{-4 M} B /d{-3 M}B /e{-2 M}B /f{-1 M}B /g{0 M}B /h{1 M}B /i{2 M}B /j{3 M}B /k{ 4 M}B /w{0 rmoveto}B /l{p -4 w}B /m{p -3 w}B /n{p -2 w}B /o{p -1 w}B /q{ p 1 w}B /r{p 2 w}B /s{p 3 w}B /t{p 4 w}B /x{0 S rmoveto}B /y{3 2 roll p a}B /bos{/SS save N}B /eos{SS restore}B end %%EndProcSet TeXDict begin 39158280 55380996 1000 600 600 (manual.dvi) @start %DVIPSBitmapFont: Fa cmti10 10.95 1 /Fa 1 47 df<120FEA3FC0127FA212FFA31380EA7F00123C0A0A77891C>46 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fb cmbxti10 14.4 1 /Fb 1 47 df<13FCEA03FF000F13804813C05AA25AA2B5FCA31480A214006C5A6C5A6C5A EA0FE0121271912B>46 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fc cmsl10 10.95 25 /Fc 25 122 df37 D44 D48 D<157015F014011407143F903803FFE0137FEBFFCFEBF80F1300 141F15C0A5143F1580A5147F1500A55C5CA513015CA513035CA513075CA5130F5CA3131F 497EB612F8A31D3D78BC2D>I<133C137F5B481380A31400A26C5A137890C7FCB3EA0780 EA0FE0121F123FA5121FEA0F601200A213E05BA212015B120390C7FC5A1206120E5A5A12 3012705A5A11397AA619>59 D97 DIIIII<147FEB3FFFA313017FA25CA513015CA51303 5CA4ED07F80107EB1FFF9139F0781FC09138F1E00F9139F38007E0ECF70002FE14F0495A 5CA25CA24A130F131F4A14E0A4161F133F4A14C0A4163F137F91C71380A4167F5B491500 A300015D486C491380B5D8F87F13FCA32E3F7DBE33>104 D<1478EB01FE130314FFA25B 14FE130314FCEB00F01400ACEB03F8EA01FF14F0A2EA001F130FA314E0A5131F14C0A513 3F1480A5137F1400A55B5BA4EA03FF007F13F0A2B5FC183E7DBD1A>I<143FEB1FFF5BA2 13017FA214FEA5130114FCA5130314F8A5130714F0A5130F14E0A5131F14C0A5133F1480 A5137F1400A55B5BA4EA03FF007F13F8A2B5FC183F7DBE1A>108 D<902707F007F8EB03FCD803FFD91FFF90380FFF80913CE0781FC03C0FE09126E1E00FEB F0073E001FE38007E1C003F090260FE700EBE38002EEDAF70013F802FC14FE02D85C14F8 4A5CA24A5C011F020F14074A4A14F0A5013F021F140F4A4A14E0A5017F023F141F91C749 14C0A549027F143F4992C71380A300014B147F486C496DEBFFC0B5D8F87FD9FC3F13FEA3 47287DA74C>I<903907F007F8D803FFEB1FFF9139E0781FC09138E1E00F3B001FE38007 E090380FE70002EE14F014FC14D814F85CA24A130F131F4A14E0A4161F133F4A14C0A416 3F137F91C71380A4167F5B491500A300015D486C491380B5D8F87F13FCA32E287DA733> II<91387F01FE903A7FFF0FFFC09139FE3E03F09238F801F890 3A01FFE000FE4B137F6D497F4990C713804A15C04A141FA218E0A20103150F5C18F0A317 1F010716E05CA3173F18C0130F4A147F1880A2EFFF004C5A011F5D16034C5A6E495AEE1F C06E495AD93FDC017EC7FC91388F01F8913883FFE0028090C8FC92C9FC137FA291CAFCA4 5BA25BA31201487EB512F8A3343A81A733>I<903907F01F80D803FFEB7FE09138E1E1F0 9138E387F839001FE707EB0FE614EE02FC13F002D813E09138F801804AC7FCA25C131FA2 5CA4133F5CA5137F91C8FCA55B5BA31201487EB512FEA325287EA724>114 D<9138FF81C0010713E390381F807F90397C003F8049131F4848130F5B00031407A24848 1400A27FA27F6D90C7FCEBFF8014FC6C13FF6C14C015F06C6C7F011F7F13079038007FFE 1403140100381300157EA2123C153E157E007C147CA2007E147815F8007F495A4A5A486C 485A26F9E01FC7FC38E0FFFC38C01FE0222A7DA824>II<01FE147F00FFEC7FFF4914FEA20007140300031401A34914FCA4 150312074914F8A41507120F4914F0A4150F121F4914E0A2151FA3153F4914C0157F15FF EC01DF3A0FC003BFE09138073FFF3803F01E3801FFF826003FE01380282977A733>III<90B539E007FFF05E18E0902707FE000313006D48EB01FC 705A5F01014A5A5F16036E5C0100140794C7FC160E805E805E1678ED8070023F13F05EED 81C015C191381FC38015C793C8FC15EF15EEEC0FFCA25DA26E5AA25DA26E5A5DA24AC9FC 5C140E141E141C5C121C003F5B5A485B495A130300FE5B4848CAFCEA701EEA783CEA3FF0 EA0FC0343A80A630>121 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fd cmtt12 14.4 10 /Fd 10 123 df50 D<383FFF805AB57EA37E7EEA003FAEED07FC92383FFF 8092B512E002C314F802CF8002DF8091B7FCDBF80F1380DBC00113C092C713E04A143F4A EC1FF04A15F84A140F4AEC07FCA217034A15FE1701A318FF83A95F18FEA280170318FC6E 140718F86E140FEF1FF06E143F6EEC7FE06EECFFC0DBC0031380EDF01F92B6120002DF14 FC02CF5C02C35CD91F8114C090260F807F90C7FC90C7EA0FF8384A7FC83E>98 D<923803FFF85D4B7FA38181ED0003AEEC1FF0ECFFFE0103EBFF83010F14E34914F3017F 14FB90B7FC48EBF80F48EBC00191C7FC4848143F4848141F5B4848140F491407123F4914 03127F5BA312FF90C8FCA97F127FA216077F123F6D140FA26C6C141F6D143F000F157F6C 6C14FF01FF5B6C6D5A6CD9F01FEBFFFC6C90B500FB13FE6D02F313FF6D14E3010F14C36D 020113FE010101FC14FC9026003FE0C8FC384A7CC83E>100 D<143E147F4A7E497FA56D 5B6EC8FC143E91C9FCAC003FB57E5A81A47EC7123FB3B3007FB71280B812C0A56C16802A 4A76C93E>105 D<007FB512C0B6FC81A47EC7121FB3B3B3A5007FB712F8B812FCA56C16 F82E4978C83E>108 D111 DI<903901FFF00F011F9038 FE1F8090B612BF000315FF5A5A5A393FFE003F01F01307D87FC0130190C8FC5A48157FA4 7EEE3F00D87FC091C7FC13F0EA3FFE381FFFF06CEBFFC06C14FE6C6E7EC615E0013F14F8 010780D9003F7F02007F03071380030013C0003EED3FE0007F151F48150F17F06D1407A3 7FA26D140F6D15E0161F01FCEC3FC06D14FF9026FFC00F138091B612005E485D013F5C6D 14E0D8FC0714802778007FF8C7FC2C3677B43E>115 D<147C14FC497EAD003FB712FC5A B87EA36C5EA2260001FEC9FCB3A6173FA2EF7F80A76E14FF6D16006F5A9238C007FE9138 7FF01F92B55A6E5C6E5C6E5C6E1480020149C7FC9138003FF031437DC13E>I<000FB812 804817C04817E0A418C001C0C712014C13804C1300EE1FFE4C5AEE7FF06C484A5A4B5BC8 485B4B90C7FC4B5A4B5A4B5A4B5A4B5A4A5B4A5B4A90C8FC4A5A4A5A4A5A4A5A4A5A495B 495B4990C9FC495A495A4948EC0FC0495A4948EC1FE0485B00075B4890C8FCEA1FFC485A 485A90B8FCB9FCA46C17C07E33337CB23E>122 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fe cmtt12 13.14 31 /Fe 31 123 df50 D<003FB6FC4815E0B712F882826C816C16802701FC000113C0 9238007FE0161FEE0FF0A2160717F81603A6160717F0A2160FEE1FE0163FEE7FC0923801 FF80030F130090B65A5E16F08216FEEEFF8017C001FCC7EA7FE0EE1FF0EE07F8160317FC EE01FE1600A217FF177FA717FF17FE16011603EE07FC160FEE3FF8EEFFF0003FB7FC4816 E0B812C01780EEFE006C15F86C15C030437DC238>66 DI<007FB512F8B7FC16C08216F8826C813A03F8001FFF15 07030113806F13C0167FEE3FE0161FEE0FF0A2EE07F8A2EE03FCA21601A217FE1600A417 7FAD17FF17FEA4160117FCA2160317F81607A2EE0FF0161FEE3FE0167FEEFFC04B13805D 031F1300007FB65AB75A5E5E16C093C7FC6C14F830437DC238>I<007FB712FCB87EA57E D801FCC8FCA9177C94C7FCA6ED07C04B7EA590B6FCA79038FC000FA56F5A92C9FCA7EF0F 80EF1FC0AA007FB8FCB9FCA56C178032437DC238>I<91391FF003C091397FFC07E049B5 FC010714CF4914EF4914FF5B90387FF81F9038FFE00748EB800191C7FC4848147F485A49 143F485A161F485AA249140F123F5BA2127F90C8EA07C093C7FCA35A5AAA923807FFFC4B 13FE4B13FF7E7E6F13FE6F13FC9238000FE07F003F151FA27F121F7F163F6C7EA26C6C14 7F7F6C6C14FF6C6C5B6E5A6C6D5A90387FF81F6DB6FC6D14EF6D14CF6D148F0101140F90 3A007FFC07C0DA1FF0C7FC30457CC338>71 D<007FB612F0B712F8A56C15F0260001FCC7 FCB3B3B1007FB612F0B712F8A56C15F0254377C238>73 D<90380FFFFE90B612E0000315 F8488148814881A2273FFE000F138001F01301497F49147F4848EC3FC0A290C8121FA448 16E0A248150FB3AC6C151FA36C16C0A36D143FA36C6CEC7F806D14FF6D5B01FE130F6CB7 1200A26C5D6C5D6C5DC615E0010F49C7FC2B457AC338>79 D<003FB512F04814FEB77E16 E0826C816C813A01FC003FFEED07FF03017F81707E163F161F83160FA7161F5F163F167F 4C5A5D030790C7FCED3FFE90B65A5E5E5EA282829038FC001FED07FC6F7E150115008282 AA18E0EF01F0EF03F8A31783EE3F87263FFFE0ECC7F0486D14FFB56C7F18E07013C06C49 6D13806C496D1300CA12FC35447EC238>82 D<003FB8FC481780B9FCA53BFE0007F0003F A9007CEE1F00C792C7FCB3B3A70107B512F04980A56D5C31437DC238>84 D<267FFFF090387FFFF0B56C90B512F8A56C496D13F0D801FCC73801FC00B3B3A66D1403 00005EA36D14076D5D6E130F6D6C495A6E133F6D6C495A6D6C495AECFF076D90B5C7FC6D 5C6D5C6D5C023F13E0020F1380DA03FEC8FC35447FC238>I87 D<001FB712F04816F85AA417F090C8121F17E0EE3FC0167F1780EEFF00A24B5A4B5A123E C8485A4B5AA24B5A4B5AA24B5A4BC7FCA24A5A14035D4A5A140F5D4A5A143F5D4A5A14FF 92C8FC495A13035C495AA2495A495AA2495A495A17F849C7EA01FC485AA2485A485AA248 5A121F5B485A127F90B7FCB8FCA56C16F82E437BC238>90 D<003FB712804816C0B812E0 A46C16C06C16802B087A7D38>95 D97 DIIIII<14F0497E497E497EA4 6D5A6D5A6D5A91C8FCAB383FFFFC487FB5FCA37E7EC7FCB3AF007FB612F0B712F816FCA3 16F86C15F0264476C338>105 D<387FFFFEB6FCA57EC77EB3B3B1007FB7FCB81280A56C 1600294379C238>108 D<023FEB07E03B3FE0FFC01FF8D87FF39038E07FFCD8FFF76D48 7E90B500F97F15FB6C91B612806C01C1EBF83F00030100EBE01F4902C013C0A24990387F 800FA2491400A349137EB3A73C3FFF03FFE07FFC4801879038F0FFFEB500C76D13FFA36C 01874913FE6C01039038E07FFC383080AF38>IIII114 D<903907FF80F0017FEBF1F848B5 12FD000714FF5A5A5AEBFC00D87FE0131F0180130F48C71207481403A5007FEC01F001C0 90C7FCEA3FF013FE381FFFF86CEBFFC0000314F8C614FF013F1480010714E0D9003F13F0 020013F8ED0FFC1503003CEC01FE007E140000FE15FF167F7EA37F6D14FF16FE01F01303 6DEB07FC01FF137F91B512F816F016E04815C0D8FC3F1400010F13FCD8780113E0283278 B038>III<000FB712FC4816FE5AA417 FC0180C7EA1FF8EE3FF0EE7FE0EEFFC04B13804B13006CC7485AC8485A4B5A4B5A4B5A4B 5A4A5B4A90C7FCEC07FC4A5A4A5A4A5A4A5A49485A4990C8FC495A495A495A495A494814 7C494814FE485B4890C8FC485A485A485A485A48B7FCB8FCA56C16FC2F2F7DAE38>122 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Ff cmbx12 13.14 53 /Ff 53 122 df<923807FFE092B512FC020714FF021F81027F9038007FC0902601FFF0EB 0FE04901C0497E4990C7487ED90FFC147F011F824A14FF495AA2137F5CA2715A715A715A EF078094C8FCA7EF07FCB9FCA526007FF0C7123F171FB3B3A2003FB5D8E00FB512F8A53D 4D7ECC44>12 D45 DI<177817F8EE01FCA21603A2EE07F8A217F016 0FA217E0161FA2EE3FC0A21780167FA217005EA24B5AA25E1503A24B5AA25E150FA25E15 1FA24B5AA25E157FA24BC7FCA25D1401A25D1403A24A5AA25D140FA24A5AA25D143FA25D 147FA24AC8FCA25C1301A25C1303A2495AA25C130FA2495AA25C133FA25C137FA249C9FC A25B1201A2485AA25B1207A25B120FA2485AA25B123FA25B127FA248CAFCA25AA2127CA2 2E6D79D13D>I<15F014011407141F147FEB03FF137FB6FCA313FC1380C7FCB3B3B2007F B712E0A52B4777C63D>49 DIIIII<121F7F7F13FE90B812E0A45A18C0188018005F5FA25F485E90C8 EA07E0007E4B5A5F007C151F4CC7FC167E5E485D15014B5A4B5AC8485A4B5AA24BC8FC15 7EA25D1401A24A5A1407A24A5AA2141FA24A5AA2147FA314FFA3495BA45BA55BAA6D5BA2 6D90C9FCEB007C334B79C93D>III65 D<93261FFF80EB01C00307B500F81303033F02FE13074AB7EAC00F0207EEE03F021F903A FE007FF87F027F01E0903807FCFF91B5C70001B5FC010301FC6E7E4901F0151F4901C081 4949814990C97E494882494882485B48197F4A173F5A4A171F5A5C48190FA2485B1A07A2 5AA297C7FC91CDFCA2B5FCAD7EA280A2F207C07EA36C7FA26C190F6E18807E6E171F6C1A 006E5F6C193E6C6D177E6D6C5F6D6C4C5A6D6D15036D6D4B5A6D01F04B5A6D01FCED3FC0 010001FFEDFF806E01E0D903FEC7FC021F01FEEB3FFC020790B612F002015EDA003F92C8 FC030714FCDB001F13804A4D79CB59>67 D III<93261FFF80EB01C00307B500F8 1303033F02FE13074AB7EAC00F0207EEE03F021F903AFE007FF87F027F01E0903807FCFF 91B5C70001B5FC010301FC6E7E4901F0151F4901C0814949814990C97E49488249488248 5B48197F4A173F5A4A171F5A5C48190FA2485B1A07A25AA297C8FC91CEFCA2B5FCAD6C04 0FB712C0A280A36C93C7001FEBC000A2807EA27E807E807E806C7F7E6D7E6D7E6D7F6D01 E05D6D6D5D6D13FC010001FF4AB5FC6E01E0EB07F9021F01FFEB3FF0020791B5EAE07F02 01EEC01FDA003FED0007030702F81301DB001F018090C8FC524D79CB61>III76 DII II82 DI<003FBB12C0A5DA80019038FC001FD9FC001601D8 7FF09438007FE001C0183F49181F90C7170FA2007E1907A3007C1903A500FC1AF0481901 A5C894C7FCB3B3A749B812FCA54C4A7CC955>III89 D97 DI<91380FFF8091B512F8 010314FF010F15804948C613C0D97FF8EB1FE0D9FFE0EB3FF04849137F4849EBFFF84890 C7FCA2485A121FA24848EC7FF0EE3FE0EE1FC0007F92C7FC5BA212FFAC127FA27FA2123F A26C6C153EA26C6C157E177C6C6D14FC6C6D14F86C6D13036C6DEB07F0D97FFCEB1FE06D B4EBFFC0010F90B5120001035C010014F0020F13802F347CB237>IIIIII<13FCEA03FF487F487FA2487FA66C5BA26C5B6C90C7FCEA00FC90C8 FCABEB7FC0B5FCA512037EB3B3A2B61280A5194D7BCC22>I108 D<90287FC001FFC0EC7FF0B5010F01FC0103B5FC033F 6D010F804B6D4980DBFE079026803F817F9126C1F801903AC07E007FF00003D9C3E0DAE0 F8806C9026C78000D9F1E06D7E02CFC7EBF3C002DEEDF780DD7FFF6E7E02FC93C7FC4A5D A24A5DA34A5DB3AAB6D8C03FB5D8F00FB512FCA55E327BB167>I<903A7FC001FFC0B501 0F13F8033F7F4B13FFDBFE077F9138C1F00300039026C3E0017F6CD9C78080ECCF0014DE 02DC6D7F14FC5CA25CA35CB3AAB6D8C07FEBFFE0A53B327BB144>I<913807FF80027F13 F80103B6FC010F15C090261FFE017F903A7FF0003FF849486D7E480180EB07FE4890C76C 7E4817804980000F17C048486E13E0A2003F17F0A249157F007F17F8A400FF17FCAB007F 17F8A46C6CEDFFF0A2001F17E0A26C6C4A13C0A26C6C4A13806C6D4913006C5E6C01E0EB 1FFC6D6C495A903A3FFE01FFF0010FB612C0010392C7FCD9007F13F80207138036347DB2 3D>I<90397FC007FFB5017F13E002C1B512FC02C714FF9126CFF80F7F9126DFC0037F00 0301FFC77F6C496E7E02F8814A6E7E717E4A81831980A28319C0A37113E0AC19C05FA319 805F19005F606E143F6E5D4D5A6E4A5A02FF495BDBC0075B9126EFF01F5B02E7B548C7FC 02E114F8DAE07F13E0DB0FFEC8FC92CAFCAFB612C0A53B477CB144>I<9039FF803FE0B5 EBFFF8028113FE02837FDA87E11380EC8F830003D99F0713C06C139E14BCA214F8A24A6C 13806F13006F5A4A90C7FCA45CB3A8B612E0A52A327CB132>114 D<903907FF8070017FEBF1F048B6FC1207380FFC01391FE0003F4848130F491307127F90 C71203A2481401A27FA27F01F090C7FC13FCEBFFC06C13FEECFFE06C14FC6C806CECFF80 6C15C06C15E06C15F06C7E011F14F8010114FCEB000FEC007FED1FFE0078140F00F81407 15037E1501A27E16FC7E15036D14F86D13076D14F001F8EB1FE001FFEBFFC04890B51280 486C1400D8F81F13FCD8E00313C027347CB230>I<14F8A51301A41303A21307A2130FA2 131F133F137F13FF1203000F90B512F0B7FCA426007FF8C7FCB3A7167CAA013F14F880A2 90391FFE01F0010F1303903907FF87E06DEBFFC06D14806D6C1300EC0FFC26467EC430> IIII<007FB500C090387FFFE0A5C601F0C73803F8006E5D017F5E6E140701 3F5E80170F011F5E6E141F6D93C7FC6F5B6D153E6F137E6D157C6F13FCA26D6D5B16016D 5DEDF803027F5CEDFC07023F5CEDFE0F021F5C15FF161F6E91C8FC16BF6E13BE16FE6E5B A26E5BA36E5BA26F5AA26F5AA26F5AA393C9FC5D153E157E157CD81F8013FC486C5B387F E001D8FFF05B14035D14074A5A49485A007F133F4948CAFC383F81FE381FFFF86C5B6C13 C0C648CBFC3B477EB041>121 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fg cmtt12 17.28 6 /Fg 6 123 df<913803FFC0023F13FC49B67E010715F04981013F15FE498190B812C048 8348D9FC0180489026E0001F7F480180130391C87F48486F7E49153F4848ED0FFF834848 178083496F13C012FF8319E07FA2187FA36C5A6C5A6C5ACBFCA218FFA219C05FA219805F A24D13005F604D5A173F4D5A4D5AA24C5B4C5B4C5B041F90C7FC4C5A4C5A4C5A4B5B4B5B 4B5B031F5B4B90C8FC4B5AEDFFF84A5B4A5B4A5B021F5B4A90C9FCEC7FFC4A5A495B495B 010F5B495B4948CAFC4948ED1F804948ED3FC04849ED7FE0485B000F5B4890C9FC4890B8 FC5ABAFCA56C18C06C18803B5A79D94A>50 D<383FFFF0487F80B5FCA37EA27EEA000FB0 EE0FFC93B57E030714E0031F14F84B14FE92B7FC02FD8291B87E85DCE01F7FEE000703FC 01017F4B6D7F03E0143F4B6E7E4B140F8592C87E4A6F1380A34A6F13C0A284A21AE0A219 7FAA19FFA21AC0A26E5DA24E138080606F1600606F4A5A6F143F6F4A5A6F4A5A6F130303 FF010F5BDCC03F5B93B65A6102FD93C7FC02FC5D6F5C031F14F0902607F80714C0902603 F00191C8FC90C8EA3FF043597FD74A>98 D105 D<003FB512FE4880B77EA57E7EC71201B3B3B3 B0003FB812FC4817FEBAFCA56C17FE6C17FC385877D74A>108 D 112 D<000FB912E04818F04818F8A619F001F0C8000313E04D13C04D13804D13004D5A4D 5A4D5A6C484A5B6C484A5BC9000F5B4C5B4C90C7FC4C5A4C5A4B5B4B5B4B5B4B5B4B5B4B 90C8FC4B5A4B5A4A5B4A5B4A5B4A5B4A5B4A90C9FC4A5A4A5A495B495B495B4949EC07E0 4949EC0FF04948C8EA1FF8495A495A485B485B485B485B4890C9FC485A48B9FCBAFCA66C 18F06C18E03D3E7BBD4A>122 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fh cmbx12 17.28 28 /Fh 28 120 df<16F04B7E1507151F153FEC01FF1407147F010FB5FCB7FCA41487EBF007 C7FCB3B3B3B3007FB91280A6395E74DD51>49 D<913801FFF8021FEBFFC091B612F80103 15FF010F16C0013F8290267FFC0114F89027FFE0003F7F4890C7000F7F48486E7FD807F8 6E148048486E14C048486E14E048486F13F001FC17F8486C816D17FC6E80B56C16FE8380 A219FFA283A36C5BA26C5B6C90C8FCD807FC5DEA01F0CA14FEA34D13FCA219F85F19F04D 13E0A294B512C019804C14004C5B604C5B4C5B604C13804C90C7FC4C5A4C5A4B13F05F4B 13804B90C8FC4B5AED1FF84B5A4B5A4B48143F4A5B4A48C8FC4A5A4A48157E4A5A4A5AEC 7F8092C9FC02FE16FE495A495A4948ED01FCD90FC0150749B8FC5B5B90B9FC5A4818F85A 5A5A5A5ABAFCA219F0A4405E78DD51>I<92B5FC020F14F8023F14FF49B712C04916F001 0FD9C01F13FC90271FFC00077FD93FE001017F49486D8049C86C7F484883486C6F7F14C0 486D826E806E82487FA4805CA36C5E4A5E6C5B6C5B6C495E011FC85A90C95CA294B55A61 4C91C7FC604C5B4C5B4C5B4C5B047F138092260FFFFEC8FC020FB512F817E094C9FC17F8 17FF91C7003F13E0040713F8040113FE707F717F7113E085717FA2717F85A285831A80A3 1AC0EA03FCEA0FFF487F487F487FA2B57EA31A80A34D14005C7E4A5E5F6C495E49C8485B D81FF85F000F5ED807FE92B55A6C6C6C4914806C01F0010791C7FC6C9026FF803F5B6D90 B65A011F16F0010716C001014BC8FCD9001F14F0020149C9FC426079DD51>II<4DB5ED03C0057F02F0 14070407B600FE140F047FDBFFC0131F4BB800F0133F030F05FC137F033F9127F8007FFE 13FF92B6C73807FF814A02F0020113C3020702C09138007FE74A91C9001FB5FC023F01FC 16074A01F08291B54882490280824991CB7E49498449498449498449865D49498490B5FC 484A84A2484A84A24891CD127FA25A4A1A3F5AA348491A1FA44899C7FCA25CA3B5FCB07E A380A27EA2F50FC0A26C7FA37E6E1A1F6C1D80A26C801D3F6C6E1A00A26C6E616D1BFE6D 7F6F4E5A7F6D6D4E5A6D6D4E5A6D6D4E5A6D6E171F6D02E04D5A6E6DEFFF806E01FC4C90 C7FC020F01FFEE07FE6E02C0ED1FF8020102F8ED7FF06E02FF913803FFE0033F02F8013F 1380030F91B648C8FC030117F86F6C16E004071680DC007F02F8C9FC050191CAFC626677 E375>67 D72 DI77 D80 D<001FBEFCA64849C79126E0000F148002E0180091 C8171F498601F81A0349864986A2491B7FA2491B3F007F1DC090C9181FA4007E1C0FA600 FE1DE0481C07A5CA95C7FCB3B3B3A3021FBAFCA663617AE070>84 D<913803FFFE027FEBFFF00103B612FE010F6F7E4916E090273FFE001F7FD97FE001077F D9FFF801017F486D6D7F717E486D6E7F85717FA2717FA36C496E7FA26C5B6D5AEB1FC090 C9FCA74BB6FC157F0207B7FC147F49B61207010F14C0013FEBFE004913F048B512C04891 C7FC485B4813F85A5C485B5A5CA2B55AA45FA25F806C5E806C047D7F6EEB01F96C6DD903 F1EBFF806C01FED90FE114FF6C9027FFC07FC01580000191B5487E6C6C4B7E011F02FC13 0F010302F001011400D9001F90CBFC49437CC14E>97 D<903807FF80B6FCA6C6FC7F7FB3 A8EFFFF8040FEBFF80047F14F00381B612FC038715FF038F010014C0DBBFF0011F7FDBFF C001077F93C76C7F4B02007F03F8824B6F7E4B6F13804B17C0851BE0A27313F0A21BF8A3 7313FCA41BFEAE1BFCA44F13F8A31BF0A24F13E0A24F13C06F17804F1300816F4B5A6F4A 5B4AB402075B4A6C6C495B9126F83FE0013F13C09127F00FFC03B55A4A6CB648C7FCDAC0 0115F84A6C15E091C7001F91C8FC90C8000313E04F657BE35A>I<92380FFFF04AB67E02 0F15F0023F15FC91B77E01039039FE001FFF4901F8010113804901E0010713C049018049 13E0017F90C7FC49484A13F0A2485B485B5A5C5A7113E0485B7113C048701380943800FE 0095C7FC485BA4B5FCAE7EA280A27EA2806C18FCA26C6D150119F87E6C6D15036EED07F0 6C18E06C6D150F6D6DEC1FC06D01E0EC7F806D6DECFF00010701FCEB03FE6D9039FFC03F FC010091B512F0023F5D020F1580020102FCC7FCDA000F13C03E437BC148>II<92380FFFC0 4AB512FC020FECFF80023F15E091B712F80103D9FE037F499039F0007FFF011F01C0011F 7F49496D7F4990C76C7F49486E7F48498048844A804884485B727E5A5C48717EA35A5C72 1380A2B5FCA391B9FCA41A0002C0CBFCA67EA380A27EA27E6E160FF11F806C183F6C7FF1 7F006C7F6C6D16FE6C17016D6C4B5A6D6D4A5A6D01E04A5A6D6DEC3FE0010301FC49B45A 6D9026FFC01F90C7FC6D6C90B55A021F15F8020715E0020092C8FC030713F041437CC14A >III<903807FF80B6FCA6C6FC7F7FB3A8EF1FFF94B512F0040714 FC041F14FF4C8193267FE07F7F922781FE001F7FDB83F86D7FDB87F07FDB8FC0814C7F03 9FC78015BE03BC8003FC825DA25DA25DA45DB3B2B7D8F007B71280A651647BE35A>II<903807FF80B6 FCA6C6FC7F7FB3B3B3B3ADB712E0A623647BE32C>108 D<902607FF80D91FFFEEFFF8B6 91B500F00207EBFF80040702FC023F14E0041F02FF91B612F84C6F488193267FE07F6D48 01037F922781FE001F9027E00FF0007FC6DA83F86D9026F01FC06D7F6DD987F06D4A487F 6DD98FC0DBF87EC7804C6D027C80039FC76E488203BEEEFDF003BC6E4A8003FC04FF834B 5FA24B5FA24B94C8FCA44B5EB3B2B7D8F007B7D8803FB612FCA67E417BC087>I<902607 FF80EB1FFFB691B512F0040714FC041F14FF4C8193267FE07F7F922781FE001F7FC6DA83 F86D7F6DD987F07F6DD98FC0814C7F039FC78015BE03BC8003FC825DA25DA25DA45DB3B2 B7D8F007B71280A651417BC05A>I<923807FFE092B6FC020715E0021F15F8027F15FE49 4848C66C6C7E010701F0010F13E04901C001037F49496D7F4990C87F49486F7E49486F7E 48496F13804819C04A814819E048496F13F0A24819F8A348496F13FCA34819FEA4B518FF AD6C19FEA46C6D4B13FCA36C19F8A26C6D4B13F0A26C19E06C6D4B13C0A26C6D4B13806C 6D4B13006D6C4B5A6D6D495B6D6D495B010701F0010F13E06D01FE017F5B010090B7C7FC 023F15FC020715E0020092C8FC030713E048437CC151>I114 D<913A3FFF8007800107B5EAF81F011FECFE7F017F91B5FC48B8FC48EBE0 014890C7121FD80FFC1407D81FF0801600485A007F167F49153FA212FF171FA27F7F7F6D 92C7FC13FF14E014FF6C14F8EDFFC06C15FC16FF6C16C06C16F06C826C826C826C82013F 1680010F16C01303D9007F15E0020315F0EC001F1500041F13F81607007C150100FC8117 7F6C163FA2171F7EA26D16F0A27F173F6D16E06D157F6D16C001FEEDFF806D0203130002 C0EB0FFE02FCEB7FFC01DFB65A010F5DD8FE0315C026F8007F49C7FC48010F13E035437B C140>II<90 2607FFC0ED3FFEB60207B5FCA6C6EE00076D826D82B3B3A260A360A2607F60183E6D6D14 7E4E7F6D6D4948806D6DD907F0ECFF806D01FFEB3FE06D91B55A6E1500021F5C020314F8 DA003F018002F0C7FC51427BC05A>I119 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fi cmsy10 10.95 1 /Fi 1 16 df15 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fj cmtt10 10.95 89 /Fj 89 127 df<121C127FEAFF80B3EA7F00B2123EC7FCA8121C127FA2EAFF80A3EA7F00 A2121C09396DB830>33 D<00101304007C131F00FEEB3F80A26C137FA248133FB2007E14 00007C7F003C131E00101304191C75B830>I<903907C007C0A2496C487EA8011F131FA2 02C05BA3007FB7FCA2B81280A36C16006C5D3A007F807F80A2020090C7FCA9495BA2003F 90B512FE4881B81280A36C1600A22701FC01FCC7FCA300031303A201F85BA76C486C5AA2 29387DB730>I38 DI<141E147F14FF5BEB03FEEB07FCEB0FF0EB1FE0EB3FC0EB7F80EBFF00 485A5B12035B485A120F5BA2485AA2123F5BA2127F90C7FCA412FEAD127FA47F123FA27F 121FA26C7EA27F12076C7E7F12017F6C7EEB7F80EB3FC0EB1FE0EB0FF0EB07FCEB03FEEB 01FF7F147F141E184771BE30>I<127812FE7E7F6C7E6C7EEA0FF06C7E6C7E6C7E6C7EEB 7F80133F14C0131FEB0FE014F01307A2EB03F8A214FC1301A214FE1300A4147FAD14FEA4 130114FCA2130314F8A2EB07F0A2130F14E0EB1FC0133F1480137FEBFF00485A485A485A 485AEA3FE0485A485A90C7FC5A1278184778BE30>I<14E0497E497EA60038EC0380007E EC0FC0D8FF83EB3FE001C3137F9038F3F9FF267FFBFB13C06CB61280000FECFE00000314 F86C5C6C6C13C0011F90C7FC017F13C048B512F04880000F14FE003FECFF80267FFBFB13 C026FFF3F913E09038C3F87F0183133FD87E03EB0FC00038EC0380000091C7FCA66D5A6D 5A23277AAE30>I<143EA2147FAF007FB7FCA2B81280A36C1600A2C76CC8FCAF143EA229 297DAF30>II<007FB612F0 A2B712F8A36C15F0A225077B9E30>I<120FEA3FC0EA7FE0A2EAFFF0A4EA7FE0A2EA3FC0 EA0F000C0C6E8B30>I<16F01501ED03F8A21507A2ED0FF0A2ED1FE0A2ED3FC0A2ED7F80 A2EDFF00A24A5AA25D1403A24A5AA24A5AA24A5AA24A5AA24A5AA24AC7FCA2495AA25C13 03A2495AA2495AA2495AA2495AA2495AA249C8FCA2485AA25B1203A2485AA2485AA2485A A2485AA2485AA248C9FCA25AA2127CA225477BBE30>I<14FE903807FFC0497F013F13F8 497F90B57E48EB83FF4848C6138049137F4848EB3FC04848EB1FE049130F001F15F04913 07A24848EB03F8A290C712014815FCA400FEEC00FEAD6C14016C15FCA36D1303003F15F8 A26D1307001F15F0A26D130F6C6CEB1FE0A26C6CEB3FC06C6CEB7F806D13FF2601FF8313 006CEBFFFE6D5B6D5B010F13E06D5BD900FEC7FC273A7CB830>IIIII<000FB612804815C05AA316800180C8FCAEEB83FF019F13C0 90B512F015FC8181D9FE0313809039F0007FC049133F0180EB1FE06CC7120F000E15F0C8 1207A216F81503A31218127EA2B4FC150716F048140F6C15E06C141F6DEB3FC06D137F3A 3FE001FF80261FFC0F13006CB55A6C5C6C5C6C14E06C6C1380D90FFCC7FC25397BB730> II<127CB712FC16FEA416FC48C7EA0FF816F0ED1FE0007CEC3FC0C8EA7F80EDFF00 A24A5A4A5A5D14075D140F5D4A5AA24A5AA24AC7FCA25C5C13015CA213035CA213075CA4 495AA6131F5CA96D5A6DC8FC273A7CB830>I<49B4FC011F13F0017F13FC90B57E0003EC FF804815C048010113E03A1FF8003FF049131FD83FC0EB07F8A24848EB03FC90C71201A5 6D1303003F15F86D13076C6CEB0FF06C6CEB1FE0D807FCEB7FC03A03FF83FF806C90B512 006C6C13FC011F13F0497F90B512FE48802607FE0013C0D80FF8EB3FE0D81FE0EB0FF048 48EB07F8491303007F15FC90C712014815FE481400A66C14016C15FC6D1303003F15F86D 1307D81FF0EB1FF06D133F3A0FFF01FFE06C90B512C06C1580C6ECFE006D5B011F13F001 0190C7FC273A7CB830>I<49B4FC010F13E0013F13F890B57E4880488048010113803A0F FC007FC0D81FF0EB3FE04848131F49EB0FF048481307A290C7EA03F85A4815FC1501A416 FEA37E7E6D130315076C7E6C6C130F6D133FD80FFC13FF6CB6FC7E6C14FE6C14F9013FEB E1FC010F138190380060011400ED03F8A2150716F0150F000F15E0486C131F486CEB3FC0 157FEDFF804A1300EC07FE391FF01FFC90B55A6C5C6C5C6C1480C649C7FCEB3FF0273A7C B830>I<120FEA3FC0EA7FE0A2EAFFF0A4EA7FE0A2EA3FC0EA0F00C7FCAF120FEA3FC0EA 7FE0A2EAFFF0A4EA7FE0A2EA3FC0EA0F000C276EA630>II<16F01503ED07F8151F157FEDFFF014034A13C0021F138091383FFE00ECFFF8495B01 0713C0495BD93FFEC7FC495A3801FFF0485B000F13804890C8FCEA7FFC5BEAFFE05B7FEA 7FF87FEA1FFF6C7F000313E06C7F38007FFC6D7E90380FFF806D7F010113F06D7FEC3FFE 91381FFF80020713C06E13F01400ED7FF8151F1507ED03F01500252F7BB230>I<007FB7 FCA2B81280A36C16006C5DCBFCA7003FB612FE4881B81280A36C1600A229157DA530>I< 1278127EB4FC13C07FEA7FF813FEEA1FFF6C13C000037F6C13F86C6C7EEB1FFF6D7F0103 13E06D7F9038007FFC6E7E91380FFF806E13C0020113F080ED3FF8151F153FEDFFF05C02 0713C04A138091383FFE004A5A903801FFF0495B010F13804990C7FCEB7FFC48485A4813 E0000F5B4890C8FCEA7FFE13F8EAFFE05B90C9FC127E1278252F7BB230>I64 D<147F4A7EA2497FA449 7F14F7A401077F14E3A3010F7FA314C1A2011F7FA490383F80FEA590387F007FA4498049 133F90B6FCA34881A39038FC001F00038149130FA4000781491307A2D87FFFEB7FFFB56C B51280A46C496C130029397DB830>I<007FB512F0B612FE6F7E82826C813A03F8001FF8 15076F7E1501A26F7EA615015EA24B5A1507ED1FF0ED7FE090B65A5E4BC7FC6F7E16E082 9039F8000FF8ED03FC6F7E1500167FA3EE3F80A6167F1700A25E4B5A1503ED1FFC007FB6 FCB75A5E16C05E6C02FCC7FC29387EB730>I<91387F803C903903FFF03E49EBFC7E011F 13FE49EBFFFE5B9038FFE07F48EB801F3903FE000F484813075B48481303A2484813015B 123F491300A2127F90C8FC167C16005A5AAC7E7EA2167C6D14FE123FA27F121F6D13016C 6C14FCA26C6CEB03F86D13076C6CEB0FF03901FF801F6C9038E07FE06DB512C06D14806D 1400010713FC6D13F09038007FC0273A7CB830>I<003FB512E04814FCB67E6F7E6C816C 813A03F8007FF0ED1FF8150F6F7E6F7E15016F7EA2EE7F80A2163F17C0161FA4EE0FE0AC 161F17C0A3163F1780A2167F17005E4B5A15034B5A150F4B5AED7FF0003FB65A485DB75A 93C7FC6C14FC6C14E02B387FB730>I<007FB7FCB81280A47ED803F8C7123FA8EE1F0093 C7FCA4157C15FEA490B5FCA6EBF800A4157C92C8FCA5EE07C0EE0FE0A9007FB7FCB8FCA4 6C16C02B387EB730>I<003FB712804816C0B8FCA27E7ED801FCC7121FA8EE0F8093C7FC A5153E157FA490B6FCA69038FC007FA4153E92C8FCAE383FFFF8487FB5FCA27E6C5B2A38 7EB730>I<02FF13F00103EBC0F8010F13F1013F13FD4913FF90B6FC4813C1EC007F4848 133F4848131F49130F485A491307121F5B123F491303A2127F90C7FC6F5A92C8FC5A5AA8 92B5FC4A14805CA26C7F6C6D1400ED03F8A27F003F1407A27F121F6D130F120F7F6C6C13 1FA2D803FE133F6C6C137FECC1FF6C90B5FC7F6D13FB010F13F30103EBC1F0010090C8FC 293A7DB830>I<3B3FFF800FFFE0486D4813F0B56C4813F8A26C496C13F06C496C13E0D8 03F8C7EAFE00B290B6FCA601F8C7FCB3A23B3FFF800FFFE0486D4813F0B56C4813F8A26C 496C13F06C496C13E02D387FB730>I<007FB6FCB71280A46C1500260007F0C7FCB3B3A8 007FB6FCB71280A46C1500213879B730>I<49B512F04914F85BA27F6D14F090C7EAFE00 B3B3123C127EB4FCA24A5A1403EB8007397FF01FF86CB55A5D6C5C00075C000149C7FC38 003FF025397AB730>II<383FFFF8487FB57EA26C5B6C5BD801FCC9FCB3B0EE0F 80EE1FC0A9003FB7FC5AB8FCA27E6C16802A387EB730>III<90383FFFE048B512FC00 0714FF4815804815C04815E0EBF80001E0133FD87F80EB0FF0A290C71207A44815F84814 03B3A96C1407A26C15F0A36D130FA26D131F6C6CEB3FE001F813FF90B6FC6C15C06C1580 6C1500000114FCD8003F13E0253A7BB830>I<007FB512F0B612FE6F7E16E0826C813903 F8003FED0FFCED03FE15016F7EA2821780163FA6167F17005EA24B5A1503ED0FFCED3FF8 90B6FC5E5E16804BC7FC15F001F8C9FCB0387FFFC0B57EA46C5B29387EB730>I<90383F FFE048B512FC000714FF4815804815C04815E0EBF80001E0133F4848EB1FF049130F90C7 1207A44815F8481403B3A8147E14FE6CEBFF076C15F0EC7F87A2EC3FC7018013CF9038C0 1FFFD83FE014E0EBF80F90B6FC6C15C06C15806C1500000114FCD8003F7FEB00016E7EA2 1680157F16C0153F16E0151F16F0150FED07E025467BB830>I<003FB57E4814F0B612FC 15FF6C816C812603F8017F9138003FF0151F6F7E15071503821501A515035E1507150F4B 5A153F4AB45A90B65A5E93C7FC5D8182D9F8007FED3FE0151F150F821507A817F8EEF1FC A53A3FFF8003FB4801C0EBFFF8B56C7E17F06C496C13E06C49EB7FC0C9EA1F002E397FB7 30>I<90390FF803C0D97FFF13E048B512C74814F74814FF5A381FF80F383FE001497E48 48137F90C7123F5A48141FA2150FA37EED07C06C91C7FC7F7FEA3FF0EA1FFEEBFFF06C13 FF6C14E0000114F86C80011F13FF01031480D9003F13C014019138007FE0151FED0FF0A2 ED07F8A2007C140312FEA56C140716F07F6DEB0FE06D131F01F8EB3FC001FF13FF91B512 80160000FD5CD8FC7F13F8D8F81F5BD878011380253A7BB830>I<003FB712C04816E0B8 FCA43AFE003F800FA8007CED07C0C791C7FCB3B1011FB5FC4980A46D91C7FC2B387EB730 >I<3B7FFFC007FFFCB56C4813FEA46C496C13FCD803F8C7EA3F80B3B16D147F00011600 A36C6C14FE6D13016D5CEC800390393FE00FF890391FF83FF06DB55A6D5C6D5C6D91C7FC 9038007FFCEC1FF02F3980B730>III<3A3FFF01FFF84801837F02C77FA202835B6C01015B3A01FC007F806D91C7 FC00005C6D5BEB7F01EC81FCEB3F8314C3011F5B14E7010F5B14FF6D5BA26D5BA26D5BA2 6D90C8FCA4497FA2497FA2815B81EB0FE781EB1FC381EB3F8181EB7F0081497F49800001 143F49800003141F49800007140FD87FFEEB7FFFB590B5128080A25C6C486D130029387D B730>II<001FB612FC4815FE5AA490C7EA03FCED07F816F0150FED1FE016C0153F ED7F80003E1500C85A4A5A5D14034A5A5D140F4A5A5D143F4A5A92C7FC5C495A5C130349 5A5C130F495A5C133F495A91C8FC5B4848147C4914FE1203485A5B120F485A5B123F485A 90B6FCB7FCA46C15FC27387CB730>I<007FB5FCB61280A4150048C8FCB3B3B3A5B6FC15 80A46C140019476DBE30>I<007FB5FCB61280A47EC7123FB3B3B3A5007FB5FCB6FCA46C 140019477DBE30>93 D<1307EB1FC0EB7FF0497E000313FE000FEBFF80003F14E0D87FFD 13F039FFF07FF8EBC01FEB800F38FE0003007CEB01F00010EB00401D0E77B730>I<007F B612F0A2B712F8A36C15F0A225077B7D30>I97 DII<913801FFE04A7F5C A28080EC0007AAEB03FE90381FFF874913E790B6FC5A5A481303380FFC00D81FF0133F49 131F485A150F4848130790C7FCA25AA25AA87E6C140FA27F003F141F6D133F6C7E6D137F 390FF801FF2607FE07EBFFC06CB712E06C16F06C14F76D01C713E0011F010313C0D907FC C8FC2C397DB730>I<49B4FC010713E0011F13F8017F7F90B57E488048018113803A07FC 007FC04848133FD81FE0EB1FE0150F484814F0491307127F90C7FCED03F85A5AB7FCA516 F048C9FC7E7EA27F003FEC01F06DEB03F86C7E6C7E6D1307D807FEEB1FF03A03FFC07FE0 6C90B5FC6C15C0013F14806DEBFE00010713F8010013C0252A7CA830>IIII< 14E0EB03F8A2497EA36D5AA2EB00E091C8FCA9381FFFF8487F5AA27E7EEA0001B3A9003F B612C04815E0B7FCA27E6C15C023397AB830>III<387FFFF8B57EA47EEA0001B3B3A8007FB612F0B712F8A46C15F025387BB7 30>I<02FC137E3B7FC3FF01FF80D8FFEF01877F90B500CF7F15DF92B57E6C010F138726 07FE07EB03F801FC13FE9039F803FC01A201F013F8A301E013F0B3A23C7FFE0FFF07FF80 B548018F13C0A46C486C01071380322881A730>II< 49B4FC010F13E0013F13F8497F90B57E0003ECFF8014013A07FC007FC04848EB3FE0D81F E0EB0FF0A24848EB07F8491303007F15FC90C71201A300FEEC00FEA86C14016C15FCA26D 1303003F15F86D13076D130F6C6CEB1FF06C6CEB3FE06D137F3A07FF01FFC06C90B51280 6C15006C6C13FC6D5B010F13E0010190C7FC272A7CA830>II<49B413F8010FEBC1FC013F13F14913FD48B6FC5A4813 81390FFC007F49131F4848130F491307485A491303127F90C7FC15015A5AA77E7E15037F A26C6C1307150F6C6C131F6C6C133F01FC137F3907FF01FF6C90B5FC6C14FD6C14F9013F 13F1010F13C1903803FE0190C7FCAD92B512F84A14FCA46E14F82E3C7DA730>II<90381FFC1E48B5129F000714FF5A5A5A387FF007EB800100FEC7FC4880A46C143E 007F91C7FC13E06CB4FC6C13FC6CEBFF806C14E0000114F86C6C7F01037F9038000FFF02 001380007C147F00FEEC1FC0A2150F7EA27F151F6DEB3F806D137F9039FC03FF0090B6FC 5D5D00FC14F0D8F83F13C026780FFEC7FC222A79A830>III<3B3F FFC07FFF80486DB512C0B515E0A26C16C06C496C13803B01F80003F000A26D130700005D A26D130F017E5CA2017F131F6D5CA2EC803F011F91C7FCA26E5A010F137EA2ECE0FE0107 5BA214F101035BA3903801FBF0A314FF6D5BA36E5A6E5A2B277EA630>I<3B3FFFC01FFF E0486D4813F0B515F8A26C16F06C496C13E0D807E0C7EA3F00A26D5C0003157EA56D14FE 00015DEC0F80EC1FC0EC3FE0A33A00FC7FF1F8A2147DA2ECFDF9017C5C14F8A3017E13FB A290393FF07FE0A3ECE03FA2011F5C90390F800F802D277FA630>I<3A3FFF81FFFC4801 C37FB580A26C5D6C01815BC648C66CC7FC137FEC80FE90383F81FC90381FC3F8EB0FE3EC E7F06DB45A6D5B7F6D5B92C8FC147E147F5C497F81903803F7E0EB07E790380FE3F0ECC1 F890381F81FC90383F80FE90387F007E017E137F01FE6D7E48486D7E267FFF80B5FCB500 C1148014E3A214C16C0180140029277DA630>I<3B3FFFC07FFF80486DB512C0B515E0A2 6C16C06C496C13803B01FC0003F000A2000014076D5C137E150F017F5C7F151FD91F805B A214C0010F49C7FCA214E00107137EA2EB03F0157C15FCEB01F85DA2EB00F9ECFDF0147D 147FA26E5AA36E5AA35DA2143F92C8FCA25C147EA2000F13FE486C5AEA3FC1EBC3F81387 EB8FF0EBFFE06C5B5C6C90C9FC6C5AEA01F02B3C7EA630>I<001FB612FC4815FE5AA316 FC90C7EA0FF8ED1FF0ED3FE0ED7FC0EDFF80003E491300C7485A4A5A4A5A4A5A4A5A4A5A 4A5A4990C7FC495A495A495A495A495A495A4948133E4890C7127F485A485A485A485A48 5A48B7FCB8FCA46C15FE28277DA630>II< 127CA212FEB3B3B3AD127CA207476CBE30>II<017C13 3848B4137C48EB80FE4813C14813C348EBEFFC397FEFFFF0D8FF8713E0010713C0486C13 80D87C0113003838007C1F0C78B730>I E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fk cmbx12 14.4 49 /Fk 49 122 df12 D45 DI<157815FC14031407141F14FF130F00 07B5FCB6FCA2147F13F0EAF800C7FCB3B3B3A6007FB712FEA52F4E76CD43>49 DI<91380FFFC091B512FC0107ECFF80011F15E09026 3FF8077F9026FF800113FC4848C76C7ED803F86E7E491680D807FC8048B416C080486D15 E0A4805CA36C17C06C5B6C90C75AD801FC1680C9FC4C13005FA24C5A4B5B4B5B4B13C04B 5BDBFFFEC7FC91B512F816E016FCEEFF80DA000713E0030113F89238007FFE707E701380 7013C018E07013F0A218F8A27013FCA218FEA2EA03E0EA0FF8487E487E487EB57EA318FC A25E18F891C7FC6C17F0495C6C4816E001F04A13C06C484A1380D80FF84A13006CB44A5A 6CD9F0075BC690B612F06D5D011F1580010302FCC7FCD9001F1380374F7ACD43>I<177C 17FEA2160116031607160FA2161F163F167FA216FF5D5DA25D5DED1FBFED3F3F153E157C 15FCEC01F815F0EC03E01407EC0FC01580EC1F005C147E147C5C1301495A495A5C495A13 1F49C7FC133E5B13FC485A5B485A1207485A485A90C8FC123E127E5ABA12C0A5C96C48C7 FCAF020FB712C0A53A4F7CCE43>III<121F7F7FEB FF8091B81280A45A1900606060A2606060485F0180C86CC7FC007EC95A4C5A007C4B5A5F 4C5A160F4C5A484B5A4C5A94C8FC16FEC812014B5A5E4B5A150F4B5AA24B5AA24B5A15FF A24A90C9FCA25C5D1407A2140FA25D141FA2143FA4147F5DA314FFA55BAC6D5BA2EC3FC0 6E5A395279D043>I<913807FFC0027F13FC0103B67E010F15E090261FFC0113F8903A3F E0003FFCD97F80EB0FFE49C76C7E48488048486E1380000717C04980120F18E0177FA212 1F7FA27F7F6E14FF02E015C014F802FE4913806C7FDBC00313009238F007FE6C02F85B92 38FE1FF86C9138FFBFF06CEDFFE017806C4BC7FC6D806D81010F15E06D81010115FC0107 81011F81491680EBFFE748018115C048D9007F14E04848011F14F048487F484813030300 14F8484880161F4848020713FC1601824848157F173FA2171FA2170FA218F8A27F007F17 F06D151FA26C6CED3FE0001F17C06D157F6C6CEDFF806C6C6C010313006C01E0EB0FFE6C 01FCEBFFFC6C6CB612F06D5D010F1580010102FCC7FCD9000F13C0364F7ACD43>I<9138 0FFF8091B512F8010314FE010F6E7E4901037F90267FF8007F4948EB3FF048496D7E4849 80486F7E484980824817805A91C714C05A7013E0A218F0B5FCA318F8A618FCA46C5DA37E A25E6C7F6C5DA26C5D6C7F6C6D137B6C6D13F390387FF803011FB512E36D14C301030283 13F89039007FFE03EC00401500A218F05EA3D801F816E0487E486C16C0487E486D491380 A218005E5F4C5A91C7FC6C484A5A494A5A49495B6C48495BD803FC010F5B9027FF807FFE C7FC6C90B55A6C6C14F06D14C0010F49C8FC010013F0364F7ACD43>I<91B5FC010F14F8 017F14FF90B712C00003D9C00F7F2707FC00017FD80FE06D7F48486E7E48C87FD87FE06E 7E7F7F486C1680A66C5A18006C485C6C5AC9485A5F4B5B4B5B4B5B4B5B4B90C7FC16FC4B 5A4B5A16C04B5A93C8FC4A5A5D14035D5D14075DA25D140FA25DAB91CAFCAAEC1FC04A7E ECFFF8497FA2497FA76D5BA26D5BEC3FE06E5A315479D340>63 D68 DI I72 D I<027FB71280A591C76C90C7FCB3B3B3EA07F0EA1FFC487E487EA2B57EA44C5AA34A485B 7E49495BD83FF8495BD81FE05DD80FFC011F5B2707FF807F90C8FC000190B512FC6C6C14 F0011F14C0010101F8C9FC39537DD145>I76 DI80 D82 D<91260FFF80130791B5 00F85B010702FF5B011FEDC03F49EDF07F9026FFFC006D5A4801E0EB0FFD4801800101B5 FC4848C87E48488149150F001F824981123F4981007F82A28412FF84A27FA26D82A27F7F 6D93C7FC14C06C13F014FF15F86CECFF8016FC6CEDFFC017F06C16FC6C16FF6C17C06C83 6C836D826D82010F821303010082021F16801400030F15C0ED007F040714E01600173F05 0F13F08383A200788200F882A3187FA27EA219E07EA26CEFFFC0A27F6D4B13806D17006D 5D01FC4B5A01FF4B5A02C04A5A02F8EC7FF0903B1FFFC003FFE0486C90B65AD8FC0393C7 FC48C66C14FC48010F14F048D9007F90C8FC3C5479D24B>I<003FBC1280A59126C0003F 9038C0007F49C71607D87FF8060113C001E08449197F49193F90C8171FA2007E1A0FA300 7C1A07A500FC1BE0481A03A6C994C7FCB3B3AC91B912F0A553517BD05E>II87 D97 DI<913801FFF8021FEBFF8091B612F0010315FC010F9038C00FFE903A1FFE0001 FFD97FFC491380D9FFF05B4817C048495B5C5A485BA2486F138091C7FC486F1300705A48 92C8FC5BA312FFAD127F7FA27EA2EF03E06C7F17076C6D15C07E6E140F6CEE1F806C6DEC 3F006C6D147ED97FFE5C6D6CEB03F8010F9038E01FF0010390B55A01001580023F49C7FC 020113E033387CB63C>I<4DB47E0407B5FCA5EE001F1707B3A4913801FFE0021F13FC91 B6FC010315C7010F9038E03FE74990380007F7D97FFC0101B5FC49487F4849143F484980 485B83485B5A91C8FC5AA3485AA412FFAC127FA36C7EA37EA26C7F5F6C6D5C7E6C6D5C6C 6D49B5FC6D6C4914E0D93FFED90FEFEBFF80903A0FFFC07FCF6D90B5128F0101ECFE0FD9 003F13F8020301C049C7FC41547CD24B>I<913803FFC0023F13FC49B6FC010715C04901 817F903A3FFC007FF849486D7E49486D7E4849130F48496D7E48178048497F18C0488191 C7FC4817E0A248815B18F0A212FFA490B8FCA318E049CAFCA6127FA27F7EA218E06CEE01 F06E14037E6C6DEC07E0A26C6DEC0FC06C6D141F6C6DEC3F806D6CECFF00D91FFEEB03FE 903A0FFFC03FF8010390B55A010015C0021F49C7FC020113F034387CB63D>IIII<137F497E 000313E0487FA2487FA76C5BA26C5BC613806DC7FC90C8FCADEB3FF0B5FCA512017EB3B3 A6B612E0A51B547BD325>I 107 DIII<913801FFE0021F13FE91B612C0010315F0010F9038 807FFC903A1FFC000FFED97FF86D6C7E49486D7F48496D7F48496D7F4A147F48834890C8 6C7EA24883A248486F7EA3007F1880A400FF18C0AC007F1880A3003F18006D5DA26C5FA2 6C5F6E147F6C5F6C6D4A5A6C6D495B6C6D495B6D6C495BD93FFE011F90C7FC903A0FFF80 7FFC6D90B55A010015C0023F91C8FC020113E03A387CB643>I<903A3FF001FFE0B5010F 13FE033FEBFFC092B612F002F301017F913AF7F8007FFE0003D9FFE0EB1FFFC602806D7F 92C76C7F4A824A6E7F4A6E7FA2717FA285187F85A4721380AC1A0060A36118FFA2615F61 6E4A5BA26E4A5B6E4A5B6F495B6F4990C7FC03F0EBFFFC9126FBFE075B02F8B612E06F14 80031F01FCC8FC030313C092CBFCB1B612F8A5414D7BB54B>I<90397FE003FEB590380F FF80033F13E04B13F09238FE1FF89139E1F83FFC0003D9E3E013FEC6ECC07FECE78014EF 150014EE02FEEB3FFC5CEE1FF8EE0FF04A90C7FCA55CB3AAB612FCA52F367CB537>114 D<903903FFF00F013FEBFE1F90B7FC120348EB003FD80FF81307D81FE0130148487F4980 127F90C87EA24881A27FA27F01F091C7FC13FCEBFFC06C13FF15F86C14FF16C06C15F06C 816C816C81C681013F1580010F15C01300020714E0EC003F030713F015010078EC007F00 F8153F161F7E160FA27E17E07E6D141F17C07F6DEC3F8001F8EC7F0001FEEB01FE9039FF C00FFC6DB55AD8FC1F14E0D8F807148048C601F8C7FC2C387CB635>I<143EA6147EA414 FEA21301A313031307A2130F131F133F13FF5A000F90B6FCB8FCA426003FFEC8FCB3A9EE 07C0AB011FEC0F8080A26DEC1F0015806DEBC03E6DEBF0FC6DEBFFF86D6C5B021F5B0203 13802A4D7ECB34>IIII121 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fl cmr10 10.95 86 /Fl 86 124 df<4AB4EB0FE0021F9038E03FFC913A7F00F8FC1ED901FC90383FF03FD907 F090397FE07F80494801FF13FF4948485BD93F805C137F0200ED7F00EF003E01FE6D91C7 FC82ADB97EA3C648C76CC8FCB3AE486C4A7E007FD9FC3FEBFF80A339407FBF35>11 D<4AB4FC021F13C091387F01F0903901FC0078D907F0131C4948133E494813FF49485A13 7F1400A213FE6F5A163893C7FCAA167FB8FCA33900FE00018182B3AC486CECFF80007FD9 FC3F13FEA32F407FBF33>I<4AB47E021F13F791387F00FFEB01F8903807F001EB0FE0EB 1FC0EB3F80137F14008101FE80AEB8FCA3C648C77EB3AE486CECFF80007FD9FC3F13FEA3 2F407FBF33>I<4AB4ECFF80021FD9C00F13E0913B7F01F03F80F8903C01F80078FE003C D907F0D93FF8130E49484948131F49484948EB7F804948484913FF137F02005CA201FE92 C7FC6FED7F0070141C96C7FCAAF13F80BBFCA3C648C76CC7FC197F193FB3AC486C4A6CEB 7FC0007FD9FC3FD9FE1FB5FCA348407FBF4C>I<121EEA7F80EAFFC0A9EA7F80ACEA3F00 AC121EAB120CC7FCA8121EEA7F80A2EAFFC0A4EA7F80A2EA1E000A4179C019>33 D<001E130F397F803FC000FF137F01C013E0A201E013F0A3007F133F391E600F30000013 00A401E01370491360A3000114E04913C00003130101001380481303000EEB070048130E 0018130C0038131C003013181C1C7DBE2D>I<013F4C7ED9FFC04B7E2601E0E015072607 C070150F48486C4B5A023E4BC7FC48486C5D48D90FC0EB01FE003ED90EF0EB07FCDA0F3F 133E007E903A070FFFF8F8007C0200EBC1F0EE000300FC6D6C495A604D5A171F95C8FC17 3E177E177C5F16015F007C4948485A1607007E5E003E49495A020E131F003F93C9FC6C49 133E260F803C137E0238137C6C6C485B3901E0E0016CB448485AD93F0049133F90C74848 EBFFC0030F903801E0E093398007C0704B4848487E4B153C033E90381F001C4B497F03FC 133E4B150F4A48017E7F0203147C5D4A4801FCEB0380140F5D4AC7FC5C143E5C14FC5C49 5A13034948027CEB07005C4948147E011F033E5B91C8140E013E153F017E6F5B017C9238 0F803C4917380001706C5A49923801E0E0496FB45A6C48043FC7FC41497BC34C>37 DI<121EEA7F8012FF13C0A213E0A3127FEA1E601200A413E013C0A3120113801203 13005A120E5A1218123812300B1C79BE19>I<1430147014E0EB01C0EB03801307EB0F00 131E133E133C5B13F85B12015B1203A2485AA2120F5BA2121F90C7FCA25AA3123E127EA6 127C12FCB2127C127EA6123E123FA37EA27F120FA27F1207A26C7EA212017F12007F1378 7F133E131E7FEB07801303EB01C0EB00E014701430145A77C323>I<12C07E12707E7E12 1E7E6C7E7F12036C7E7F12007F1378137CA27FA2133F7FA21480130FA214C0A3130714E0 A6130314F0B214E01307A614C0130FA31480A2131F1400A25B133EA25BA2137813F85B12 015B485A12075B48C7FC121E121C5A5A5A5A145A7BC323>II<121EEA7F8012FF13C0A213 E0A3127FEA1E601200A413E013C0A312011380120313005A120E5A1218123812300B1C79 8919>44 DI<121EEA7F80A2EAFFC0A4EA7F80A2EA1E000A0A79 8919>IIIIII<150E151E153EA2157EA215FE1401A21403EC 077E1406140E141CA214381470A214E0EB01C0A2EB0380EB0700A2130E5BA25B5BA25B5B 1201485A90C7FC5A120E120C121C5AA25A5AB8FCA3C8EAFE00AC4A7E49B6FCA3283E7EBD 2D>I<00061403D80780131F01F813FE90B5FC5D5D5D15C092C7FC14FCEB3FE090C9FCAC EB01FE90380FFF8090383E03E090387001F8496C7E49137E497F90C713800006141FC813 C0A216E0150FA316F0A3120C127F7F12FFA416E090C7121F12FC007015C012780038EC3F 80123C6CEC7F00001F14FE6C6C485A6C6C485A3903F80FE0C6B55A013F90C7FCEB07F824 3F7CBC2D>II<1238123C123F90B6 12FCA316F85A16F016E00078C712010070EC03C0ED078016005D48141E151C153C5DC812 7015F04A5A5D14034A5A92C7FC5C141EA25CA2147C147814F8A213015C1303A31307A313 0F5CA2131FA6133FAA6D5A0107C8FC26407BBD2D>III<12 1EEA7F80A2EAFFC0A4EA7F80A2EA1E00C7FCB3121EEA7F80A2EAFFC0A4EA7F80A2EA1E00 0A2779A619>I<121EEA7F80A2EAFFC0A4EA7F80A2EA1E00C7FCB3121E127FEAFF80A213 C0A4127F121E1200A412011380A3120313005A1206120E120C121C5A1230A20A3979A619 >I<007FB912E0BA12F0A26C18E0CDFCAE007FB912E0BA12F0A26C18E03C167BA147>61 D63 D<15074B7EA34B7EA34B7EA34B7EA34B7E15E7A2913801C7FC15C3A291380381 FEA34AC67EA3020E6D7EA34A6D7EA34A6D7EA34A6D7EA34A6D7EA349486D7E91B6FCA249 819138800001A249C87EA24982010E157FA2011E82011C153FA2013C820138151FA20178 82170F13FC00034C7ED80FFF4B7EB500F0010FB512F8A33D417DC044>65 DII IIII< B6D8C01FB512F8A3000101E0C7383FFC0026007F80EC0FF0B3A691B7FCA30280C7120FB3 A92601FFE0EC3FFCB6D8C01FB512F8A33D3E7DBD44>II<011FB512FCA3D9000713006E5A1401B3B3A6123FEA 7F80EAFFC0A44A5A1380D87F005B007C130700385C003C495A6C495A6C495A2603E07EC7 FC3800FFF8EB3FC026407CBD2F>IIIIIII III<003FB91280A3903AF0 007FE001018090393FC0003F48C7ED1FC0007E1707127C00781703A300701701A548EF00 E0A5C81600B3B14B7E4B7E0107B612FEA33B3D7DBC42>IIII<007F B5D8C003B512E0A3C649C7EBFC00D93FF8EC3FE06D48EC1F806D6C92C7FC171E6D6C141C 6D6C143C5F6D6C14706D6D13F04C5ADA7FC05B023F13036F485ADA1FF090C8FC020F5BED F81E913807FC1C163C6E6C5A913801FF7016F06E5B6F5AA26F7E6F7EA28282153FED3BFE ED71FF15F103E07F913801C07F0203804B6C7EEC07004A6D7E020E6D7E5C023C6D7E0238 6D7E14784A6D7E4A6D7F130149486E7E4A6E7E130749C86C7E496F7E497ED9FFC04A7E00 076DEC7FFFB500FC0103B512FEA33F3E7EBD44>II<003FB712F8A391C7EA1FF013F801E0EC3FE00180EC7FC090C8FC003EED FF80A2003C4A1300007C4A5A12784B5A4B5AA200704A5AA24B5A4B5AA2C8485A4A90C7FC A24A5A4A5AA24A5AA24A5A4A5AA24A5A4A5AA24990C8FCA2495A4948141CA2495A495AA2 495A495A173C495AA24890C8FC485A1778485A484815F8A24848140116034848140F4848 143FED01FFB8FCA32E3E7BBD38>I I<486C13C00003130101001380481303000EEB070048130E0018130C0038131C00301318 0070133800601330A300E01370481360A400CFEB678039FFC07FE001E013F0A3007F133F A2003F131F01C013E0390F0007801C1C73BE2D>II97 DI<49B4FC010F13E090383F00F8017C131E4848131F 4848137F0007ECFF80485A5B121FA24848EB7F00151C007F91C7FCA290C9FC5AAB6C7EA3 003FEC01C07F001F140316806C6C13076C6C14000003140E6C6C131E6C6C137890383F01 F090380FFFC0D901FEC7FC222A7DA828>II II<167C903903F801 FF903A1FFF078F8090397E0FDE1F9038F803F83803F001A23B07E000FC0600000F6EC7FC 49137E001F147FA8000F147E6D13FE00075C6C6C485AA23901F803E03903FE0FC026071F FFC8FCEB03F80006CAFC120EA3120FA27F7F6CB512E015FE6C6E7E6C15E06C810003813A 0FC0001FFC48C7EA01FE003E140048157E825A82A46C5D007C153E007E157E6C5D6C6C49 5A6C6C495AD803F0EB0FC0D800FE017FC7FC90383FFFFC010313C0293D7EA82D>III<1478EB01FEA2EB03FFA4EB01FEA2EB00781400AC147FEB7FFFA313 017F147FB3B3A5123E127F38FF807E14FEA214FCEB81F8EA7F01387C03F0381E07C0380F FF803801FC00185185BD1C>II I<2701F801FE14FF00FF902707FFC00313E0913B1E07E00F03F0913B7803F03C01F80007 903BE001F87000FC2603F9C06D487F000101805C01FBD900FF147F91C75B13FF4992C7FC A2495CB3A6486C496CECFF80B5D8F87FD9FC3F13FEA347287DA74C>I<3901F801FE00FF 903807FFC091381E07E091387803F000079038E001F82603F9C07F0001138001FB6D7E91 C7FC13FF5BA25BB3A6486C497EB5D8F87F13FCA32E287DA733>I<14FF010713E090381F 81F890387E007E01F8131F4848EB0F804848EB07C04848EB03E0000F15F04848EB01F8A2 003F15FCA248C812FEA44815FFA96C15FEA36C6CEB01FCA3001F15F86C6CEB03F0A26C6C EB07E06C6CEB0FC06C6CEB1F80D8007EEB7E0090383F81FC90380FFFF0010090C7FC282A 7EA82D>I<3901FC03FC00FF90381FFF8091387C0FE09039FDE003F03A03FFC001FC6C49 6C7E91C7127F49EC3F805BEE1FC017E0A2EE0FF0A3EE07F8AAEE0FF0A4EE1FE0A2EE3FC0 6D1580EE7F007F6E13FE9138C001F89039FDE007F09039FC780FC0DA3FFFC7FCEC07F891 C9FCAD487EB512F8A32D3A7EA733>I<02FF131C0107EBC03C90381F80F090397F00387C 01FC131CD803F8130E4848EB0FFC150748481303121F485A1501485AA448C7FCAA6C7EA3 6C7EA2001F14036C7E15076C6C130F6C7E6C6C133DD8007E137990383F81F190380FFFC1 903801FE0190C7FCAD4B7E92B512F8A32D3A7DA730>I<3901F807E000FFEB1FF8EC787C ECE1FE3807F9C100031381EA01FB1401EC00FC01FF1330491300A35BB3A5487EB512FEA3 1F287EA724>I<90383FC0603901FFF8E03807C03F381F000F003E1307003C1303127C00 78130112F81400A27E7E7E6D1300EA7FF8EBFFC06C13F86C13FE6C7F6C1480000114C0D8 003F13E0010313F0EB001FEC0FF800E01303A214017E1400A27E15F07E14016C14E06CEB 03C0903880078039F3E01F0038E0FFFC38C01FE01D2A7DA824>I<131CA6133CA4137CA2 13FCA2120112031207001FB512C0B6FCA2D801FCC7FCB3A215E0A912009038FE01C0A2EB 7F03013F138090381F8700EB07FEEB01F81B397EB723>IIIIII<001FB61280A2EBE0000180140049485A001E495A121C4A5A003C49 5A141F00385C4A5A147F5D4AC7FCC6485AA2495A495A130F5C495A90393FC00380A2EB7F 80EBFF005A5B484813071207491400485A48485BA248485B4848137F00FF495A90B6FCA2 21277EA628>II E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fm cmbx12 20.736 9 /Fm 9 123 df<92380FFFE04AB67E020F15F0027F15FE49B87E4917E0010F17F8013F83 49D9C01F14FF9027FFFC0001814801E06D6C80480180021F804890C86C8048486F804848 6F8001FF6F804801C06E8002F081486D18806E816E18C0B5821BE06E81A37214F0A56C5B A36C5B6C5B6C5B000313C0C690C9FC90CA15E060A34E14C0A21B80601B0060626295B55A 5F624D5C624D5C4D91C7FC614D5B4D13F04D5B6194B55A4C49C8FC4C5B4C5B4C13E04C5B 604C90C9FCEE7FFC4C5A4B5B4B5B4B0180EC0FF04B90C8FC4B5A4B5A4B48ED1FE0EDFFE0 4A5B4A5B4A90C9FC4A48163F4A5ADA3FF017C05D4A48167F4A5A4990CA12FFD903FC1607 49BAFC5B4919805B5B90BBFC5A5A5A5A481A005A5ABCFCA462A44C7176F061>50 D<92383FFFF80207B612E0027F15FC49B87E010717E0011F83499026F0007F13FC4948C7 000F7F90B502036D7E486E6D806F6D80727F486E6E7F8486727FA28684A26C5C72806C5C 6D90C8FC6D5AEB0FF8EB03E090CAFCA70507B6FC041FB7FC0303B8FC157F0203B9FC021F ECFE0391B612800103ECF800010F14C04991C7FC017F13FC90B512F04814C0485C4891C8 FC485B5A485B5C5A5CA2B5FC5CA360A36E5DA26C5F6E5D187E6C6D846E4A48806C6D4A48 14FC6C6ED90FF0ECFFFC6C02E090263FE07F14FE00019139FC03FFC06C91B6487E013F4B 487E010F4B1307010303F01301D9003F0280D9003F13FC020101F8CBFC57507ACE5E>97 D<903801FFFCB6FCA8C67E131F7FB3ADF0FFFC050FEBFFE0057F14FE0403B77E040F16E0 043F16F84CD9007F13FE9226FDFFF001077F92B500C001018094C86C13E004FC6F7F4C6F 7F04E06F7F4C6F7F5E747F93C915804B7014C0A27414E0A21DF087A21DF8A31DFC87A41D FEAF1DFCA4631DF8A31DF098B5FC1DE0A25014C0A26F1980501400705D705F704B5B505B 704B5B04FC4B5BDBE7FE92B55A9226C3FF8001035C038101E0011F49C7FC9226807FFC90 B55A4B6CB712F04A010F16C04A010393C8FC4A010015F84A023F14C090C9000301F0C9FC 5F797AF76C>I<97380FFFE00607B6FCA8F00003190086B3AD93383FFF800307B512F803 3F14FF4AB712C0020716F0021F16FC027F9039FE007FFE91B500F0EB0FFF010302800101 90B5FC4949C87E49498149498149498149498190B548814884484A8192CAFC5AA2485BA2 5A5C5AA35A5CA4B5FCAF7EA4807EA37EA2807EA26C7F616C6E5D6C606C80616D6D5D6D6D 5D6D6D92B67E6D6D4A15FC010301FF0207EDFFFE6D02C0EB3FFE6D6C9039FC01FFF86E90 B65A020F16C002031600DA007F14FC030F14E09226007FFEC749C7FC5F797AF76C>100 D105 D<903801FFFCB6FCA8C67E131F7FB3B3B3B3B3ABB812C0A82A7879F7 35>108 D<902601FFF891380FFFE0B692B512FE05036E7E050F15E0053F15F84D819327 01FFF01F7F4CD900077FDC07FC6D80C66CDA0FF06D80011FDA1FC07F6D4A48824CC8FC04 7E6F7F5EEDF9F85E03FB707F5E15FF5EA25EA293C9FCA45DB3B3A6B8D8E003B81280A861 4E79CD6C>110 D<902601FFFCEC7FFEB6020FB512F0057F14FE4CB712C0040716F0041F 82047F16FE93B5C66C7F92B500F0010F14C0C66C0380010380011F4AC76C806D4A6E8004 F06F7F4C6F7F4C6F7F4C8193C915804B7014C0861DE0A27414F0A27414F8A47513FCA575 13FEAF5113FCA598B512F8A31DF0621DE0621DC0621D806F5E701800704B5B505B704B5B 7092B55A04FC4A5C704A5C706C010F5C05E0013F49C7FC9227FE7FFC01B55A70B712F004 0F16C0040393C8FC040015F8053F14C0050301F0C9FC94CCFCB3A6B812E0A85F6F7ACD6C >112 D<0007BA12FC1AFEA503E0C714FC4AC74814F84801F04A14F05C02804A14E091C8 4814C04D14805B494B14004D5B4992B55AA24C5C494A5C615E4C5C001F4B5C5B4C91C7FC 4C5B93B55AA24B5CC8485C4B5CA24B5C4B5C4B91C8FCA24B5B92B55AA24A5C4A5C4A4A14 FFA24A5C4A5C4A91C8FC614A4915FE91B55A495CA2495C494A14035E5B495C4991C81207 A24949ED0FFC90B55A484A151FA2484A153F484A157F484A15FF1803484A140F4891C812 3F48490207B5FC91B9FCBB12F8A57E484D7BCC56>122 D E %EndDVIPSBitmapFont end %%EndProlog %%BeginSetup %%Feature: *Resolution 600dpi TeXDict begin %%PaperSize: A4 %%EndSetup %%Page: 1 1 1 0 bop 150 1318 a Fm(bzip2)64 b(and)g(libbzip2)p 150 1418 3600 34 v 2010 1515 a Fl(a)31 b(program)f(and)g(library)e(for)i (data)h(compression)2198 1623 y(cop)m(yrigh)m(t)f(\(C\))h(1996-2000)j (Julian)28 b(Sew)m(ard)2605 1731 y(v)m(ersion)i(1.0)h(of)g(21)g(Marc)m (h)g(2000)150 5091 y Fk(Julian)46 b(Sew)l(ard)p 150 5141 3600 17 v eop %%Page: 1 2 1 1 bop 3705 -116 a Fl(1)150 299 y(This)24 b(program,)j Fj(bzip2)p Fl(,)e(and)g(asso)s(ciated)i(library)c Fj(libbzip2)p Fl(,)i(are)h(Cop)m(yrigh)m(t)g(\(C\))g(1996-2000)j(Julian)150 408 y(R)h(Sew)m(ard.)40 b(All)29 b(righ)m(ts)h(reserv)m(ed.)150 565 y(Redistribution)f(and)i(use)h(in)f(source)h(and)g(binary)e(forms,) j(with)e(or)h(without)f(mo)s(di\014cation,)g(are)i(p)s(er-)150 675 y(mitted)d(pro)m(vided)f(that)i(the)f(follo)m(wing)f(conditions)g (are)i(met:)225 832 y Fi(\017)60 b Fl(Redistributions)26 b(of)k(source)g(co)s(de)g(m)m(ust)g(retain)f(the)h(ab)s(o)m(v)m(e)h (cop)m(yrigh)m(t)g(notice,)f(this)f(list)f(of)i(con-)330 941 y(ditions)e(and)i(the)h(follo)m(wing)e(disclaimer.)225 1076 y Fi(\017)60 b Fl(The)33 b(origin)f(of)h(this)f(soft)m(w)m(are)j (m)m(ust)e(not)h(b)s(e)e(misrepresen)m(ted;)i(y)m(ou)g(m)m(ust)f(not)g (claim)g(that)h(y)m(ou)330 1185 y(wrote)d(the)h(original)d(soft)m(w)m (are.)44 b(If)31 b(y)m(ou)g(use)g(this)f(soft)m(w)m(are)i(in)e(a)h(pro) s(duct,)g(an)f(ac)m(kno)m(wledgmen)m(t)330 1295 y(in)f(the)i(pro)s (duct)e(do)s(cumen)m(tation)h(w)m(ould)f(b)s(e)h(appreciated)g(but)g (is)f(not)i(required.)225 1429 y Fi(\017)60 b Fl(Altered)21 b(source)g(v)m(ersions)f(m)m(ust)h(b)s(e)f(plainly)e(mark)m(ed)j(as)g (suc)m(h,)i(and)d(m)m(ust)h(not)g(b)s(e)f(misrepresen)m(ted)330 1539 y(as)31 b(b)s(eing)e(the)h(original)f(soft)m(w)m(are.)225 1674 y Fi(\017)60 b Fl(The)27 b(name)h(of)f(the)h(author)f(ma)m(y)h (not)g(b)s(e)f(used)g(to)h(endorse)f(or)h(promote)g(pro)s(ducts)e (deriv)m(ed)g(from)330 1783 y(this)j(soft)m(w)m(are)j(without)d(sp)s (eci\014c)h(prior)e(written)i(p)s(ermission.)150 1965 y(THIS)37 b(SOFTW)-10 b(ARE)38 b(IS)f(PR)m(O)m(VIDED)i(BY)g(THE)f(A)m (UTHOR)g(\\AS)g(IS")g(AND)h(ANY)f(EXPRESS)150 2074 y(OR)31 b(IMPLIED)h(W)-10 b(ARRANTIES,)31 b(INCLUDING,)i(BUT)f(NOT)f(LIMITED)g (TO,)h(THE)f(IMPLIED)150 2184 y(W)-10 b(ARRANTIES)27 b(OF)h(MER)m(CHANT)-8 b(ABILITY)28 b(AND)g(FITNESS)f(F)m(OR)g(A)h(P)-8 b(AR)g(TICULAR)28 b(PUR-)150 2294 y(POSE)37 b(ARE)g(DISCLAIMED.)h(IN)f (NO)h(EVENT)f(SHALL)g(THE)g(A)m(UTHOR)h(BE)g(LIABLE)g(F)m(OR)150 2403 y(ANY)56 b(DIRECT,)f(INDIRECT,)h(INCIDENT)-8 b(AL,)56 b(SPECIAL,)e(EXEMPLAR)-8 b(Y,)57 b(OR)e(CONSE-)150 2513 y(QUENTIAL)48 b(D)m(AMA)m(GES)i(\(INCLUDING,)g(BUT)f(NOT)f(LIMITED)g (TO,)g(PR)m(OCUREMENT)150 2622 y(OF)35 b(SUBSTITUTE)e(GOODS)i(OR)f(SER) -10 b(VICES;)34 b(LOSS)f(OF)i(USE,)g(D)m(A)-8 b(T)g(A,)36 b(OR)f(PR)m(OFITS;)f(OR)150 2732 y(BUSINESS)28 b(INTERR)m(UPTION\))g (HO)m(WEVER)i(CA)m(USED)f(AND)g(ON)g(ANY)g(THEOR)-8 b(Y)29 b(OF)g(LIA-)150 2842 y(BILITY,)36 b(WHETHER)g(IN)g(CONTRA)m(CT,)g (STRICT)e(LIABILITY,)i(OR)g(TOR)-8 b(T)35 b(\(INCLUDING)150 2951 y(NEGLIGENCE)45 b(OR)g(OTHER)-10 b(WISE\))44 b(ARISING)h(IN)g(ANY) h(W)-10 b(A)i(Y)46 b(OUT)e(OF)i(THE)e(USE)h(OF)150 3061 y(THIS)29 b(SOFTW)-10 b(ARE,)31 b(EVEN)f(IF)g(AD)m(VISED)i(OF)e(THE)g (POSSIBILITY)e(OF)j(SUCH)f(D)m(AMA)m(GE.)150 3218 y(Julian)e(Sew)m (ard,)i(Cam)m(bridge,)g(UK.)150 3374 y Fj(jseward@acm.org)150 3531 y(http://sourceware.cygnus)o(.com)o(/bzi)o(p2)150 3688 y(http://www.cacheprof.org)150 3845 y(http://www.muraroa.demon)o (.co.)o(uk)150 4002 y(bzip2)p Fl(/)p Fj(libbzip2)d Fl(v)m(ersion)j(1.0) i(of)e(21)h(Marc)m(h)g(2000.)150 4159 y(P)-8 b(A)g(TENTS:)40 b(T)-8 b(o)40 b(the)g(b)s(est)g(of)g(m)m(y)g(kno)m(wledge,)j Fj(bzip2)38 b Fl(do)s(es)i(not)g(use)g(an)m(y)g(paten)m(ted)h (algorithms.)150 4268 y(Ho)m(w)m(ev)m(er,)33 b(I)e(do)f(not)h(ha)m(v)m (e)h(the)f(resources)g(a)m(v)-5 b(ailable)30 b(to)h(carry)g(out)g(a)g (full)d(paten)m(t)k(searc)m(h.)42 b(Therefore)150 4378 y(I)30 b(cannot)h(giv)m(e)g(an)m(y)g(guaran)m(tee)h(of)e(the)h(ab)s(o)m (v)m(e)g(statemen)m(t.)p eop %%Page: 2 3 2 2 bop 150 -116 a Fl(Chapter)30 b(1:)41 b(In)m(tro)s(duction)2591 b(2)150 299 y Fh(1)80 b(In)l(tro)t(duction)150 555 y Fj(bzip2)20 b Fl(compresses)h(\014les)f(using)g(the)h(Burro)m (ws-Wheeler)g(blo)s(c)m(k-sorting)f(text)j(compression)d(algorithm,)150 665 y(and)33 b(Hu\013man)g(co)s(ding.)50 b(Compression)32 b(is)h(generally)g(considerably)f(b)s(etter)i(than)f(that)h(ac)m(hiev)m (ed)h(b)m(y)150 775 y(more)f(con)m(v)m(en)m(tional)g(LZ77/LZ78-based)g (compressors,)g(and)f(approac)m(hes)h(the)f(p)s(erformance)g(of)h(the) 150 884 y(PPM)c(family)f(of)i(statistical)f(compressors.)150 1041 y Fj(bzip2)k Fl(is)h(built)e(on)i(top)h(of)g Fj(libbzip2)p Fl(,)e(a)i(\015exible)e(library)f(for)i(handling)e(compressed)i(data)i (in)d(the)150 1151 y Fj(bzip2)c Fl(format.)43 b(This)30 b(man)m(ual)g(describ)s(es)g(b)s(oth)g(ho)m(w)i(to)g(use)f(the)g (program)g(and)g(ho)m(w)g(to)h(w)m(ork)f(with)150 1260 y(the)d(library)d(in)m(terface.)41 b(Most)28 b(of)g(the)g(man)m(ual)f (is)g(dev)m(oted)i(to)f(this)f(library)-8 b(,)26 b(not)i(the)g (program,)g(whic)m(h)150 1370 y(is)h(go)s(o)s(d)i(news)e(if)h(y)m(our)g (in)m(terest)h(is)e(only)g(in)h(the)g(program.)150 1527 y(Chapter)24 b(2)g(describ)s(es)f(ho)m(w)h(to)h(use)f Fj(bzip2)p Fl(;)h(this)e(is)g(the)i(only)e(part)h(y)m(ou)h(need)f(to)h (read)f(if)f(y)m(ou)h(just)g(w)m(an)m(t)150 1636 y(to)35 b(kno)m(w)f(ho)m(w)g(to)g(op)s(erate)h(the)f(program.)51 b(Chapter)34 b(3)g(describ)s(es)e(the)i(programming)f(in)m(terfaces)h (in)150 1746 y(detail,)23 b(and)d(Chapter)h(4)h(records)f(some)h (miscellaneous)e(notes)i(whic)m(h)e(I)h(though)m(t)h(ough)m(t)g(to)g(b) s(e)f(recorded)150 1855 y(somewhere.)p eop %%Page: 3 4 3 3 bop 150 -116 a Fl(Chapter)30 b(2:)41 b(Ho)m(w)31 b(to)g(use)f Fj(bzip2)2375 b Fl(3)150 299 y Fh(2)80 b(Ho)l(w)53 b(to)g(use)g Fg(bzip2)150 566 y Fl(This)29 b(c)m(hapter)i(con)m(tains)f (a)h(cop)m(y)g(of)g(the)f Fj(bzip2)f Fl(man)h(page,)h(and)f(nothing)g (else.)390 818 y Ff(NAME)570 1004 y Fj(bzip2)p Fl(,)f Fj(bunzip2)g Fl(-)h(a)h(blo)s(c)m(k-sorting)f(\014le)f(compressor,)i (v1.0)570 1136 y Fj(bzcat)e Fl(-)i(decompresses)f(\014les)f(to)i (stdout)570 1267 y Fj(bzip2recover)c Fl(-)k(reco)m(v)m(ers)h(data)f (from)f(damaged)g(bzip2)g(\014les)390 1519 y Ff(SYNOPSIS)570 1706 y Fj(bzip2)f Fl([)h(-cdfkqstvzVL123456789)35 b(])c([)g (\014lenames)e(...)41 b(])570 1837 y Fj(bunzip2)28 b Fl([)j(-fkvsVL)f(])h([)f(\014lenames)g(...)41 b(])570 1968 y Fj(bzcat)29 b Fl([)h(-s)h(])g([)f(\014lenames)g(...)41 b(])570 2100 y Fj(bzip2recover)27 b Fl(\014lename)390 2352 y Ff(DESCRIPTION)390 2538 y Fj(bzip2)i Fl(compresses)i(\014les)f (using)f(the)i(Burro)m(ws-Wheeler)g(blo)s(c)m(k)f(sorting)g(text)i (compres-)390 2642 y(sion)40 b(algorithm,)j(and)d(Hu\013man)h(co)s (ding.)71 b(Compression)40 b(is)g(generally)g(considerably)390 2746 y(b)s(etter)25 b(than)g(that)h(ac)m(hiev)m(ed)g(b)m(y)f(more)g (con)m(v)m(en)m(tional)h(LZ77/LZ78-based)g(compressors,)390 2850 y(and)k(approac)m(hes)h(the)f(p)s(erformance)g(of)h(the)f(PPM)g (family)f(of)i(statistical)f(compressors.)390 3001 y(The)e (command-line)e(options)i(are)h(delib)s(erately)d(v)m(ery)i(similar)e (to)j(those)g(of)f(GNU)h Fj(gzip)p Fl(,)390 3104 y(but)h(they)g(are)h (not)g(iden)m(tical.)390 3255 y Fj(bzip2)f Fl(exp)s(ects)h(a)g(list)f (of)h(\014le)f(names)h(to)h(accompan)m(y)h(the)e(command-line)e (\015ags.)43 b(Eac)m(h)390 3359 y(\014le)e(is)h(replaced)g(b)m(y)g(a)h (compressed)f(v)m(ersion)g(of)g(itself,)i(with)e(the)g(name)g Fj(original_)390 3463 y(name.bz2)p Fl(.)49 b(Eac)m(h)34 b(compressed)g(\014le)f(has)g(the)h(same)g(mo)s(di\014cation)e(date,)k (p)s(ermissions,)390 3567 y(and,)24 b(when)f(p)s(ossible,)f(o)m (wnership)f(as)j(the)f(corresp)s(onding)f(original,)h(so)g(that)h (these)g(prop-)390 3671 y(erties)34 b(can)g(b)s(e)f(correctly)i (restored)f(at)g(decompression)f(time.)51 b(File)34 b(name)g(handling)d (is)390 3774 y(naiv)m(e)26 b(in)f(the)i(sense)f(that)h(there)f(is)f(no) i(mec)m(hanism)e(for)h(preserving)f(original)f(\014le)i(names,)390 3878 y(p)s(ermissions,)37 b(o)m(wnerships)f(or)h(dates)i(in)d (\014lesystems)h(whic)m(h)g(lac)m(k)h(these)g(concepts,)j(or)390 3982 y(ha)m(v)m(e)32 b(serious)d(\014le)g(name)i(length)f (restrictions,)f(suc)m(h)h(as)h(MS-DOS.)390 4133 y Fj(bzip2)26 b Fl(and)h Fj(bunzip2)e Fl(will)f(b)m(y)k(default)e(not)i(o)m(v)m (erwrite)g(existing)e(\014les.)38 b(If)27 b(y)m(ou)h(w)m(an)m(t)g(this) 390 4237 y(to)j(happ)s(en,)e(sp)s(ecify)g(the)i Fj(-f)e Fl(\015ag.)390 4388 y(If)34 b(no)h(\014le)f(names)g(are)i(sp)s (eci\014ed,)e Fj(bzip2)f Fl(compresses)i(from)f(standard)g(input)f(to)j (stan-)390 4491 y(dard)c(output.)49 b(In)32 b(this)g(case,)k Fj(bzip2)31 b Fl(will)g(decline)h(to)i(write)e(compressed)h(output)g (to)h(a)390 4595 y(terminal,)29 b(as)i(this)e(w)m(ould)g(b)s(e)h(en)m (tirely)f(incomprehensible)e(and)j(therefore)h(p)s(oin)m(tless.)390 4746 y Fj(bunzip2)36 b Fl(\(or)j Fj(bzip2)29 b(-d)p Fl(\))37 b(decompresses)i(all)e(sp)s(eci\014ed)f(\014les.)63 b(Files)37 b(whic)m(h)g(w)m(ere)i(not)390 4850 y(created)e(b)m(y)f Fj(bzip2)f Fl(will)e(b)s(e)i(detected)j(and)d(ignored,)i(and)e(a)i(w)m (arning)d(issued.)56 b Fj(bzip2)390 4954 y Fl(attempts)31 b(to)f(guess)g(the)g(\014lename)f(for)h(the)g(decompressed)f(\014le)g (from)h(that)g(of)g(the)g(com-)390 5058 y(pressed)f(\014le)h(as)h (follo)m(ws:)570 5209 y Fj(filename.bz2)57 b Fl(b)s(ecomes)31 b Fj(filename)570 5340 y(filename.bz)58 b Fl(b)s(ecomes)30 b Fj(filename)p eop %%Page: 4 5 4 4 bop 150 -116 a Fl(Chapter)30 b(2:)41 b(Ho)m(w)31 b(to)g(use)f Fj(bzip2)2375 b Fl(4)570 299 y Fj(filename.tbz2)27 b Fl(b)s(ecomes)j Fj(filename.tar)570 470 y(filename.tbz)57 b Fl(b)s(ecomes)31 b Fj(filename.tar)570 641 y(anyothername)57 b Fl(b)s(ecomes)31 b Fj(anyothername.out)390 859 y Fl(If)j(the)h (\014le)e(do)s(es)i(not)f(end)g(in)f(one)i(of)g(the)g(recognised)f (endings,)g Fj(.bz2)p Fl(,)h Fj(.bz)p Fl(,)g Fj(.tbz2)e Fl(or)390 963 y Fj(.tbz)p Fl(,)h Fj(bzip2)f Fl(complains)f(that)j(it)e (cannot)i(guess)f(the)g(name)h(of)f(the)g(original)e(\014le,)j(and)390 1067 y(uses)30 b(the)g(original)f(name)h(with)g Fj(.out)f Fl(app)s(ended.)390 1218 y(As)j(with)f(compression,)h(supplying)c(no)k (\014lenames)f(causes)i(decompression)e(from)h(stan-)390 1321 y(dard)d(input)g(to)i(standard)e(output.)390 1472 y Fj(bunzip2)k Fl(will)g(correctly)j(decompress)e(a)i(\014le)e(whic)m (h)g(is)h(the)g(concatenation)i(of)e(t)m(w)m(o)i(or)390 1576 y(more)j(compressed)f(\014les.)67 b(The)39 b(result)g(is)g(the)g (concatenation)i(of)f(the)g(corresp)s(onding)390 1680 y(uncompressed)c(\014les.)59 b(In)m(tegrit)m(y)38 b(testing)f(\()p Fj(-t)p Fl(\))g(of)g(concatenated)i(compressed)e(\014les)f(is)390 1784 y(also)30 b(supp)s(orted.)390 1935 y(Y)-8 b(ou)40 b(can)g(also)f(compress)g(or)g(decompress)g(\014les)g(to)h(the)f (standard)g(output)g(b)m(y)g(giving)390 2039 y(the)30 b Fj(-c)g Fl(\015ag.)40 b(Multiple)28 b(\014les)h(ma)m(y)i(b)s(e)e (compressed)h(and)f(decompressed)h(lik)m(e)f(this.)39 b(The)390 2142 y(resulting)31 b(outputs)i(are)h(fed)f(sequen)m(tially)f (to)i(stdout.)49 b(Compression)32 b(of)h(m)m(ultiple)e(\014les)390 2246 y(in)24 b(this)g(manner)h(generates)h(a)g(stream)f(con)m(taining)g (m)m(ultiple)e(compressed)i(\014le)f(represen-)390 2350 y(tations.)58 b(Suc)m(h)36 b(a)g(stream)g(can)h(b)s(e)e(decompressed)h (correctly)h(only)e(b)m(y)h Fj(bzip2)e Fl(v)m(ersion)390 2454 y(0.9.0)g(or)e(later.)47 b(Earlier)30 b(v)m(ersions)i(of)g Fj(bzip2)f Fl(will)f(stop)i(after)h(decompressing)e(the)i(\014rst)390 2558 y(\014le)c(in)h(the)g(stream.)390 2709 y Fj(bzcat)f Fl(\(or)i Fj(bzip2)e(-dc)p Fl(\))g(decompresses)i(all)e(sp)s(eci\014ed) g(\014les)g(to)i(the)g(standard)e(output.)390 2860 y Fj(bzip2)f Fl(will)g(read)i(argumen)m(ts)g(from)f(the)h(en)m(vironmen)m (t)g(v)-5 b(ariables)28 b Fj(BZIP2)h Fl(and)g Fj(BZIP)p Fl(,)g(in)390 2963 y(that)24 b(order,)g(and)f(will)e(pro)s(cess)i(them) g(b)s(efore)g(an)m(y)h(argumen)m(ts)f(read)h(from)f(the)g(command)390 3067 y(line.)39 b(This)29 b(giv)m(es)h(a)h(con)m(v)m(enien)m(t)h(w)m(a) m(y)f(to)g(supply)d(default)i(argumen)m(ts.)390 3218 y(Compression)h(is)h(alw)m(a)m(ys)i(p)s(erformed,)e(ev)m(en)h(if)f(the) h(compressed)g(\014le)f(is)g(sligh)m(tly)f(larger)390 3322 y(than)26 b(the)g(original.)38 b(Files)25 b(of)h(less)g(than)g(ab) s(out)g(one)g(h)m(undred)e(b)m(ytes)j(tend)f(to)h(get)g(larger,)390 3426 y(since)34 b(the)g(compression)f(mec)m(hanism)h(has)f(a)i(constan) m(t)g(o)m(v)m(erhead)h(in)d(the)h(region)g(of)g(50)390 3529 y(b)m(ytes.)54 b(Random)34 b(data)h(\(including)d(the)i(output)h (of)f(most)h(\014le)f(compressors\))h(is)e(co)s(ded)390 3633 y(at)e(ab)s(out)f(8.05)i(bits)d(p)s(er)h(b)m(yte,)h(giving)e(an)h (expansion)g(of)g(around)g(0.5\045.)390 3784 y(As)h(a)g(self-c)m(hec)m (k)h(for)e(y)m(our)h(protection,)g Fj(bzip2)f Fl(uses)g(32-bit)h(CR)m (Cs)f(to)i(mak)m(e)f(sure)f(that)390 3888 y(the)45 b(decompressed)f(v)m (ersion)g(of)g(a)h(\014le)e(is)h(iden)m(tical)f(to)i(the)g(original.)81 b(This)43 b(guards)390 3992 y(against)i(corruption)e(of)h(the)h (compressed)f(data,)49 b(and)44 b(against)h(undetected)g(bugs)e(in)390 4096 y Fj(bzip2)35 b Fl(\(hop)s(efully)e(v)m(ery)k(unlik)m(ely\).)56 b(The)36 b(c)m(hances)h(of)f(data)h(corruption)e(going)h(unde-)390 4199 y(tected)g(is)e(microscopic,)h(ab)s(out)f(one)h(c)m(hance)g(in)f (four)g(billion)d(for)j(eac)m(h)i(\014le)d(pro)s(cessed.)390 4303 y(Be)38 b(a)m(w)m(are,)k(though,)d(that)f(the)g(c)m(hec)m(k)i(o)s (ccurs)d(up)s(on)f(decompression,)j(so)f(it)f(can)h(only)390 4407 y(tell)28 b(y)m(ou)g(that)i(something)d(is)h(wrong.)40 b(It)28 b(can't)i(help)d(y)m(ou)i(reco)m(v)m(er)h(the)e(original)f (uncom-)390 4511 y(pressed)h(data.)41 b(Y)-8 b(ou)30 b(can)f(use)g Fj(bzip2recover)d Fl(to)k(try)f(to)h(reco)m(v)m(er)h (data)f(from)e(damaged)390 4614 y(\014les.)390 4766 y(Return)22 b(v)-5 b(alues:)37 b(0)23 b(for)g(a)g(normal)f(exit,)j(1)e(for)g(en)m (vironmen)m(tal)f(problems)f(\(\014le)i(not)g(found,)390 4869 y(in)m(v)-5 b(alid)30 b(\015ags,)k(I/O)f(errors,)g(&c\),)h(2)f(to) g(indicate)f(a)h(corrupt)f(compressed)h(\014le,)f(3)i(for)e(an)390 4973 y(in)m(ternal)d(consistency)h(error)g(\(eg,)i(bug\))e(whic)m(h)f (caused)i Fj(bzip2)e Fl(to)i(panic.)390 5304 y Ff(OPTIONS)p eop %%Page: 5 6 5 5 bop 150 -116 a Fl(Chapter)30 b(2:)41 b(Ho)m(w)31 b(to)g(use)f Fj(bzip2)2375 b Fl(5)390 299 y Fj(-c)30 b(--stdout)870 403 y Fl(Compress)f(or)i(decompress)f(to)h(standard)e (output.)390 557 y Fj(-d)h(--decompress)870 661 y Fl(F)-8 b(orce)44 b(decompression.)77 b Fj(bzip2)p Fl(,)44 b Fj(bunzip2)d Fl(and)h Fj(bzcat)f Fl(are)i(really)f(the)870 764 y(same)27 b(program,)h(and)e(the)i(decision)d(ab)s(out)i(what)g (actions)g(to)h(tak)m(e)g(is)e(done)870 868 y(on)k(the)h(basis)e(of)i (whic)m(h)e(name)h(is)g(used.)40 b(This)28 b(\015ag)j(o)m(v)m(errides)f (that)h(mec)m(h-)870 972 y(anism,)e(and)h(forces)h(bzip2)e(to)i (decompress.)390 1126 y Fj(-z)f(--compress)870 1230 y Fl(The)39 b(complemen)m(t)h(to)g Fj(-d)p Fl(:)59 b(forces)40 b(compression,)h(regardless)d(of)i(the)g(in-)870 1334 y(v)m(ok)-5 b(ation)31 b(name.)390 1488 y Fj(-t)f(--test)8 b Fl(Chec)m(k)33 b(in)m(tegrit)m(y)j(of)f(the)g(sp)s(eci\014ed)e (\014le\(s\),)k(but)d(don't)h(decompress)g(them.)870 1591 y(This)40 b(really)g(p)s(erforms)g(a)i(trial)e(decompression)h (and)g(thro)m(ws)g(a)m(w)m(a)m(y)j(the)870 1695 y(result.)390 1849 y Fj(-f)30 b(--force)870 1953 y Fl(F)-8 b(orce)31 b(o)m(v)m(erwrite)f(of)g(output)f(\014les.)40 b(Normally)-8 b(,)29 b Fj(bzip2)f Fl(will)f(not)j(o)m(v)m(erwrite)870 2057 y(existing)e(output)g(\014les.)39 b(Also)28 b(forces)h Fj(bzip2)e Fl(to)i(break)g(hard)e(links)f(to)k(\014les,)870 2161 y(whic)m(h)f(it)h(otherwise)g(w)m(ouldn't)f(do.)390 2315 y Fj(-k)h(--keep)8 b Fl(Keep)24 b(\(don't)i(delete\))h(input)d (\014les)g(during)g(compression)h(or)h(decompression.)390 2469 y Fj(-s)k(--small)870 2573 y Fl(Reduce)23 b(memory)f(usage,)j(for) d(compression,)h(decompression)f(and)g(testing.)870 2676 y(Files)f(are)i(decompressed)e(and)h(tested)h(using)e(a)h(mo)s (di\014ed)e(algorithm)h(whic)m(h)870 2780 y(only)30 b(requires)g(2.5)j (b)m(ytes)f(p)s(er)e(blo)s(c)m(k)h(b)m(yte.)44 b(This)30 b(means)h(an)m(y)h(\014le)e(can)i(b)s(e)870 2884 y(decompressed)d(in)f (2300k)j(of)e(memory)-8 b(,)30 b(alb)s(eit)e(at)i(ab)s(out)f(half)g (the)g(normal)870 2988 y(sp)s(eed.)870 3117 y(During)42 b(compression,)k Fj(-s)d Fl(selects)h(a)g(blo)s(c)m(k)g(size)f(of)h (200k,)k(whic)m(h)42 b(lim-)870 3220 y(its)33 b(memory)g(use)g(to)h (around)e(the)i(same)f(\014gure,)h(at)g(the)g(exp)s(ense)f(of)g(y)m (our)870 3324 y(compression)g(ratio.)50 b(In)33 b(short,)i(if)d(y)m (our)i(mac)m(hine)f(is)g(lo)m(w)g(on)h(memory)f(\(8)870 3428 y(megab)m(ytes)42 b(or)e(less\),)j(use)d(-s)g(for)g(ev)m (erything.)71 b(See)40 b(MEMOR)-8 b(Y)41 b(MAN-)870 3532 y(A)m(GEMENT)31 b(b)s(elo)m(w.)390 3686 y Fj(-q)f(--quiet)870 3790 y Fl(Suppress)j(non-essen)m(tial)j(w)m(arning)e(messages.)58 b(Messages)38 b(p)s(ertaining)33 b(to)870 3893 y(I/O)d(errors)g(and)g (other)h(critical)e(ev)m(en)m(ts)j(will)27 b(not)k(b)s(e)f(suppressed.) 390 4047 y Fj(-v)g(--verbose)870 4151 y Fl(V)-8 b(erb)s(ose)28 b(mo)s(de)f({)i(sho)m(w)e(the)h(compression)f(ratio)h(for)f(eac)m(h)i (\014le)e(pro)s(cessed.)870 4255 y(F)-8 b(urther)30 b Fj(-v)p Fl('s)g(increase)g(the)g(v)m(erb)s(osit)m(y)g(lev)m(el,)h(sp)s (ewing)d(out)j(lots)f(of)g(infor-)870 4359 y(mation)g(whic)m(h)f(is)h (primarily)d(of)j(in)m(terest)h(for)f(diagnostic)g(purp)s(oses.)390 4513 y Fj(-L)g(--license)e(-V)h(--version)870 4617 y Fl(Displa)m(y)h(the)g(soft)m(w)m(are)i(v)m(ersion,)e(license)f(terms)i (and)e(conditions.)390 4771 y Fj(-1)h(to)g(-9)72 b Fl(Set)35 b(the)g(blo)s(c)m(k)f(size)h(to)g(100)h(k,)g(200)g(k)f(..)53 b(900)36 b(k)f(when)f(compressing.)53 b(Has)870 4875 y(no)41 b(e\013ect)h(when)d(decompressing.)71 b(See)41 b(MEMOR)-8 b(Y)41 b(MANA)m(GEMENT)870 4978 y(b)s(elo)m(w.)390 5132 y Fj(--)324 b Fl(T)-8 b(reats)25 b(all)e(subsequen)m(t)g(argumen)m (ts)i(as)f(\014le)g(names,)h(ev)m(en)g(if)e(they)i(start)f(with)870 5236 y(a)32 b(dash.)43 b(This)29 b(is)h(so)i(y)m(ou)g(can)f(handle)f (\014les)g(with)g(names)i(b)s(eginning)c(with)870 5340 y(a)j(dash,)f(for)g(example:)40 b Fj(bzip2)29 b(--)h(-myfilename)p Fl(.)p eop %%Page: 6 7 6 6 bop 150 -116 a Fl(Chapter)30 b(2:)41 b(Ho)m(w)31 b(to)g(use)f Fj(bzip2)2375 b Fl(6)390 299 y Fj(--repetitive-fast)390 427 y(--repetitive-best)870 530 y Fl(These)34 b(\015ags)g(are)h (redundan)m(t)e(in)g(v)m(ersions)g(0.9.5)j(and)e(ab)s(o)m(v)m(e.)53 b(They)34 b(pro-)870 634 y(vided)h(some)i(coarse)g(con)m(trol)g(o)m(v)m (er)g(the)g(b)s(eha)m(viour)e(of)h(the)g(sorting)g(algo-)870 738 y(rithm)h(in)h(earlier)g(v)m(ersions,)j(whic)m(h)d(w)m(as)h (sometimes)h(useful.)65 b(0.9.5)41 b(and)870 842 y(ab)s(o)m(v)m(e)34 b(ha)m(v)m(e)g(an)f(impro)m(v)m(ed)g(algorithm)f(whic)m(h)f(renders)h (these)h(\015ags)h(irrel-)870 946 y(ev)-5 b(an)m(t.)390 1190 y Ff(MEMOR)-10 b(Y)40 b(MANA)m(GEMENT)390 1377 y Fj(bzip2)25 b Fl(compresses)i(large)g(\014les)e(in)g(blo)s(c)m(ks.)39 b(The)26 b(blo)s(c)m(k)h(size)f(a\013ects)i(b)s(oth)e(the)h(compres-) 390 1481 y(sion)39 b(ratio)g(ac)m(hiev)m(ed,)k(and)d(the)f(amoun)m(t)i (of)e(memory)h(needed)f(for)h(compression)f(and)390 1585 y(decompression.)59 b(The)36 b(\015ags)h Fj(-1)f Fl(through)h Fj(-9)f Fl(sp)s(ecify)f(the)i(blo)s(c)m(k)g(size)f(to)i(b)s(e)e (100,000)390 1688 y(b)m(ytes)29 b(through)e(900,000)k(b)m(ytes)d(\(the) h(default\))e(resp)s(ectiv)m(ely)-8 b(.)40 b(A)m(t)29 b(decompression)e(time,)390 1792 y(the)32 b(blo)s(c)m(k)g(size)g(used)g (for)g(compression)f(is)g(read)h(from)g(the)g(header)g(of)h(the)f (compressed)390 1896 y(\014le,)j(and)f Fj(bunzip2)e Fl(then)i(allo)s (cates)h(itself)e(just)h(enough)g(memory)g(to)i(decompress)e(the)390 2000 y(\014le.)39 b(Since)29 b(blo)s(c)m(k)g(sizes)g(are)h(stored)f(in) f(compressed)h(\014les,)g(it)g(follo)m(ws)f(that)i(the)g(\015ags)g Fj(-1)390 2103 y Fl(to)h Fj(-9)f Fl(are)h(irrelev)-5 b(an)m(t)29 b(to)i(and)f(so)h(ignored)e(during)f(decompression.)390 2255 y(Compression)h(and)g(decompression)h(requiremen)m(ts,)f(in)g(b)m (ytes,)j(can)e(b)s(e)g(estimated)h(as:)869 2406 y Fj(Compression:)140 b(400k)46 b(+)i(\()f(8)h(x)f(block)f(size)h(\))869 2613 y(Decompression:)d(100k)i(+)i(\()f(4)h(x)f(block)f(size)h(\),)g(or)1585 2717 y(100k)f(+)i(\()f(2.5)g(x)g(block)g(size)f(\))390 2868 y Fl(Larger)29 b(blo)s(c)m(k)f(sizes)h(giv)m(e)g(rapidly)d (diminishing)e(marginal)k(returns.)39 b(Most)29 b(of)g(the)g(com-)390 2972 y(pression)d(comes)j(from)f(the)g(\014rst)g(t)m(w)m(o)h(or)f (three)h(h)m(undred)d(k)i(of)g(blo)s(c)m(k)g(size,)g(a)h(fact)g(w)m (orth)390 3075 y(b)s(earing)j(in)f(mind)g(when)h(using)f Fj(bzip2)h Fl(on)g(small)g(mac)m(hines.)47 b(It)33 b(is)f(also)h(imp)s (ortan)m(t)f(to)390 3179 y(appreciate)j(that)h(the)f(decompression)f (memory)h(requiremen)m(t)f(is)h(set)g(at)h(compression)390 3283 y(time)30 b(b)m(y)g(the)h(c)m(hoice)g(of)g(blo)s(c)m(k)f(size.)390 3434 y(F)-8 b(or)45 b(\014les)f(compressed)g(with)g(the)g(default)g (900k)i(blo)s(c)m(k)e(size,)49 b Fj(bunzip2)42 b Fl(will)g(require)390 3538 y(ab)s(out)29 b(3700)j(kb)m(ytes)e(to)h(decompress.)40 b(T)-8 b(o)30 b(supp)s(ort)e(decompression)h(of)h(an)m(y)g(\014le)f(on) g(a)i(4)390 3642 y(megab)m(yte)h(mac)m(hine,)d Fj(bunzip2)f Fl(has)i(an)g(option)f(to)i(decompress)e(using)g(appro)m(ximately)390 3745 y(half)k(this)g(amoun)m(t)i(of)f(memory)-8 b(,)36 b(ab)s(out)e(2300)i(kb)m(ytes.)53 b(Decompression)34 b(sp)s(eed)g(is)f(also)390 3849 y(halv)m(ed,)i(so)f(y)m(ou)h(should)d (use)h(this)g(option)h(only)f(where)h(necessary)-8 b(.)53 b(The)33 b(relev)-5 b(an)m(t)35 b(\015ag)390 3953 y(is)29 b Fj(-s)p Fl(.)390 4104 y(In)34 b(general,)i(try)f(and)f(use)g(the)h (largest)h(blo)s(c)m(k)e(size)h(memory)f(constrain)m(ts)h(allo)m(w,)h (since)390 4208 y(that)45 b(maximises)f(the)h(compression)f(ac)m(hiev)m (ed.)85 b(Compression)43 b(and)h(decompression)390 4311 y(sp)s(eed)30 b(are)g(virtually)e(una\013ected)j(b)m(y)f(blo)s(c)m(k)g (size.)390 4463 y(Another)25 b(signi\014can)m(t)f(p)s(oin)m(t)g (applies)f(to)j(\014les)e(whic)m(h)g(\014t)h(in)e(a)j(single)d(blo)s(c) m(k)i({)g(that)h(means)390 4566 y(most)g(\014les)g(y)m(ou'd)g(encoun)m (ter)h(using)d(a)j(large)f(blo)s(c)m(k)g(size.)39 b(The)25 b(amoun)m(t)i(of)f(real)g(memory)390 4670 y(touc)m(hed)38 b(is)e(prop)s(ortional)f(to)j(the)f(size)g(of)h(the)f(\014le,)h(since)f (the)g(\014le)g(is)f(smaller)g(than)h(a)390 4774 y(blo)s(c)m(k.)49 b(F)-8 b(or)35 b(example,)f(compressing)e(a)i(\014le)e(20,000)k(b)m (ytes)e(long)f(with)f(the)i(\015ag)g Fj(-9)f Fl(will)390 4878 y(cause)28 b(the)f(compressor)g(to)h(allo)s(cate)f(around)f(7600k) j(of)e(memory)-8 b(,)28 b(but)f(only)f(touc)m(h)i(400k)390 4981 y Fj(+)h Fl(20000)j(*)e(8)g(=)f(560)i(kb)m(ytes)f(of)g(it.)40 b(Similarly)-8 b(,)26 b(the)k(decompressor)f(will)e(allo)s(cate)j (3700k)390 5085 y(but)g(only)f(touc)m(h)i(100k)h Fj(+)e Fl(20000)i(*)f(4)g(=)f(180)i(kb)m(ytes.)390 5236 y(Here)41 b(is)f(a)i(table)f(whic)m(h)e(summarises)g(the)j(maxim)m(um)d(memory)i (usage)h(for)e(di\013eren)m(t)390 5340 y(blo)s(c)m(k)25 b(sizes.)38 b(Also)25 b(recorded)g(is)f(the)i(total)g(compressed)e (size)h(for)g(14)h(\014les)e(of)i(the)f(Calgary)p eop %%Page: 7 8 7 7 bop 150 -116 a Fl(Chapter)30 b(2:)41 b(Ho)m(w)31 b(to)g(use)f Fj(bzip2)2375 b Fl(7)390 299 y(T)-8 b(ext)38 b(Compression)d(Corpus)h(totalling)h(3,141,622)k(b)m(ytes.)61 b(This)36 b(column)g(giv)m(es)i(some)390 403 y(feel)23 b(for)f(ho)m(w)h(compression)f(v)-5 b(aries)23 b(with)e(blo)s(c)m(k)i (size.)38 b(These)23 b(\014gures)f(tend)g(to)i(understate)390 506 y(the)g(adv)-5 b(an)m(tage)26 b(of)e(larger)f(blo)s(c)m(k)h(sizes)f (for)h(larger)f(\014les,)h(since)g(the)g(Corpus)e(is)h(dominated)390 610 y(b)m(y)30 b(smaller)f(\014les.)1107 761 y Fj(Compress)141 b(Decompress)g(Decompress)f(Corpus)773 865 y(Flag)238 b(usage)285 b(usage)332 b(-s)48 b(usage)237 b(Size)821 1073 y(-1)286 b(1200k)332 b(500k)429 b(350k)285 b(914704)821 1176 y(-2)h(2000k)332 b(900k)429 b(600k)285 b(877703)821 1280 y(-3)h(2800k)f(1300k)428 b(850k)285 b(860338)821 1384 y(-4)h(3600k)f(1700k)380 b(1100k)285 b(846899)821 1488 y(-5)h(4400k)f(2100k)380 b(1350k)285 b(845160)821 1591 y(-6)h(5200k)f(2500k)380 b(1600k)285 b(838626)821 1695 y(-7)h(6100k)f(2900k)380 b(1850k)285 b(834096)821 1799 y(-8)h(6800k)f(3300k)380 b(2100k)285 b(828642)821 1903 y(-9)h(7600k)f(3700k)380 b(2350k)285 b(828642)390 2147 y Ff(RECO)m(VERING)37 b(D)m(A)-10 b(T)g(A)40 b(FR)m(OM)h(D)m(AMA)m (GED)e(FILES)390 2333 y Fj(bzip2)25 b Fl(compresses)h(\014les)g(in)f (blo)s(c)m(ks,)h(usually)e(900kb)m(ytes)29 b(long.)39 b(Eac)m(h)27 b(blo)s(c)m(k)e(is)h(handled)390 2437 y(indep)s(enden)m (tly)-8 b(.)47 b(If)32 b(a)i(media)e(or)h(transmission)e(error)i (causes)h(a)f(m)m(ulti-blo)s(c)m(k)f Fj(.bz2)g Fl(\014le)390 2541 y(to)k(b)s(ecome)h(damaged,)g(it)e(ma)m(y)i(b)s(e)e(p)s(ossible)e (to)k(reco)m(v)m(er)g(data)f(from)g(the)f(undamaged)390 2645 y(blo)s(c)m(ks)30 b(in)f(the)h(\014le.)390 2796 y(The)j(compressed)h(represen)m(tation)f(of)h(eac)m(h)h(blo)s(c)m(k)e (is)g(delimited)e(b)m(y)j(a)g(48-bit)g(pattern,)390 2900 y(whic)m(h)27 b(mak)m(es)j(it)e(p)s(ossible)e(to)j(\014nd)e(the)i(blo)s (c)m(k)f(b)s(oundaries)e(with)i(reasonable)g(certain)m(t)m(y)-8 b(.)390 3003 y(Eac)m(h)34 b(blo)s(c)m(k)f(also)g(carries)g(its)g(o)m (wn)g(32-bit)g(CR)m(C,)h(so)f(damaged)h(blo)s(c)m(ks)f(can)g(b)s(e)g (distin-)390 3107 y(guished)c(from)h(undamaged)g(ones.)390 3258 y Fj(bzip2recover)37 b Fl(is)j(a)h(simple)e(program)h(whose)g (purp)s(ose)f(is)h(to)i(searc)m(h)f(for)f(blo)s(c)m(ks)g(in)390 3362 y Fj(.bz2)34 b Fl(\014les,)i(and)f(write)f(eac)m(h)j(blo)s(c)m(k)d (out)i(in)m(to)f(its)g(o)m(wn)g Fj(.bz2)f Fl(\014le.)55 b(Y)-8 b(ou)36 b(can)f(then)g(use)390 3466 y Fj(bzip2)29 b(-t)c Fl(to)i(test)f(the)g(in)m(tegrit)m(y)g(of)g(the)g(resulting)e (\014les,)i(and)f(decompress)h(those)g(whic)m(h)390 3569 y(are)31 b(undamaged.)390 3721 y Fj(bzip2recover)41 b Fl(tak)m(es)46 b(a)f(single)e(argumen)m(t,)49 b(the)44 b(name)h(of)g(the)f(damaged)h(\014le,)j(and)390 3824 y(writes)33 b(a)i(n)m(um)m(b)s(er)d(of)j(\014les)e Fj(rec0001file.bz2)p Fl(,)e Fj(rec0002file.bz2)p Fl(,)g(etc,)36 b(con)m(taining)390 3928 y(the)42 b(extracted)g(blo)s(c)m(ks.)74 b(The)41 b(output)g(\014lenames)f(are)i(designed)e(so)i(that)g(the)g(use)f(of) 390 4032 y(wildcards)30 b(in)h(subsequen)m(t)h(pro)s(cessing)f({)i(for) g(example,)g Fj(bzip2)c(-dc)g(rec*file.bz2)e(>)390 4136 y(recovered_data)f Fl({)31 b(lists)e(the)i(\014les)e(in)g(the)i (correct)g(order.)390 4287 y Fj(bzip2recover)38 b Fl(should)i(b)s(e)g (of)i(most)g(use)f(dealing)f(with)g(large)i Fj(.bz2)e Fl(\014les,)k(as)d(these)390 4390 y(will)29 b(con)m(tain)j(man)m(y)g (blo)s(c)m(ks.)45 b(It)32 b(is)f(clearly)g(futile)f(to)i(use)g(it)f(on) h(damaged)g(single-blo)s(c)m(k)390 4494 y(\014les,)g(since)f(a)h (damaged)h(blo)s(c)m(k)e(cannot)i(b)s(e)e(reco)m(v)m(ered.)47 b(If)32 b(y)m(ou)g(wish)e(to)j(minimise)c(an)m(y)390 4598 y(p)s(oten)m(tial)36 b(data)i(loss)e(through)g(media)h(or)f (transmission)f(errors,)j(y)m(ou)f(migh)m(t)g(consider)390 4702 y(compressing)29 b(with)g(a)i(smaller)e(blo)s(c)m(k)h(size.)390 4946 y Ff(PERF)m(ORMANCE)39 b(NOTES)390 5132 y Fl(The)f(sorting)f (phase)h(of)h(compression)e(gathers)i(together)h(similar)35 b(strings)i(in)g(the)i(\014le.)390 5236 y(Because)54 b(of)f(this,)58 b(\014les)52 b(con)m(taining)g(v)m(ery)h(long)g(runs)e (of)i(rep)s(eated)g(sym)m(b)s(ols,)58 b(lik)m(e)390 5340 y Fj(")p Fl(aabaabaabaab)e(...)p Fj(")g Fl(\(rep)s(eated)g(sev)m(eral)f (h)m(undred)e(times\))i(ma)m(y)h(compress)f(more)p eop %%Page: 8 9 8 8 bop 150 -116 a Fl(Chapter)30 b(2:)41 b(Ho)m(w)31 b(to)g(use)f Fj(bzip2)2375 b Fl(8)390 299 y(slo)m(wly)33 b(than)g(normal.)50 b(V)-8 b(ersions)33 b(0.9.5)i(and)f(ab)s(o)m(v)m(e) h(fare)e(m)m(uc)m(h)h(b)s(etter)g(than)f(previous)390 403 y(v)m(ersions)i(in)g(this)f(resp)s(ect.)57 b(The)35 b(ratio)h(b)s(et)m(w)m(een)h(w)m(orst-case)g(and)e(a)m(v)m(erage-case) 40 b(com-)390 506 y(pression)e(time)h(is)f(in)g(the)h(region)g(of)h (10:1.)69 b(F)-8 b(or)40 b(previous)e(v)m(ersions,)j(this)d(\014gure)h (w)m(as)390 610 y(more)f(lik)m(e)g(100:1.)66 b(Y)-8 b(ou)38 b(can)h(use)e(the)i Fj(-vvvv)d Fl(option)i(to)h(monitor)e(progress)h (in)f(great)390 714 y(detail,)30 b(if)f(y)m(ou)i(w)m(an)m(t.)390 865 y(Decompression)f(sp)s(eed)g(is)f(una\013ected)i(b)m(y)f(these)h (phenomena.)390 1016 y Fj(bzip2)i Fl(usually)g(allo)s(cates)i(sev)m (eral)f(megab)m(ytes)j(of)d(memory)h(to)g(op)s(erate)h(in,)e(and)g (then)390 1120 y(c)m(harges)k(all)d(o)m(v)m(er)j(it)f(in)e(a)i(fairly)e (random)h(fashion.)59 b(This)34 b(means)j(that)g(p)s(erformance,)390 1224 y(b)s(oth)27 b(for)h(compressing)f(and)g(decompressing,)h(is)f (largely)g(determined)g(b)m(y)h(the)g(sp)s(eed)f(at)390 1327 y(whic)m(h)35 b(y)m(our)h(mac)m(hine)g(can)g(service)g(cac)m(he)i (misses.)57 b(Because)37 b(of)g(this,)f(small)f(c)m(hanges)390 1431 y(to)f(the)f(co)s(de)h(to)f(reduce)g(the)h(miss)d(rate)j(ha)m(v)m (e)h(b)s(een)d(observ)m(ed)h(to)h(giv)m(e)g(disprop)s(ortion-)390 1535 y(ately)i(large)f(p)s(erformance)f(impro)m(v)m(emen)m(ts.)56 b(I)35 b(imagine)f Fj(bzip2)g Fl(will)e(p)s(erform)i(b)s(est)h(on)390 1639 y(mac)m(hines)30 b(with)f(v)m(ery)i(large)f(cac)m(hes.)390 1885 y Ff(CA)-14 b(VEA)k(TS)390 2072 y Fl(I/O)38 b(error)g(messages)h (are)f(not)h(as)f(helpful)e(as)i(they)g(could)f(b)s(e.)64 b Fj(bzip2)37 b Fl(tries)g(hard)g(to)390 2176 y(detect)29 b(I/O)e(errors)g(and)f(exit)i(cleanly)-8 b(,)27 b(but)g(the)h(details)e (of)h(what)h(the)f(problem)f(is)g(some-)390 2280 y(times)k(seem)h (rather)f(misleading.)390 2431 y(This)j(man)m(ual)g(page)i(p)s(ertains) e(to)i(v)m(ersion)f(1.0)i(of)e Fj(bzip2)p Fl(.)51 b(Compressed)34 b(data)h(created)390 2534 y(b)m(y)25 b(this)e(v)m(ersion)i(is)e(en)m (tirely)h(forw)m(ards)h(and)f(bac)m(kw)m(ards)h(compatible)f(with)f (the)i(previous)390 2638 y(public)18 b(releases,)24 b(v)m(ersions)c (0.1pl2,)k(0.9.0)e(and)f(0.9.5,)k(but)20 b(with)g(the)h(follo)m(wing)e (exception:)390 2742 y(0.9.0)43 b(and)e(ab)s(o)m(v)m(e)h(can)g (correctly)f(decompress)g(m)m(ultiple)e(concatenated)k(compressed)390 2846 y(\014les.)c(0.1pl2)30 b(cannot)g(do)f(this;)f(it)h(will)e(stop)i (after)h(decompressing)e(just)g(the)i(\014rst)e(\014le)g(in)390 2949 y(the)j(stream.)390 3100 y Fj(bzip2recover)20 b Fl(uses)k(32-bit)g(in)m(tegers)f(to)i(represen)m(t)f(bit)e(p)s (ositions)g(in)g(compressed)i(\014les,)390 3204 y(so)j(it)f(cannot)i (handle)d(compressed)i(\014les)f(more)h(than)f(512)i(megab)m(ytes)h (long.)39 b(This)25 b(could)390 3308 y(easily)30 b(b)s(e)f(\014xed.)390 3555 y Ff(A)m(UTHOR)390 3741 y Fl(Julian)f(Sew)m(ard,)i Fj(jseward@acm.org)p Fl(.)390 3892 y(The)24 b(ideas)f(em)m(b)s(o)s (died)f(in)h Fj(bzip2)f Fl(are)j(due)e(to)i(\(at)g(least\))g(the)f (follo)m(wing)e(p)s(eople:)37 b(Mic)m(hael)390 3996 y(Burro)m(ws)48 b(and)g(Da)m(vid)h(Wheeler)f(\(for)h(the)g(blo)s(c)m(k)f(sorting)g (transformation\),)53 b(Da)m(vid)390 4100 y(Wheeler)45 b(\(again,)50 b(for)45 b(the)g(Hu\013man)g(co)s(der\),)k(P)m(eter)d(F) -8 b(en)m(wic)m(k)46 b(\(for)g(the)f(structured)390 4204 y(co)s(ding)26 b(mo)s(del)g(in)f(the)i(original)e Fj(bzip)p Fl(,)i(and)f(man)m(y)h(re\014nemen)m(ts\),)h(and)e(Alistair)f (Mo\013at,)390 4307 y(Radford)34 b(Neal)h(and)f(Ian)h(Witten)g(\(for)f (the)h(arithmetic)g(co)s(der)f(in)g(the)h(original)d Fj(bzip)p Fl(\).)390 4411 y(I)41 b(am)g(m)m(uc)m(h)h(indebted)e(for)h (their)f(help,)j(supp)s(ort)c(and)i(advice.)74 b(See)41 b(the)h(man)m(ual)e(in)390 4515 y(the)28 b(source)g(distribution)23 b(for)28 b(p)s(oin)m(ters)e(to)j(sources)e(of)h(do)s(cumen)m(tation.)40 b(Christian)25 b(v)m(on)390 4619 y(Ro)s(ques)31 b(encouraged)h(me)g(to) g(lo)s(ok)f(for)h(faster)g(sorting)f(algorithms,)f(so)i(as)g(to)g(sp)s (eed)f(up)390 4723 y(compression.)47 b(Bela)34 b(Lubkin)c(encouraged)k (me)f(to)g(impro)m(v)m(e)g(the)g(w)m(orst-case)i(compres-)390 4826 y(sion)25 b(p)s(erformance.)38 b(Man)m(y)26 b(p)s(eople)f(sen)m(t) h(patc)m(hes,)h(help)s(ed)d(with)g(p)s(ortabilit)m(y)f(problems,)390 4930 y(len)m(t)30 b(mac)m(hines,)g(ga)m(v)m(e)j(advice)d(and)g(w)m(ere) h(generally)f(helpful.)p eop %%Page: 9 10 9 9 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29 b(with)g Fj(libbzip2)1927 b Fl(9)150 299 y Fh(3)80 b(Programming)53 b(with)h Fg(libbzip2)150 568 y Fl(This)29 b(c)m(hapter)i(describ)s(es)d (the)j(programming)e(in)m(terface)i(to)g Fj(libbzip2)p Fl(.)150 725 y(F)-8 b(or)36 b(general)e(bac)m(kground)h(information,)f (particularly)f(ab)s(out)h(memory)h(use)f(and)g(p)s(erformance)g(as-) 150 834 y(p)s(ects,)d(y)m(ou'd)f(b)s(e)g(w)m(ell)f(advised)g(to)j(read) e(Chapter)g(2)g(as)h(w)m(ell.)150 1124 y Fk(3.1)68 b(T)-11 b(op-lev)l(el)46 b(structure)150 1316 y Fj(libbzip2)33 b Fl(is)i(a)h(\015exible)e(library)f(for)j(compressing)f(and)g (decompressing)f(data)j(in)d(the)i Fj(bzip2)e Fl(data)150 1426 y(format.)39 b(Although)24 b(pac)m(k)-5 b(aged)26 b(as)e(a)h(single)e(en)m(tit)m(y)-8 b(,)27 b(it)d(helps)f(to)i(regard)g (the)g(library)d(as)i(three)h(separate)150 1535 y(parts:)40 b(the)31 b(lo)m(w)f(lev)m(el)g(in)m(terface,)h(and)f(the)h(high)e(lev)m (el)h(in)m(terface,)h(and)f(some)h(utilit)m(y)d(functions.)150 1692 y(The)38 b(structure)g(of)g Fj(libbzip2)p Fl('s)e(in)m(terfaces)j (is)e(similar)f(to)j(that)g(of)g(Jean-loup)e(Gailly's)g(and)h(Mark)150 1802 y(Adler's)29 b(excellen)m(t)i Fj(zlib)e Fl(library)-8 b(.)150 1959 y(All)29 b(externally)g(visible)f(sym)m(b)s(ols)h(ha)m(v)m (e)i(names)f(b)s(eginning)e Fj(BZ2_)p Fl(.)39 b(This)29 b(is)g(new)h(in)f(v)m(ersion)h(1.0.)41 b(The)150 2068 y(in)m(ten)m(tion)30 b(is)f(to)i(minimise)d(p)s(ollution)f(of)k(the)f (namespaces)h(of)g(library)d(clien)m(ts.)150 2321 y Ff(3.1.1)63 b(Lo)m(w-lev)m(el)39 b(summary)150 2514 y Fl(This)21 b(in)m(terface)h(pro)m(vides)g(services)g(for)g(compressing)f(and)h (decompressing)f(data)i(in)e(memory)-8 b(.)38 b(There's)150 2623 y(no)43 b(pro)m(vision)e(for)h(dealing)g(with)f(\014les,)k (streams)e(or)g(an)m(y)g(other)g(I/O)g(mec)m(hanisms,)i(just)e(straigh) m(t)150 2733 y(memory-to-memory)25 b(w)m(ork.)38 b(In)23 b(fact,)k(this)22 b(part)i(of)f(the)h(library)d(can)j(b)s(e)f(compiled) f(without)h(inclusion)150 2843 y(of)31 b Fj(stdio.h)p Fl(,)d(whic)m(h)h(ma)m(y)i(b)s(e)f(helpful)d(for)k(em)m(b)s(edded)e (applications.)150 2999 y(The)h(lo)m(w-lev)m(el)g(part)g(of)h(the)f (library)e(has)i(no)h(global)e(v)-5 b(ariables)29 b(and)h(is)g (therefore)g(thread-safe.)150 3156 y(Six)d(routines)g(mak)m(e)j(up)d (the)i(lo)m(w)f(lev)m(el)g(in)m(terface:)41 b Fj(BZ2_bzCompressInit)p Fl(,)24 b Fj(BZ2_bzCompress)p Fl(,)h(and)150 3266 y Fj (BZ2_bzCompressEnd)h Fl(for)k(compression,)f(and)h(a)h(corresp)s (onding)d(trio)i Fj(BZ2_bzDecompressInit)p Fl(,)150 3375 y Fj(BZ2_bzDecompress)37 b Fl(and)j Fj(BZ2_bzDecompressEnd)c Fl(for)42 b(decompression.)72 b(The)41 b Fj(*Init)e Fl(functions)150 3485 y(allo)s(cate)44 b(memory)g(for)f(compression/decompression)f(and) h(do)h(other)g(initialisations,)f(whilst)f(the)150 3595 y Fj(*End)29 b Fl(functions)g(close)i(do)m(wn)f(op)s(erations)f(and)h (release)h(memory)-8 b(.)150 3751 y(The)36 b(real)f(w)m(ork)i(is)e (done)h(b)m(y)g Fj(BZ2_bzCompress)c Fl(and)j Fj(BZ2_bzDecompress)p Fl(.)54 b(These)36 b(compress)g(and)150 3861 y(decompress)30 b(data)h(from)f(a)h(user-supplied)c(input)i(bu\013er)g(to)i(a)g (user-supplied)c(output)j(bu\013er.)40 b(These)150 3971 y(bu\013ers)32 b(can)i(b)s(e)e(an)m(y)i(size;)g(arbitrary)e(quan)m (tities)h(of)g(data)h(are)g(handled)d(b)m(y)i(making)f(rep)s(eated)i (calls)150 4080 y(to)f(these)f(functions.)44 b(This)30 b(is)h(a)h(\015exible)e(mec)m(hanism)i(allo)m(wing)e(a)i(consumer-pull) e(st)m(yle)i(of)g(activit)m(y)-8 b(,)150 4190 y(or)30 b(pro)s(ducer-push,)e(or)i(a)h(mixture)e(of)i(b)s(oth.)150 4443 y Ff(3.1.2)63 b(High-lev)m(el)41 b(summary)150 4635 y Fl(This)d(in)m(terface)j(pro)m(vides)e(some)h(handy)f(wrapp)s(ers)f (around)h(the)i(lo)m(w-lev)m(el)f(in)m(terface)g(to)h(facilitate)150 4745 y(reading)26 b(and)g(writing)f Fj(bzip2)g Fl(format)i(\014les)f (\()p Fj(.bz2)g Fl(\014les\).)38 b(The)27 b(routines)e(pro)m(vide)h(ho) s(oks)h(to)g(facilitate)150 4854 y(reading)43 b(\014les)f(in)h(whic)m (h)f(the)i Fj(bzip2)f Fl(data)h(stream)g(is)f(em)m(b)s(edded)f(within)g (some)i(larger-scale)g(\014le)150 4964 y(structure,)30 b(or)h(where)e(there)i(are)g(m)m(ultiple)d Fj(bzip2)h Fl(data)i(streams)f(concatenated)j(end-to-end.)150 5121 y(F)-8 b(or)31 b(reading)f(\014les,)f Fj(BZ2_bzReadOpen)p Fl(,)e Fj(BZ2_bzRead)p Fl(,)h Fj(BZ2_bzReadClose)e Fl(and)150 5230 y Fj(BZ2_bzReadGetUnused)19 b Fl(are)25 b(supplied.)36 b(F)-8 b(or)25 b(writing)d(\014les,)j Fj(BZ2_bzWriteOpen)p Fl(,)d Fj(BZ2_bzWrite)g Fl(and)150 5340 y Fj(BZ2_bzWriteFinish)k Fl(are)k(a)m(v)-5 b(ailable.)p eop %%Page: 10 11 10 10 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29 b(with)g Fj(libbzip2)1881 b Fl(10)150 299 y(As)24 b(with)f(the)h(lo)m (w-lev)m(el)h(library)-8 b(,)23 b(no)h(global)g(v)-5 b(ariables)23 b(are)h(used)g(so)g(the)h(library)c(is)j(p)s(er)f(se)h (thread-safe.)150 408 y(Ho)m(w)m(ev)m(er,)32 b(if)c(I/O)h(errors)g(o)s (ccur)g(whilst)e(reading)i(or)g(writing)e(the)j(underlying)c (compressed)j(\014les,)g(y)m(ou)150 518 y(ma)m(y)j(ha)m(v)m(e)g(to)g (consult)e Fj(errno)g Fl(to)h(determine)g(the)g(cause)g(of)h(the)f (error.)42 b(In)30 b(that)i(case,)h(y)m(ou'd)e(need)g(a)150 628 y(C)f(library)e(whic)m(h)h(correctly)i(supp)s(orts)d Fj(errno)h Fl(in)g(a)i(m)m(ultithreaded)e(en)m(vironmen)m(t.)150 784 y(T)-8 b(o)56 b(mak)m(e)g(the)g(library)d(a)j(little)e(simpler)f (and)i(more)h(p)s(ortable,)61 b Fj(BZ2_bzReadOpen)51 b Fl(and)k Fj(BZ2_)150 894 y(bzWriteOpen)34 b Fl(require)j(y)m(ou)g(to) i(pass)e(them)g(\014le)g(handles)f(\()p Fj(FILE*)p Fl(s\))g(whic)m(h)h (ha)m(v)m(e)h(previously)e(b)s(een)150 1004 y(op)s(ened)41 b(for)g(reading)f(or)h(writing)f(resp)s(ectiv)m(ely)-8 b(.)73 b(That)41 b(a)m(v)m(oids)h(p)s(ortabilit)m(y)d(problems)g(asso)s (ciated)150 1113 y(with)j(\014le)h(op)s(erations)g(and)g(\014le)g (attributes,)j(whilst)c(not)i(b)s(eing)e(m)m(uc)m(h)h(of)h(an)g(imp)s (osition)c(on)k(the)150 1223 y(programmer.)150 1474 y Ff(3.1.3)63 b(Utilit)m(y)40 b(functions)h(summary)150 1666 y Fl(F)-8 b(or)45 b(v)m(ery)g(simple)d(needs,)48 b Fj(BZ2_bzBuffToBuffCompres)o(s)38 b Fl(and)44 b Fj (BZ2_bzBuffToBuffDecompres)o(s)150 1776 y Fl(are)29 b(pro)m(vided.)38 b(These)28 b(compress)g(data)h(in)e(memory)h(from)g(one)h(bu\013er)e (to)i(another)f(bu\013er)g(in)f(a)h(single)150 1885 y(function)38 b(call.)67 b(Y)-8 b(ou)40 b(should)d(assess)j(whether)f(these)h (functions)d(ful\014ll)f(y)m(our)k(memory-to-memory)150 1995 y(compression/decompression)26 b(requiremen)m(ts)h(b)s(efore)g(in) m(v)m(esting)g(e\013ort)i(in)d(understanding)f(the)j(more)150 2105 y(general)i(but)g(more)h(complex)f(lo)m(w-lev)m(el)g(in)m (terface.)150 2261 y(Y)-8 b(oshiok)j(a)47 b(Tsuneo)e(\()p Fj(QWF00133@niftyserve.or.jp)40 b Fl(/)46 b Fj (tsuneo-y@is.aist-nara.ac.)o(jp)p Fl(\))40 b(has)150 2371 y(con)m(tributed)f(some)h(functions)e(to)j(giv)m(e)f(b)s(etter)g Fj(zlib)f Fl(compatibilit)m(y)-8 b(.)67 b(These)40 b(functions)e(are)i Fj(BZ2_)150 2481 y(bzopen)p Fl(,)e Fj(BZ2_bzread)p Fl(,)f Fj(BZ2_bzwrite)p Fl(,)g Fj(BZ2_bzflush)p Fl(,)g Fj(BZ2_bzclose)p Fl(,)f Fj(BZ2_bzerror)f Fl(and)i Fj(BZ2_)150 2590 y(bzlibVersion)p Fl(.)49 b(Y)-8 b(ou)35 b(ma)m(y)g(\014nd)e(these)i(functions)d(more)j (con)m(v)m(enien)m(t)g(for)f(simple)f(\014le)g(reading)h(and)150 2700 y(writing,)c(than)h(those)h(in)e(the)i(high-lev)m(el)e(in)m (terface.)45 b(These)31 b(functions)f(are)i(not)g(\(y)m(et\))h (o\016cially)d(part)150 2809 y(of)k(the)g(library)-8 b(,)33 b(and)g(are)h(minimally)c(do)s(cumen)m(ted)k(here.)51 b(If)33 b(they)h(break,)h(y)m(ou)f(get)h(to)g(k)m(eep)f(all)f(the)150 2919 y(pieces.)40 b(I)31 b(hop)s(e)e(to)i(do)s(cumen)m(t)g(them)f(prop) s(erly)e(when)h(time)i(p)s(ermits.)150 3076 y(Y)-8 b(oshiok)j(a)27 b(also)g(con)m(tributed)f(mo)s(di\014cations)f(to)i(allo)m(w)f(the)h (library)e(to)i(b)s(e)f(built)f(as)i(a)g(Windo)m(ws)f(DLL.)150 3362 y Fk(3.2)68 b(Error)45 b(handling)150 3554 y Fl(The)23 b(library)f(is)h(designed)g(to)i(reco)m(v)m(er)g(cleanly)f(in)e(all)h (situations,)h(including)d(the)j(w)m(orst-case)i(situation)150 3664 y(of)j(decompressing)e(random)g(data.)41 b(I'm)28 b(not)h(100\045)g(sure)f(that)h(it)f(can)h(alw)m(a)m(ys)g(do)f(this,)g (so)g(y)m(ou)h(migh)m(t)150 3774 y(w)m(an)m(t)i(to)g(add)e(a)i(signal)d (handler)g(to)j(catc)m(h)h(segmen)m(tation)f(violations)e(during)f (decompression)h(if)g(y)m(ou)150 3883 y(are)g(feeling)f(esp)s(ecially)f (paranoid.)39 b(I)28 b(w)m(ould)g(b)s(e)g(in)m(terested)h(in)e(hearing) h(more)h(ab)s(out)f(the)h(robustness)150 3993 y(of)i(the)f(library)e (to)j(corrupted)f(compressed)g(data.)150 4150 y(V)-8 b(ersion)39 b(1.0)h(is)f(m)m(uc)m(h)g(more)h(robust)e(in)g(this)g(resp) s(ect)i(than)f(0.9.0)i(or)e(0.9.5.)70 b(In)m(v)m(estigations)39 b(with)150 4259 y(Chec)m(k)m(er)21 b(\(a)g(to)s(ol)g(for)f(detecting)h (problems)d(with)h(memory)h(managemen)m(t,)k(similar)18 b(to)j(Purify\))e(indicate)150 4369 y(that,)40 b(at)e(least)f(for)g (the)h(few)e(\014les)h(I)g(tested,)j(all)c(single-bit)f(errors)i(in)e (the)j(decompressed)f(data)h(are)150 4478 y(caugh)m(t)c(prop)s(erly)-8 b(,)31 b(with)g(no)i(segmen)m(tation)h(faults,)e(no)g(reads)h(of)g (uninitialised)27 b(data)34 b(and)e(no)g(out)h(of)150 4588 y(range)f(reads)g(or)f(writes.)44 b(So)32 b(it's)f(certainly)g(m)m (uc)m(h)h(impro)m(v)m(ed,)g(although)f(I)g(w)m(ouldn't)g(claim)g(it)g (to)i(b)s(e)150 4698 y(totally)d(b)s(om)m(bpro)s(of.)150 4854 y(The)25 b(\014le)g Fj(bzlib.h)f Fl(con)m(tains)i(all)f (de\014nitions)e(needed)i(to)i(use)e(the)h(library)-8 b(.)37 b(In)26 b(particular,)f(y)m(ou)h(should)150 4964 y(de\014nitely)i(not)j(include)d Fj(bzlib_private.h)p Fl(.)150 5121 y(In)39 b Fj(bzlib.h)p Fl(,)h(the)g(v)-5 b(arious)39 b(return)f(v)-5 b(alues)39 b(are)h(de\014ned.)68 b(The)39 b(follo)m(wing)f(list)h(is)f(not)i(in)m(tended)f(as)150 5230 y(an)c(exhaustiv)m(e)h(description)d(of)i(the)h(circumstances)f (in)f(whic)m(h)g(a)i(giv)m(en)f(v)-5 b(alue)35 b(ma)m(y)h(b)s(e)e (returned)h({)150 5340 y(those)h(descriptions)d(are)j(giv)m(en)f (later.)56 b(Rather,)37 b(it)d(is)h(in)m(tended)f(to)i(con)m(v)m(ey)h (the)e(rough)g(meaning)g(of)p eop %%Page: 11 12 11 11 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29 b(with)g Fj(libbzip2)1881 b Fl(11)150 299 y(eac)m(h)38 b(return)d(v)-5 b(alue.)59 b(The)36 b(\014rst)g(\014v)m(e)g(actions)h (are)g(normal)f(and)f(not)i(in)m(tended)f(to)h(denote)g(an)f(error)150 408 y(situation.)150 592 y Fj(BZ_OK)180 b Fl(The)30 b(requested)g (action)h(w)m(as)g(completed)f(successfully)-8 b(.)150 756 y Fj(BZ_RUN_OK)150 866 y(BZ_FLUSH_OK)150 975 y(BZ_FINISH_OK)630 1085 y Fl(In)24 b Fj(BZ2_bzCompress)p Fl(,)e(the)i(requested)g (\015ush/\014nish/nothing-sp)s(ecial)c(action)k(w)m(as)h(com-)630 1194 y(pleted)30 b(successfully)-8 b(.)150 1358 y Fj(BZ_STREAM_END)630 1468 y Fl(Compression)38 b(of)j(data)f(w)m(as)h(completed,)h(or)f(the)f (logical)f(stream)i(end)e(w)m(as)i(detected)630 1577 y(during)28 b(decompression.)150 1761 y(The)i(follo)m(wing)f(return)g (v)-5 b(alues)30 b(indicate)f(an)h(error)g(of)h(some)g(kind.)150 1945 y Fj(BZ_CONFIG_ERROR)630 2055 y Fl(Indicates)48 b(that)h(the)g(library)e(has)h(b)s(een)g(improp)s(erly)d(compiled)j(on) g(y)m(our)h(platform)630 2164 y({)j(a)g(ma)5 b(jor)51 b(con\014guration)g(error.)104 b(Sp)s(eci\014cally)-8 b(,)55 b(it)c(means)g(that)h Fj(sizeof\(char\))p Fl(,)630 2274 y Fj(sizeof\(short\))44 b Fl(and)i Fj(sizeof\(int\))f Fl(are)j(not)f(1,)52 b(2)c(and)f(4)h(resp)s(ectiv)m(ely)-8 b(,)51 b(as)d(they)630 2384 y(should)27 b(b)s(e.)40 b(Note)30 b(that)g(the)f(library)e(should)g(still)g(w)m(ork)i(prop)s(erly)e(on)i (64-bit)g(platforms)630 2493 y(whic)m(h)d(follo)m(w)h(the)g(LP64)h (programming)e(mo)s(del)h({)g(that)h(is,)g(where)e Fj(sizeof\(long\))f Fl(and)630 2603 y Fj(sizeof\(void*\))e Fl(are)k(8.)40 b(Under)25 b(LP64,)j Fj(sizeof\(int\))c Fl(is)h(still)f(4,)k(so)f Fj(libbzip2)p Fl(,)e(whic)m(h)630 2712 y(do)s(esn't)30 b(use)g(the)h Fj(long)e Fl(t)m(yp)s(e,)i(is)e(OK.)150 2876 y Fj(BZ_SEQUENCE_ERROR)630 2986 y Fl(When)43 b(using)f(the)i (library)-8 b(,)45 b(it)e(is)f(imp)s(ortan)m(t)h(to)h(call)e(the)i (functions)e(in)g(the)i(correct)630 3095 y(sequence)28 b(and)f(with)f(data)j(structures)e(\(bu\013ers)f(etc\))j(in)e(the)g (correct)i(states.)41 b Fj(libbzip2)630 3205 y Fl(c)m(hec)m(ks)26 b(as)e(m)m(uc)m(h)h(as)f(it)g(can)g(to)h(ensure)f(this)f(is)g(happ)s (ening,)h(and)f(returns)g Fj(BZ_SEQUENCE_)630 3314 y(ERROR)36 b Fl(if)h(not.)62 b(Co)s(de)37 b(whic)m(h)g(complies)f(precisely)g (with)h(the)g(function)g(seman)m(tics,)j(as)630 3424 y(detailed)d(b)s(elo)m(w,)i(should)d(nev)m(er)i(receiv)m(e)h(this)d(v) -5 b(alue;)41 b(suc)m(h)d(an)g(ev)m(en)m(t)h(denotes)f(buggy)630 3534 y(co)s(de)31 b(whic)m(h)e(y)m(ou)h(should)f(in)m(v)m(estigate.)150 3697 y Fj(BZ_PARAM_ERROR)630 3807 y Fl(Returned)43 b(when)f(a)i (parameter)g(to)h(a)f(function)e(call)h(is)f(out)i(of)g(range)g(or)g (otherwise)630 3917 y(manifestly)34 b(incorrect.)57 b(As)36 b(with)e Fj(BZ_SEQUENCE_ERROR)p Fl(,)f(this)i(denotes)h(a)g(bug)f(in)g (the)630 4026 y(clien)m(t)23 b(co)s(de.)39 b(The)22 b(distinction)f(b)s (et)m(w)m(een)j Fj(BZ_PARAM_ERROR)c Fl(and)j Fj(BZ_SEQUENCE_ERROR)630 4136 y Fl(is)29 b(a)i(bit)f(hazy)-8 b(,)31 b(but)f(still)e(w)m(orth)i (making.)150 4300 y Fj(BZ_MEM_ERROR)630 4409 y Fl(Returned)g(when)f(a)i (request)f(to)i(allo)s(cate)f(memory)f(failed.)40 b(Note)31 b(that)g(the)g(quan)m(tit)m(y)g(of)630 4519 y(memory)21 b(needed)g(to)i(decompress)e(a)g(stream)h(cannot)g(b)s(e)f(determined)f (un)m(til)g(the)h(stream's)630 4628 y(header)29 b(has)g(b)s(een)g (read.)40 b(So)29 b Fj(BZ2_bzDecompress)c Fl(and)j Fj(BZ2_bzRead)f Fl(ma)m(y)j(return)e Fj(BZ_)630 4738 y(MEM_ERROR)d Fl(ev)m(en)k(though) e(some)h(of)g(the)g(compressed)g(data)g(has)g(b)s(een)f(read.)39 b(The)28 b(same)630 4847 y(is)38 b(not)i(true)f(for)g(compression;)k (once)d Fj(BZ2_bzCompressInit)34 b Fl(or)39 b Fj(BZ2_bzWriteOpen)630 4957 y Fl(ha)m(v)m(e)32 b(successfully)c(completed,)j Fj(BZ_MEM_ERROR)c Fl(cannot)k(o)s(ccur.)150 5121 y Fj(BZ_DATA_ERROR)630 5230 y Fl(Returned)h(when)g(a)h(data)g(in)m(tegrit)m(y)g(error)g(is)e (detected)k(during)30 b(decompression.)47 b(Most)630 5340 y(imp)s(ortan)m(tly)-8 b(,)31 b(this)f(means)i(when)f(stored)g (and)g(computed)h(CR)m(Cs)f(for)g(the)h(data)g(do)g(not)p eop %%Page: 12 13 12 12 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29 b(with)g Fj(libbzip2)1881 b Fl(12)630 299 y(matc)m(h.)41 b(This)28 b(v)-5 b(alue)29 b(is)f(also)i(returned)e(up)s(on)g (detection)i(of)g(an)m(y)g(other)f(anomaly)h(in)e(the)630 408 y(compressed)i(data.)150 560 y Fj(BZ_DATA_ERROR_MAGIC)630 670 y Fl(As)k(a)g(sp)s(ecial)f(case)i(of)f Fj(BZ_DATA_ERROR)p Fl(,)d(it)i(is)g(sometimes)h(useful)e(to)j(kno)m(w)f(when)f(the)630 779 y(compressed)d(stream)h(do)s(es)f(not)g(start)h(with)e(the)i (correct)h(magic)e(b)m(ytes)h(\()p Fj('B')f('Z')f('h')p Fl(\).)150 931 y Fj(BZ_IO_ERROR)630 1040 y Fl(Returned)k(b)m(y)h Fj(BZ2_bzRead)d Fl(and)i Fj(BZ2_bzWrite)e Fl(when)i(there)h(is)f(an)g (error)h(reading)f(or)630 1150 y(writing)28 b(in)h(the)h(compressed)g (\014le,)f(and)h(b)m(y)g Fj(BZ2_bzReadOpen)c Fl(and)j Fj(BZ2_bzWriteOpen)630 1259 y Fl(for)i(attempts)i(to)f(use)f(a)h (\014le)e(for)i(whic)m(h)e(the)h(error)g(indicator)g(\(viz,)g Fj(ferror\(f\))p Fl(\))f(is)g(set.)630 1369 y(On)h(receipt)g(of)h Fj(BZ_IO_ERROR)p Fl(,)e(the)h(caller)h(should)d(consult)i Fj(errno)g Fl(and/or)g Fj(perror)f Fl(to)630 1479 y(acquire)g(op)s (erating-system)g(sp)s(eci\014c)f(information)g(ab)s(out)h(the)h (problem.)150 1630 y Fj(BZ_UNEXPECTED_EOF)630 1740 y Fl(Returned)36 b(b)m(y)g Fj(BZ2_bzRead)e Fl(when)i(the)h(compressed)f (\014le)g(\014nishes)e(b)s(efore)j(the)f(logical)630 1849 y(end)30 b(of)g(stream)h(is)e(detected.)150 2001 y Fj(BZ_OUTBUFF_FULL)630 2110 y Fl(Returned)g(b)m(y)i Fj(BZ2_bzBuffToBuffCompres)o(s)24 b Fl(and)30 b Fj (BZ2_bzBuffToBuffDecompres)o(s)630 2220 y Fl(to)h(indicate)f(that)h (the)f(output)g(data)h(will)d(not)i(\014t)h(in)m(to)f(the)h(output)f (bu\013er)f(pro)m(vided.)150 2492 y Fk(3.3)68 b(Lo)l(w-lev)l(el)47 b(in)l(terface)150 2766 y Ff(3.3.1)63 b Fe(BZ2_bzCompressInit)390 2953 y Fj(typedef)533 3057 y(struct)46 b({)676 3161 y(char)h(*next_in;) 676 3264 y(unsigned)f(int)h(avail_in;)676 3368 y(unsigned)f(int)h (total_in_lo32;)676 3472 y(unsigned)f(int)h(total_in_hi32;)676 3680 y(char)g(*next_out;)676 3783 y(unsigned)f(int)h(avail_out;)676 3887 y(unsigned)f(int)h(total_out_lo32;)676 3991 y(unsigned)f(int)h (total_out_hi32;)676 4198 y(void)g(*state;)676 4406 y(void)g (*\(*bzalloc\)\(void)c(*,int,int\);)676 4510 y(void)k (\(*bzfree\)\(void)d(*,void)i(*\);)676 4614 y(void)h(*opaque;)533 4717 y(})533 4821 y(bz_stream;)390 5029 y(int)g(BZ2_bzCompressInit)c (\()k(bz_stream)e(*strm,)1583 5132 y(int)i(blockSize100k,)1583 5236 y(int)g(verbosity,)1583 5340 y(int)g(workFactor)e(\);)p eop %%Page: 13 14 13 13 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29 b(with)g Fj(libbzip2)1881 b Fl(13)150 456 y(Prepares)32 b(for)h(compression.)47 b(The)32 b Fj(bz_stream)e Fl(structure)j(holds) e(all)h(data)h(p)s(ertaining)e(to)i(the)g(com-)150 565 y(pression)i(activit)m(y)-8 b(.)62 b(A)37 b Fj(bz_stream)e Fl(structure)h(should)f(b)s(e)i(allo)s(cated)g(and)f(initialised)e (prior)h(to)j(the)150 675 y(call.)67 b(The)39 b(\014elds)e(of)j Fj(bz_stream)d Fl(comprise)h(the)i(en)m(tiret)m(y)g(of)f(the)h (user-visible)c(data.)68 b Fj(state)38 b Fl(is)h(a)150 784 y(p)s(oin)m(ter)29 b(to)i(the)g(priv)-5 b(ate)30 b(data)h(structures)f(required)e(for)i(compression.)150 941 y(Custom)37 b(memory)g(allo)s(cators)g(are)h(supp)s(orted,)f(via)g (\014elds)f Fj(bzalloc)p Fl(,)h Fj(bzfree)p Fl(,)g(and)g Fj(opaque)p Fl(.)59 b(The)150 1051 y(v)-5 b(alue)32 b Fj(opaque)e Fl(is)i(passed)f(to)i(as)g(the)f(\014rst)g(argumen)m(t)h (to)g(all)e(calls)g(to)i Fj(bzalloc)d Fl(and)i Fj(bzfree)p Fl(,)f(but)h(is)150 1160 y(otherwise)d(ignored)g(b)m(y)h(the)g(library) -8 b(.)38 b(The)29 b(call)h Fj(bzalloc)e(\()i(opaque,)e(n,)i(m)g(\))g Fl(is)e(exp)s(ected)j(to)f(return)150 1270 y(a)g(p)s(oin)m(ter)e Fj(p)h Fl(to)h Fj(n)g(*)g(m)f Fl(b)m(ytes)h(of)g(memory)-8 b(,)30 b(and)e Fj(bzfree)h(\()h(opaque,)f(p)h(\))f Fl(should)e(free)i (that)h(memory)-8 b(.)150 1427 y(If)33 b(y)m(ou)g(don't)h(w)m(an)m(t)g (to)g(use)f(a)g(custom)h(memory)f(allo)s(cator,)h(set)g Fj(bzalloc)p Fl(,)e Fj(bzfree)g Fl(and)h Fj(opaque)e Fl(to)150 1537 y Fj(NULL)p Fl(,)e(and)h(the)h(library)d(will)f(then)k (use)f(the)g(standard)g Fj(malloc)p Fl(/)p Fj(free)e Fl(routines.)150 1693 y(Before)39 b(calling)d Fj(BZ2_bzCompressInit)p Fl(,)f(\014elds)h Fj(bzalloc)p Fl(,)h Fj(bzfree)f Fl(and)h Fj(opaque)f Fl(should)g(b)s(e)h(\014lled)150 1803 y(appropriately)-8 b(,)35 b(as)h(just)f(describ)s(ed.)53 b(Up)s(on)34 b(return,)i(the)g (in)m(ternal)e(state)i(will)d(ha)m(v)m(e)j(b)s(een)f(allo)s(cated)150 1913 y(and)43 b(initialised,)g(and)g Fj(total_in_lo32)p Fl(,)h Fj(total_in_hi32)p Fl(,)f Fj(total_out_lo32)d Fl(and)j Fj(total_out_)150 2022 y(hi32)37 b Fl(will)f(ha)m(v)m(e)j(b)s (een)f(set)h(to)g(zero.)65 b(These)38 b(four)g(\014elds)e(are)j(used)f (b)m(y)g(the)g(library)e(to)j(inform)e(the)150 2132 y(caller)j(of)g (the)h(total)g(amoun)m(t)g(of)g(data)g(passed)f(in)m(to)g(and)g(out)g (of)h(the)g(library)-8 b(,)41 b(resp)s(ectiv)m(ely)-8 b(.)70 b(Y)-8 b(ou)150 2241 y(should)34 b(not)j(try)f(to)h(c)m(hange)g (them.)58 b(As)36 b(of)h(v)m(ersion)f(1.0,)j(64-bit)d(coun)m(ts)h(are)f (main)m(tained,)h(ev)m(en)g(on)150 2351 y(32-bit)i(platforms,)h(using)d (the)i Fj(_hi32)e Fl(\014elds)g(to)j(store)f(the)g(upp)s(er)d(32)k (bits)d(of)i(the)g(coun)m(t.)66 b(So,)41 b(for)150 2460 y(example,)30 b(the)h(total)g(amoun)m(t)g(of)f(data)h(in)f(is)f Fj(\(total_in_hi32)d(<<)k(32\))g(+)g(total_in_lo32)p Fl(.)150 2617 y(P)m(arameter)g Fj(blockSize100k)25 b Fl(sp)s(eci\014es)i(the)h(blo)s(c)m(k)g(size)h(to)g(b)s(e)f(used)f(for) h(compression.)40 b(It)28 b(should)f(b)s(e)150 2727 y(a)k(v)-5 b(alue)30 b(b)s(et)m(w)m(een)i(1)f(and)f(9)h(inclusiv)m(e,)e(and)h(the) h(actual)g(blo)s(c)m(k)f(size)g(used)g(is)g(100000)j(x)e(this)e (\014gure.)42 b(9)150 2836 y(giv)m(es)31 b(the)f(b)s(est)g(compression) g(but)f(tak)m(es)j(most)f(memory)-8 b(.)150 2993 y(P)m(arameter)29 b Fj(verbosity)c Fl(should)h(b)s(e)h(set)i(to)f(a)h(n)m(um)m(b)s(er)d (b)s(et)m(w)m(een)j(0)f(and)f(4)h(inclusiv)m(e.)38 b(0)28 b(is)f(silen)m(t,)h(and)150 3103 y(greater)j(n)m(um)m(b)s(ers)c(giv)m (e)j(increasingly)d(v)m(erb)s(ose)j(monitoring/debugging)d(output.)40 b(If)29 b(the)g(library)e(has)150 3212 y(b)s(een)j(compiled)e(with)i Fj(-DBZ_NO_STDIO)p Fl(,)d(no)j(suc)m(h)g(output)g(will)e(app)s(ear)h (for)h(an)m(y)h(v)m(erb)s(osit)m(y)f(setting.)150 3369 y(P)m(arameter)35 b Fj(workFactor)d Fl(con)m(trols)i(ho)m(w)g(the)g (compression)f(phase)h(b)s(eha)m(v)m(es)g(when)f(presen)m(ted)h(with) 150 3479 y(w)m(orst)40 b(case,)j(highly)37 b(rep)s(etitiv)m(e,)k(input) d(data.)68 b(If)39 b(compression)g(runs)e(in)m(to)j(di\016culties)d (caused)i(b)m(y)150 3588 y(rep)s(etitiv)m(e)34 b(data,)j(the)e(library) d(switc)m(hes)j(from)f(the)h(standard)f(sorting)g(algorithm)g(to)i(a)f (fallbac)m(k)f(al-)150 3698 y(gorithm.)47 b(The)32 b(fallbac)m(k)g(is)g (slo)m(w)m(er)g(than)h(the)f(standard)g(algorithm)g(b)m(y)g(p)s(erhaps) f(a)i(factor)h(of)e(three,)150 3808 y(but)e(alw)m(a)m(ys)h(b)s(eha)m(v) m(es)f(reasonably)-8 b(,)31 b(no)f(matter)h(ho)m(w)g(bad)f(the)g (input.)150 3965 y(Lo)m(w)m(er)25 b(v)-5 b(alues)24 b(of)h Fj(workFactor)d Fl(reduce)i(the)h(amoun)m(t)g(of)g(e\013ort)g(the)g (standard)f(algorithm)f(will)f(exp)s(end)150 4074 y(b)s(efore)j (resorting)h(to)g(the)g(fallbac)m(k.)39 b(Y)-8 b(ou)27 b(should)c(set)k(this)e(parameter)h(carefully;)g(to)s(o)h(lo)m(w,)g (and)e(man)m(y)150 4184 y(inputs)32 b(will)f(b)s(e)i(handled)f(b)m(y)i (the)g(fallbac)m(k)g(algorithm)f(and)g(so)h(compress)g(rather)g(slo)m (wly)-8 b(,)34 b(to)s(o)h(high,)150 4293 y(and)24 b(y)m(our)h(a)m(v)m (erage-to-w)m(orst)30 b(case)c(compression)e(times)h(can)g(b)s(ecome)g (v)m(ery)h(large.)39 b(The)24 b(default)g(v)-5 b(alue)150 4403 y(of)31 b(30)g(giv)m(es)f(reasonable)h(b)s(eha)m(viour)e(o)m(v)m (er)i(a)g(wide)e(range)i(of)f(circumstances.)150 4560 y(Allo)m(w)m(able)h(v)-5 b(alues)31 b(range)i(from)e(0)i(to)f(250)h (inclusiv)m(e.)44 b(0)32 b(is)f(a)h(sp)s(ecial)f(case,)i(equiv)-5 b(alen)m(t)32 b(to)g(using)f(the)150 4669 y(default)f(v)-5 b(alue)29 b(of)i(30.)150 4826 y(Note)38 b(that)f(the)g(compressed)f (output)g(generated)h(is)f(the)g(same)h(regardless)f(of)h(whether)f(or) g(not)h(the)150 4936 y(fallbac)m(k)30 b(algorithm)f(is)h(used.)150 5093 y(Be)23 b(a)m(w)m(are)h(also)f(that)g(this)f(parameter)h(ma)m(y)g (disapp)s(ear)e(en)m(tirely)h(in)f(future)h(v)m(ersions)g(of)h(the)g (library)-8 b(.)36 b(In)150 5202 y(principle)20 b(it)j(should)e(b)s(e)h (p)s(ossible)f(to)j(devise)f(a)g(go)s(o)s(d)g(w)m(a)m(y)i(to)f (automatically)f(c)m(ho)s(ose)h(whic)m(h)e(algorithm)150 5312 y(to)31 b(use.)41 b(Suc)m(h)29 b(a)i(mec)m(hanism)f(w)m(ould)f (render)g(the)i(parameter)g(obsolete.)p eop %%Page: 14 15 14 14 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29 b(with)g Fj(libbzip2)1881 b Fl(14)150 299 y(P)m(ossible)29 b(return)h(v)-5 b(alues:)572 450 y Fj(BZ_CONFIG_ERROR)663 554 y Fl(if)29 b(the)i(library)d(has)i(b)s(een)f(mis-compiled)572 657 y Fj(BZ_PARAM_ERROR)663 761 y Fl(if)g Fj(strm)g Fl(is)h Fj(NULL)663 865 y Fl(or)g Fj(blockSize)e(<)i Fl(1)h(or)f Fj(blockSize)e(>)i Fl(9)663 969 y(or)g Fj(verbosity)e(<)i Fl(0)h(or)f Fj(verbosity)e(>)i Fl(4)663 1073 y(or)g Fj(workFactor)e(<)i Fl(0)g(or)h Fj(workFactor)c(>)j Fl(250)572 1176 y Fj(BZ_MEM_ERROR)663 1280 y Fl(if)f(not)i(enough)f(memory)g(is)f(a)m(v)-5 b(ailable)572 1384 y Fj(BZ_OK)663 1488 y Fl(otherwise)150 1645 y(Allo)m(w)m(able)30 b(next)g(actions:)572 1796 y Fj(BZ2_bzCompress)663 1899 y Fl(if)f Fj(BZ_OK)g Fl(is)g(returned)572 2003 y(no)h(sp)s(eci\014c)f(action)i(needed)f(in)f(case)i(of)g(error) 150 2255 y Ff(3.3.2)63 b Fe(BZ2_bzCompress)533 2441 y Fj(int)47 b(BZ2_bzCompress)d(\()j(bz_stream)f(*strm,)g(int)h(action)f (\);)150 2598 y Fl(Pro)m(vides)28 b(more)g(input)f(and/or)h(output)g (bu\013er)g(space)h(for)f(the)h(library)-8 b(.)38 b(The)28 b(caller)g(main)m(tains)f(input)150 2708 y(and)j(output)g(bu\013ers,)f (and)h(calls)g Fj(BZ2_bzCompress)c Fl(to)31 b(transfer)f(data)h(b)s(et) m(w)m(een)g(them.)150 2865 y(Before)j(eac)m(h)g(call)e(to)i Fj(BZ2_bzCompress)p Fl(,)c Fj(next_in)h Fl(should)g(p)s(oin)m(t)h(at)h (the)g(data)h(to)g(b)s(e)e(compressed,)150 2974 y(and)41 b Fj(avail_in)f Fl(should)g(indicate)h(ho)m(w)h(man)m(y)f(b)m(ytes)i (the)f(library)d(ma)m(y)k(read.)75 b Fj(BZ2_bzCompress)150 3084 y Fl(up)s(dates)29 b Fj(next_in)p Fl(,)g Fj(avail_in)f Fl(and)i Fj(total_in)e Fl(to)j(re\015ect)g(the)g(n)m(um)m(b)s(er)e(of)h (b)m(ytes)h(it)f(has)g(read.)150 3241 y(Similarly)-8 b(,)27 b Fj(next_out)h Fl(should)g(p)s(oin)m(t)h(to)i(a)f(bu\013er)f (in)g(whic)m(h)g(the)h(compressed)g(data)h(is)e(to)i(b)s(e)e(placed,) 150 3350 y(with)i Fj(avail_out)f Fl(indicating)h(ho)m(w)h(m)m(uc)m(h)h (output)f(space)h(is)f(a)m(v)-5 b(ailable.)46 b Fj(BZ2_bzCompress)29 b Fl(up)s(dates)150 3460 y Fj(next_out)p Fl(,)f Fj(avail_out)g Fl(and)i Fj(total_out)e Fl(to)j(re\015ect)g(the)f(n)m(um)m(b)s(er)g(of) g(b)m(ytes)h(output.)150 3617 y(Y)-8 b(ou)40 b(ma)m(y)g(pro)m(vide)e (and)h(remo)m(v)m(e)i(as)f(little)e(or)h(as)h(m)m(uc)m(h)f(data)h(as)g (y)m(ou)f(lik)m(e)g(on)g(eac)m(h)i(call)e(of)g Fj(BZ2_)150 3726 y(bzCompress)p Fl(.)48 b(In)33 b(the)h(limit,)f(it)h(is)f (acceptable)h(to)h(supply)c(and)j(remo)m(v)m(e)h(data)g(one)f(b)m(yte)g (at)h(a)f(time,)150 3836 y(although)28 b(this)f(w)m(ould)g(b)s(e)h (terribly)e(ine\016cien)m(t.)39 b(Y)-8 b(ou)29 b(should)e(alw)m(a)m(ys) h(ensure)g(that)h(at)g(least)g(one)f(b)m(yte)150 3946 y(of)j(output)f(space)g(is)g(a)m(v)-5 b(ailable)30 b(at)h(eac)m(h)g (call.)150 4102 y(A)38 b(second)h(purp)s(ose)d(of)j Fj(BZ2_bzCompress) 34 b Fl(is)j(to)i(request)f(a)h(c)m(hange)g(of)g(mo)s(de)e(of)i(the)f (compressed)150 4212 y(stream.)150 4369 y(Conceptually)-8 b(,)24 b(a)g(compressed)g(stream)g(can)f(b)s(e)g(in)g(one)h(of)f(four)g (states:)39 b(IDLE,)24 b(R)m(UNNING,)h(FLUSH-)150 4478 y(ING)37 b(and)g(FINISHING.)g(Before)i(initialisation)33 b(\()p Fj(BZ2_bzCompressInit)p Fl(\))g(and)j(after)i(termination)150 4588 y(\()p Fj(BZ2_bzCompressEnd)p Fl(\),)27 b(a)j(stream)h(is)f (regarded)g(as)g(IDLE.)150 4745 y(Up)s(on)35 b(initialisation)e(\()p Fj(BZ2_bzCompressInit)p Fl(\),)h(the)i(stream)h(is)e(placed)h(in)e(the) j(R)m(UNNING)g(state.)150 4854 y(Subsequen)m(t)j(calls)g(to)i Fj(BZ2_bzCompress)37 b Fl(should)j(pass)g Fj(BZ_RUN)g Fl(as)h(the)g(requested)h(action;)47 b(other)150 4964 y(actions)31 b(are)f(illegal)f(and)h(will)d(result)j(in)f Fj(BZ_SEQUENCE_ERROR)p Fl(.)150 5121 y(A)m(t)38 b(some)f(p)s(oin)m(t,)h (the)f(calling)e(program)i(will)d(ha)m(v)m(e)k(pro)m(vided)e(all)f(the) i(input)e(data)j(it)e(w)m(an)m(ts)i(to.)61 b(It)150 5230 y(will)28 b(then)h(w)m(an)m(t)i(to)g(\014nish)d(up)h({)i(in)d (e\013ect,)k(asking)e(the)g(library)e(to)j(pro)s(cess)f(an)m(y)g(data)h (it)f(migh)m(t)g(ha)m(v)m(e)150 5340 y(bu\013ered)25 b(in)m(ternally)-8 b(.)38 b(In)25 b(this)g(state,)k Fj(BZ2_bzCompress) 22 b Fl(will)i(no)i(longer)g(attempt)h(to)g(read)f(data)h(from)p eop %%Page: 15 16 15 15 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29 b(with)g Fj(libbzip2)1881 b Fl(15)150 299 y Fj(next_in)p Fl(,)33 b(but)g(it)h(will)d(w)m(an)m(t)k(to)g(write)e(data)h(to)h Fj(next_out)p Fl(.)49 b(Because)36 b(the)e(output)f(bu\013er)g (supplied)150 408 y(b)m(y)e(the)h(user)e(can)i(b)s(e)f(arbitrarily)d (small,)j(the)g(\014nishing-up)d(op)s(eration)i(cannot)i(necessarily)e (b)s(e)h(done)150 518 y(with)e(a)i(single)e(call)h(of)g Fj(BZ2_bzCompress)p Fl(.)150 675 y(Instead,)47 b(the)d(calling)f (program)g(passes)h Fj(BZ_FINISH)d Fl(as)j(an)g(action)g(to)h Fj(BZ2_bzCompress)p Fl(.)77 b(This)150 784 y(c)m(hanges)30 b(the)f(stream's)g(state)h(to)f(FINISHING.)g(An)m(y)g(remaining)e (input)g(\(ie,)i Fj(next_in[0)f(..)i(avail_)150 894 y(in-1])p Fl(\))36 b(is)f(compressed)i(and)f(transferred)g(to)h(the)g(output)g (bu\013er.)58 b(T)-8 b(o)38 b(do)e(this,)i Fj(BZ2_bzCompress)150 1004 y Fl(m)m(ust)h(b)s(e)f(called)g(rep)s(eatedly)h(un)m(til)e(all)h (the)h(output)f(has)h(b)s(een)f(consumed.)66 b(A)m(t)40 b(that)g(p)s(oin)m(t,)g Fj(BZ2_)150 1113 y(bzCompress)h Fl(returns)h Fj(BZ_STREAM_END)p Fl(,)i(and)f(the)h(stream's)g(state)h (is)d(set)j(bac)m(k)f(to)g(IDLE.)g Fj(BZ2_)150 1223 y(bzCompressEnd)27 b Fl(should)h(then)i(b)s(e)g(called.)150 1380 y(Just)25 b(to)i(mak)m(e)g(sure)e(the)i(calling)d(program)i(do)s(es)g(not)g(c)m (heat,)i(the)f(library)c(mak)m(es)k(a)f(note)h(of)f Fj(avail_in)150 1489 y Fl(at)g(the)g(time)f(of)g(the)g(\014rst)g(call)g(to)h Fj(BZ2_bzCompress)21 b Fl(whic)m(h)j(has)h Fj(BZ_FINISH)e Fl(as)i(an)h(action)f(\(ie,)i(at)f(the)150 1599 y(time)d(the)h(program) g(has)f(announced)g(its)h(in)m(ten)m(tion)f(to)h(not)g(supply)e(an)m(y) i(more)g(input\).)37 b(By)24 b(comparing)150 1708 y(this)k(v)-5 b(alue)28 b(with)g(that)h(of)h Fj(avail_in)c Fl(o)m(v)m(er)k(subsequen) m(t)f(calls)f(to)h Fj(BZ2_bzCompress)p Fl(,)d(the)j(library)e(can)150 1818 y(detect)33 b(an)m(y)e(attempts)i(to)f(slip)d(in)h(more)h(data)h (to)h(compress.)43 b(An)m(y)31 b(calls)g(for)g(whic)m(h)f(this)g(is)h (detected)150 1928 y(will)j(return)h Fj(BZ_SEQUENCE_ERROR)p Fl(.)55 b(This)34 b(indicates)i(a)h(programming)e(mistak)m(e)i(whic)m (h)e(should)g(b)s(e)150 2037 y(corrected.)150 2194 y(Instead)i(of)g (asking)f(to)h(\014nish,)f(the)h(calling)f(program)g(ma)m(y)h(ask)g Fj(BZ2_bzCompress)c Fl(to)38 b(tak)m(e)g(all)e(the)150 2304 y(remaining)j(input,)i(compress)f(it)g(and)g(terminate)h(the)g (curren)m(t)f(\(Burro)m(ws-Wheeler\))h(compression)150 2413 y(blo)s(c)m(k.)e(This)26 b(could)h(b)s(e)g(useful)f(for)h(error)h (con)m(trol)g(purp)s(oses.)38 b(The)27 b(mec)m(hanism)g(is)g(analogous) h(to)g(that)150 2523 y(for)35 b(\014nishing:)46 b(call)35 b Fj(BZ2_bzCompress)c Fl(with)i(an)i(action)g(of)g Fj(BZ_FLUSH)p Fl(,)g(remo)m(v)m(e)h(output)f(data,)i(and)150 2632 y(p)s(ersist)h (with)g(the)i Fj(BZ_FLUSH)e Fl(action)i(un)m(til)e(the)i(v)-5 b(alue)39 b Fj(BZ_RUN)f Fl(is)h(returned.)68 b(As)39 b(with)g(\014nishing,)150 2742 y Fj(BZ2_bzCompress)23 b Fl(detects)28 b(an)m(y)f(attempt)h(to)f(pro)m(vide)f(more)h(input)e (data)i(once)g(the)g(\015ush)e(has)i(b)s(egun.)150 2899 y(Once)j(the)h(\015ush)e(is)g(complete,)i(the)g(stream)f(returns)g(to)h (the)f(normal)g(R)m(UNNING)h(state.)150 3056 y(This)f(all)h(sounds)g (prett)m(y)h(complex,)h(but)e(isn't)g(really)-8 b(.)45 b(Here's)33 b(a)f(table)g(whic)m(h)f(sho)m(ws)h(whic)m(h)f(actions)150 3165 y(are)e(allo)m(w)m(able)f(in)f(eac)m(h)j(state,)g(what)f(action)g (will)c(b)s(e)j(tak)m(en,)j(what)d(the)h(next)f(state)i(is,)e(and)g (what)h(the)150 3275 y(non-error)h(return)f(v)-5 b(alues)29 b(are.)41 b(Note)32 b(that)e(y)m(ou)h(can't)g(explicitly)d(ask)i(what)g (state)i(the)e(stream)h(is)e(in,)150 3384 y(but)h(nor)g(do)g(y)m(ou)h (need)f(to)h({)g(it)e(can)i(b)s(e)f(inferred)e(from)i(the)h(v)-5 b(alues)29 b(returned)h(b)m(y)g Fj(BZ2_bzCompress)p Fl(.)390 3535 y(IDLE/)p Fj(any)572 3639 y Fl(Illegal.)60 b(IDLE)30 b(state)i(only)d(exists)h(after)h Fj(BZ2_bzCompressEnd)26 b Fl(or)572 3743 y(b)s(efore)k Fj(BZ2_bzCompressInit)p Fl(.)572 3847 y(Return)f(v)-5 b(alue)30 b(=)g Fj(BZ_SEQUENCE_ERROR)390 4054 y Fl(R)m(UNNING/)p Fj(BZ_RUN)572 4158 y Fl(Compress)f(from)h Fj(next_in)f Fl(to)i Fj(next_out)d Fl(as)i(m)m(uc)m(h)h(as)f(p)s (ossible.)572 4262 y(Next)h(state)h(=)e(R)m(UNNING)572 4366 y(Return)f(v)-5 b(alue)30 b(=)g Fj(BZ_RUN_OK)390 4573 y Fl(R)m(UNNING/)p Fj(BZ_FLUSH)572 4677 y Fl(Remem)m(b)s(er)g (curren)m(t)g(v)-5 b(alue)30 b(of)g Fj(next_in)p Fl(.)59 b(Compress)30 b(from)g Fj(next_in)572 4781 y Fl(to)h Fj(next_out)d Fl(as)j(m)m(uc)m(h)f(as)h(p)s(ossible,)d(but)i(do)g(not)g (accept)i(an)m(y)f(more)f(input.)572 4885 y(Next)h(state)h(=)e (FLUSHING)572 4988 y(Return)f(v)-5 b(alue)30 b(=)g Fj(BZ_FLUSH_OK)390 5196 y Fl(R)m(UNNING/)p Fj(BZ_FINISH)572 5300 y Fl(Remem)m(b)s(er)g (curren)m(t)g(v)-5 b(alue)30 b(of)g Fj(next_in)p Fl(.)59 b(Compress)30 b(from)g Fj(next_in)p eop %%Page: 16 17 16 16 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29 b(with)g Fj(libbzip2)1881 b Fl(16)572 299 y(to)31 b Fj(next_out)d Fl(as)j(m)m(uc)m(h)f(as)h(p)s(ossible,)d(but)i(do)g(not)g(accept)i(an)m (y)f(more)f(input.)572 403 y(Next)h(state)h(=)e(FINISHING)572 506 y(Return)f(v)-5 b(alue)30 b(=)g Fj(BZ_FINISH_OK)390 714 y Fl(FLUSHING/)p Fj(BZ_FLUSH)572 818 y Fl(Compress)f(from)h Fj(next_in)f Fl(to)i Fj(next_out)d Fl(as)i(m)m(uc)m(h)h(as)f(p)s (ossible,)572 922 y(but)f(do)i(not)f(accept)i(an)m(y)f(more)f(input.) 572 1025 y(If)g(all)f(the)i(existing)e(input)f(has)i(b)s(een)g(used)g (up)f(and)h(all)f(compressed)572 1129 y(output)h(has)g(b)s(een)g(remo)m (v)m(ed)663 1233 y(Next)h(state)h(=)e(R)m(UNNING;)i(Return)d(v)-5 b(alue)30 b(=)g Fj(BZ_RUN_OK)572 1337 y Fl(else)663 1440 y(Next)h(state)h(=)e(FLUSHING;)h(Return)e(v)-5 b(alue)30 b(=)g Fj(BZ_FLUSH_OK)390 1648 y Fl(FLUSHING/other)572 1752 y(Illegal.)572 1856 y(Return)f(v)-5 b(alue)30 b(=)g Fj(BZ_SEQUENCE_ERROR)390 2063 y Fl(FINISHING/)p Fj(BZ_FINISH)572 2167 y Fl(Compress)f(from)h Fj(next_in)f Fl(to)i Fj(next_out)d Fl(as)i(m)m(uc)m(h)h(as)f(p)s(ossible,)572 2271 y(but)f(to)j(not)e (accept)i(an)m(y)f(more)f(input.)572 2374 y(If)g(all)f(the)i(existing)e (input)f(has)i(b)s(een)g(used)g(up)f(and)h(all)f(compressed)572 2478 y(output)h(has)g(b)s(een)g(remo)m(v)m(ed)663 2582 y(Next)h(state)h(=)e(IDLE;)g(Return)g(v)-5 b(alue)30 b(=)g Fj(BZ_STREAM_END)572 2686 y Fl(else)663 2790 y(Next)h(state)h(=)e (FINISHING;)g(Return)g(v)-5 b(alue)30 b(=)g Fj(BZ_FINISHING)390 2997 y Fl(FINISHING/other)572 3101 y(Illegal.)572 3205 y(Return)f(v)-5 b(alue)30 b(=)g Fj(BZ_SEQUENCE_ERROR)150 3361 y Fl(That)24 b(still)f(lo)s(oks)g(complicated?)39 b(W)-8 b(ell,)25 b(fair)f(enough.)38 b(The)24 b(usual)f(sequence)i(of)f (calls)g(for)g(compressing)150 3471 y(a)31 b(load)f(of)g(data)h(is:)225 3628 y Fi(\017)60 b Fl(Get)31 b(started)g(with)e Fj(BZ2_bzCompressInit) p Fl(.)225 3774 y Fi(\017)60 b Fl(Sho)m(v)m(el)38 b(data)h(in)e(and)g (shlurp)e(out)k(its)e(compressed)h(form)g(using)e(zero)j(or)f(more)h (calls)e(of)h Fj(BZ2_)330 3884 y(bzCompress)28 b Fl(with)h(action)h(=)g Fj(BZ_RUN)p Fl(.)225 4030 y Fi(\017)60 b Fl(Finish)23 b(up.)38 b(Rep)s(eatedly)25 b(call)f Fj(BZ2_bzCompress)e Fl(with)i(action)h(=)g Fj(BZ_FINISH)p Fl(,)f(cop)m(ying)h(out)h(the)330 4139 y(compressed)k(output,)g(un)m(til)f Fj(BZ_STREAM_END)e Fl(is)i(returned.)225 4285 y Fi(\017)60 b Fl(Close)30 b(up)f(and)h(go)h(home.)41 b(Call)29 b Fj(BZ2_bzCompressEnd)p Fl(.)150 4478 y(If)23 b(the)h(data)h(y)m(ou)f(w)m(an)m(t)h(to)f (compress)g(\014ts)f(in)m(to)h(y)m(our)g(input)e(bu\013er)h(all)f(at)j (once,)h(y)m(ou)e(can)g(skip)f(the)h(calls)150 4588 y(of)37 b Fj(BZ2_bzCompress)26 b(\()k(...,)f(BZ_RUN)g(\))36 b Fl(and)g(just)g(do)h(the)g Fj(BZ2_bzCompress)26 b(\()k(...,)f (BZ_FINISH)150 4698 y(\))h Fl(calls.)150 4854 y(All)36 b(required)g(memory)h(is)f(allo)s(cated)i(b)m(y)f Fj (BZ2_bzCompressInit)p Fl(.)56 b(The)37 b(compression)g(library)e(can) 150 4964 y(accept)g(an)m(y)f(data)h(at)g(all)d(\(ob)m(viously\).)51 b(So)34 b(y)m(ou)g(shouldn't)e(get)j(an)m(y)f(error)f(return)g(v)-5 b(alues)33 b(from)h(the)150 5074 y Fj(BZ2_bzCompress)29 b Fl(calls.)46 b(If)32 b(y)m(ou)h(do,)g(they)g(will)d(b)s(e)i Fj(BZ_SEQUENCE_ERROR)p Fl(,)d(and)j(indicate)f(a)i(bug)f(in)150 5183 y(y)m(our)e(programming.)150 5340 y(T)-8 b(rivial)28 b(other)j(p)s(ossible)d(return)h(v)-5 b(alues:)p eop %%Page: 17 18 17 17 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29 b(with)g Fj(libbzip2)1881 b Fl(17)572 299 y Fj(BZ_PARAM_ERROR)663 403 y Fl(if)29 b Fj(strm)g Fl(is)h Fj(NULL)p Fl(,)f(or)i Fj(strm->s)d Fl(is)h Fj(NULL)150 652 y Ff(3.3.3)63 b Fe(BZ2_bzCompressEnd)390 839 y Fj(int)47 b(BZ2_bzCompressEnd)c(\()k (bz_stream)f(*strm)g(\);)150 996 y Fl(Releases)31 b(all)e(memory)h (asso)s(ciated)h(with)e(a)i(compression)e(stream.)150 1153 y(P)m(ossible)g(return)h(v)-5 b(alues:)481 1304 y Fj(BZ_PARAM_ERROR)117 b Fl(if)30 b Fj(strm)f Fl(is)g Fj(NULL)g Fl(or)i Fj(strm->s)d Fl(is)i Fj(NULL)481 1408 y(BZ_OK)120 b Fl(otherwise)150 1657 y Ff(3.3.4)63 b Fe (BZ2_bzDecompressInit)390 1844 y Fj(int)47 b(BZ2_bzDecompressInit)42 b(\()48 b(bz_stream)d(*strm,)h(int)h(verbosity,)e(int)i(small)f(\);)150 2001 y Fl(Prepares)30 b(for)f(decompression.)40 b(As)29 b(with)g Fj(BZ2_bzCompressInit)p Fl(,)c(a)31 b Fj(bz_stream)c Fl(record)j(should)e(b)s(e)150 2110 y(allo)s(cated)c(and)f(initialised) e(b)s(efore)i(the)i(call.)38 b(Fields)22 b Fj(bzalloc)p Fl(,)i Fj(bzfree)e Fl(and)i Fj(opaque)e Fl(should)g(b)s(e)h(set)i(if) 150 2220 y(a)h(custom)f(memory)g(allo)s(cator)g(is)g(required,)f(or)h (made)h Fj(NULL)e Fl(for)h(the)g(normal)f Fj(malloc)p Fl(/)p Fj(free)f Fl(routines.)150 2330 y(Up)s(on)h(return,)h(the)g(in)m (ternal)f(state)i(will)c(ha)m(v)m(e)k(b)s(een)f(initialised,)d(and)i Fj(total_in)f Fl(and)h Fj(total_out)f Fl(will)150 2439 y(b)s(e)30 b(zero.)150 2596 y(F)-8 b(or)31 b(the)g(meaning)e(of)i (parameter)g Fj(verbosity)p Fl(,)d(see)j Fj(BZ2_bzCompressInit)p Fl(.)150 2753 y(If)e Fj(small)e Fl(is)h(nonzero,)i(the)f(library)e (will)f(use)j(an)g(alternativ)m(e)h(decompression)e(algorithm)g(whic)m (h)f(uses)150 2862 y(less)c(memory)g(but)g(at)h(the)g(cost)h(of)e (decompressing)g(more)g(slo)m(wly)g(\(roughly)f(sp)s(eaking,)i(half)f (the)h(sp)s(eed,)150 2972 y(but)34 b(the)i(maxim)m(um)d(memory)i (requiremen)m(t)g(drops)e(to)j(around)e(2300k\).)57 b(See)35 b(Chapter)g(2)g(for)g(more)150 3082 y(information)29 b(on)h(memory)g(managemen)m(t.)150 3238 y(Note)40 b(that)f(the)f(amoun) m(t)h(of)g(memory)f(needed)g(to)i(decompress)e(a)h(stream)f(cannot)h(b) s(e)f(determined)150 3348 y(un)m(til)j(the)h(stream's)h(header)f(has)g (b)s(een)g(read,)j(so)e(ev)m(en)g(if)e Fj(BZ2_bzDecompressInit)c Fl(succeeds,)46 b(a)150 3458 y(subsequen)m(t)30 b Fj(BZ2_bzDecompress)c Fl(could)j(fail)g(with)g Fj(BZ_MEM_ERROR)p Fl(.)150 3614 y(P)m(ossible)g(return)h(v)-5 b(alues:)572 3765 y Fj(BZ_CONFIG_ERROR) 663 3869 y Fl(if)29 b(the)i(library)d(has)i(b)s(een)f(mis-compiled)572 3973 y Fj(BZ_PARAM_ERROR)663 4077 y Fl(if)g Fj(\(small)46 b(!=)h(0)h(&&)f(small)f(!=)h(1\))663 4181 y Fl(or)30 b Fj(\(verbosity)45 b(<)j(0)f(||)g(verbosity)e(>)j(4\))572 4284 y(BZ_MEM_ERROR)663 4388 y Fl(if)29 b(insu\016cien)m(t)g(memory)h (is)f(a)m(v)-5 b(ailable)150 4545 y(Allo)m(w)m(able)30 b(next)g(actions:)572 4696 y Fj(BZ2_bzDecompress)663 4800 y Fl(if)f Fj(BZ_OK)g Fl(w)m(as)i(returned)572 4904 y(no)f(sp)s(eci\014c)f(action)i(required)e(in)g(case)i(of)g(error)150 5153 y Ff(3.3.5)63 b Fe(BZ2_bzDecompress)390 5340 y Fj(int)47 b(BZ2_bzDecompress)c(\()48 b(bz_stream)d(*strm)h(\);)p eop %%Page: 18 19 18 18 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29 b(with)g Fj(libbzip2)1881 b Fl(18)150 299 y(Pro)m(vides)24 b(more)g(input)f(and/out)h(output)g(bu\013er)g(space)h(for)f(the)g (library)-8 b(.)37 b(The)24 b(caller)g(main)m(tains)f(input)150 408 y(and)30 b(output)g(bu\013ers,)f(and)h(uses)g Fj(BZ2_bzDecompress)c Fl(to)31 b(transfer)f(data)h(b)s(et)m(w)m(een)g(them.)150 565 y(Before)g(eac)m(h)g(call)f(to)g Fj(BZ2_bzDecompress)p Fl(,)c Fj(next_in)i Fl(should)h(p)s(oin)m(t)g(at)h(the)h(compressed)e (data,)j(and)150 675 y Fj(avail_in)h Fl(should)h(indicate)h(ho)m(w)h (man)m(y)f(b)m(ytes)i(the)e(library)f(ma)m(y)i(read.)56 b Fj(BZ2_bzDecompress)32 b Fl(up-)150 784 y(dates)f Fj(next_in)p Fl(,)e Fj(avail_in)f Fl(and)h Fj(total_in)g Fl(to)i(re\015ect)g(the)f (n)m(um)m(b)s(er)f(of)i(b)m(ytes)g(it)f(has)g(read.)150 941 y(Similarly)-8 b(,)37 b Fj(next_out)f Fl(should)g(p)s(oin)m(t)i(to) g(a)h(bu\013er)e(in)g(whic)m(h)g(the)i(uncompressed)e(output)g(is)h(to) h(b)s(e)150 1051 y(placed,)d(with)e Fj(avail_out)f Fl(indicating)g(ho)m (w)i(m)m(uc)m(h)g(output)g(space)h(is)e(a)m(v)-5 b(ailable.)55 b Fj(BZ2_bzCompress)150 1160 y Fl(up)s(dates)29 b Fj(next_out)p Fl(,)g Fj(avail_out)f Fl(and)h Fj(total_out)f Fl(to)j(re\015ect)g(the)g (n)m(um)m(b)s(er)e(of)h(b)m(ytes)h(output.)150 1317 y(Y)-8 b(ou)40 b(ma)m(y)g(pro)m(vide)e(and)h(remo)m(v)m(e)i(as)f(little)e(or)h (as)h(m)m(uc)m(h)f(data)h(as)g(y)m(ou)f(lik)m(e)g(on)g(eac)m(h)i(call)e (of)g Fj(BZ2_)150 1427 y(bzDecompress)p Fl(.)e(In)27 b(the)i(limit,)d(it)i(is)f(acceptable)j(to)f(supply)d(and)h(remo)m(v)m (e)j(data)f(one)f(b)m(yte)h(at)g(a)g(time,)150 1537 y(although)f(this)f (w)m(ould)g(b)s(e)h(terribly)e(ine\016cien)m(t.)39 b(Y)-8 b(ou)29 b(should)e(alw)m(a)m(ys)h(ensure)g(that)h(at)g(least)g(one)f(b) m(yte)150 1646 y(of)j(output)f(space)g(is)g(a)m(v)-5 b(ailable)30 b(at)h(eac)m(h)g(call.)150 1803 y(Use)g(of)f Fj(BZ2_bzDecompress)c Fl(is)k(simpler)e(than)i Fj(BZ2_bzCompress)p Fl(.)150 1960 y(Y)-8 b(ou)31 b(should)d(pro)m(vide)h(input)f(and)i (remo)m(v)m(e)i(output)d(as)i(describ)s(ed)d(ab)s(o)m(v)m(e,)k(and)d (rep)s(eatedly)h(call)f Fj(BZ2_)150 2069 y(bzDecompress)35 b Fl(un)m(til)i Fj(BZ_STREAM_END)e Fl(is)j(returned.)64 b(App)s(earance)39 b(of)g Fj(BZ_STREAM_END)c Fl(denotes)150 2179 y(that)47 b Fj(BZ2_bzDecompress)42 b Fl(has)k(detected)h(the)f (logical)g(end)g(of)g(the)h(compressed)e(stream.)89 b Fj(BZ2_)150 2289 y(bzDecompress)28 b Fl(will)g(not)j(pro)s(duce)f Fj(BZ_STREAM_END)d Fl(un)m(til)j(all)f(output)i(data)h(has)e(b)s(een)h (placed)f(in)m(to)150 2398 y(the)36 b(output)g(bu\013er,)h(so)g(once)g Fj(BZ_STREAM_END)32 b Fl(app)s(ears,)38 b(y)m(ou)e(are)h(guaran)m(teed) g(to)g(ha)m(v)m(e)h(a)m(v)-5 b(ailable)150 2508 y(all)29 b(the)i(decompressed)f(output,)g(and)g Fj(BZ2_bzDecompressEnd)25 b Fl(can)31 b(safely)f(b)s(e)f(called.)150 2665 y(If)40 b(case)h(of)f(an)h(error)e(return)h(v)-5 b(alue,)42 b(y)m(ou)f(should)d (call)h Fj(BZ2_bzDecompressEnd)c Fl(to)41 b(clean)f(up)g(and)150 2774 y(release)31 b(memory)-8 b(.)150 2931 y(P)m(ossible)29 b(return)h(v)-5 b(alues:)572 3082 y Fj(BZ_PARAM_ERROR)663 3186 y Fl(if)29 b Fj(strm)g Fl(is)h Fj(NULL)f Fl(or)h Fj(strm->s)f Fl(is)g Fj(NULL)663 3290 y Fl(or)h Fj(strm->avail_out)44 b(<)j(1)572 3393 y(BZ_DATA_ERROR)663 3497 y Fl(if)29 b(a)i(data)g(in)m(tegrit)m(y)f(error)g(is)g(detected)h(in)e(the)i (compressed)f(stream)572 3601 y Fj(BZ_DATA_ERROR_MAGIC)663 3705 y Fl(if)f(the)i(compressed)f(stream)g(do)s(esn't)h(b)s(egin)e (with)g(the)h(righ)m(t)g(magic)h(b)m(ytes)572 3808 y Fj(BZ_MEM_ERROR)663 3912 y Fl(if)e(there)i(w)m(asn't)f(enough)h(memory) f(a)m(v)-5 b(ailable)572 4016 y Fj(BZ_STREAM_END)663 4120 y Fl(if)29 b(the)i(logical)e(end)h(of)h(the)f(data)h(stream)g(w)m (as)g(detected)g(and)f(all)663 4224 y(output)g(in)f(has)h(b)s(een)g (consumed,)f(eg)j Fj(s->avail_out)44 b(>)k(0)572 4327 y(BZ_OK)663 4431 y Fl(otherwise)150 4588 y(Allo)m(w)m(able)30 b(next)g(actions:)572 4739 y Fj(BZ2_bzDecompress)663 4843 y Fl(if)f Fj(BZ_OK)g Fl(w)m(as)i(returned)572 4946 y Fj(BZ2_bzDecompressEnd)663 5050 y Fl(otherwise)p eop %%Page: 19 20 19 19 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29 b(with)g Fj(libbzip2)1881 b Fl(19)150 299 y Ff(3.3.6)63 b Fe(BZ2_bzDecompressEnd)390 486 y Fj(int)47 b(BZ2_bzDecompressEnd)42 b(\()48 b(bz_stream)d(*strm)i(\);)150 643 y Fl(Releases)31 b(all)e(memory)h(asso)s(ciated)h(with)e(a)i(decompression)e(stream.)150 799 y(P)m(ossible)g(return)h(v)-5 b(alues:)572 950 y Fj(BZ_PARAM_ERROR)663 1054 y Fl(if)29 b Fj(strm)g Fl(is)h Fj(NULL)f Fl(or)h Fj(strm->s)f Fl(is)g Fj(NULL)572 1158 y(BZ_OK)663 1262 y Fl(otherwise)150 1419 y(Allo)m(w)m(able)h(next)g (actions:)572 1570 y(None.)150 1857 y Fk(3.4)68 b(High-lev)l(el)47 b(in)l(terface)150 2050 y Fl(This)35 b(in)m(terface)j(pro)m(vides)d (functions)h(for)g(reading)g(and)h(writing)e Fj(bzip2)g Fl(format)i(\014les.)59 b(First,)39 b(some)150 2159 y(general)30 b(p)s(oin)m(ts.)225 2316 y Fi(\017)60 b Fl(All)35 b(of)h(the)g (functions)e(tak)m(e)k(an)e Fj(int*)f Fl(\014rst)g(argumen)m(t,)j Fj(bzerror)p Fl(.)56 b(After)36 b(eac)m(h)h(call,)g Fj(bzerror)330 2426 y Fl(should)23 b(b)s(e)i(consulted)g(\014rst)g(to)h(determine)e (the)i(outcome)h(of)e(the)h(call.)38 b(If)25 b Fj(bzerror)f Fl(is)g Fj(BZ_OK)p Fl(,)i(the)330 2535 y(call)35 b(completed)g (successfully)-8 b(,)36 b(and)f(only)g(then)g(should)f(the)h(return)g (v)-5 b(alue)35 b(of)h(the)f(function)g(\(if)330 2645 y(an)m(y\))30 b(b)s(e)f(consulted.)39 b(If)29 b Fj(bzerror)e Fl(is)h Fj(BZ_IO_ERROR)p Fl(,)f(there)i(w)m(as)h(an)f(error)g (reading/writing)e(the)330 2754 y(underlying)32 b(compressed)j(\014le,) h(and)f(y)m(ou)h(should)d(then)i(consult)g Fj(errno)p Fl(/)p Fj(perror)e Fl(to)j(determine)330 2864 y(the)i(cause)g(of)g(the) g(di\016cult)m(y)-8 b(.)61 b Fj(bzerror)36 b Fl(ma)m(y)i(also)g(b)s(e)f (set)h(to)g(v)-5 b(arious)37 b(other)h(v)-5 b(alues;)41 b(precise)330 2974 y(details)29 b(are)i(giv)m(en)g(on)f(a)h(p)s (er-function)d(basis)h(b)s(elo)m(w.)225 3111 y Fi(\017)60 b Fl(If)40 b Fj(bzerror)f Fl(indicates)g(an)i(error)f(\(ie,)j(an)m (ything)d(except)h Fj(BZ_OK)f Fl(and)g Fj(BZ_STREAM_END)p Fl(\),)g(y)m(ou)330 3220 y(should)56 b(immediately)h(call)g Fj(BZ2_bzReadClose)e Fl(\(or)j Fj(BZ2_bzWriteClose)p Fl(,)j(dep)s(ending)56 b(on)330 3330 y(whether)50 b(y)m(ou)g(are)h (attempting)g(to)g(read)f(or)g(to)i(write\))d(to)j(free)e(up)f(all)h (resources)g(asso)s(ci-)330 3439 y(ated)33 b(with)e(the)i(stream.)47 b(Once)32 b(an)h(error)f(has)g(b)s(een)g(indicated,)f(b)s(eha)m(viour)g (of)i(all)e(calls)h(except)330 3549 y Fj(BZ2_bzReadClose)46 b Fl(\()p Fj(BZ2_bzWriteClose)p Fl(\))h(is)j(unde\014ned.)99 b(The)50 b(implication)e(is)i(that)h(\(1\))330 3659 y Fj(bzerror)44 b Fl(should)g(b)s(e)h(c)m(hec)m(k)m(ed)j(after)e(eac)m(h) h(call,)i(and)c(\(2\))i(if)e Fj(bzerror)f Fl(indicates)g(an)i(error,) 330 3768 y Fj(BZ2_bzReadClose)26 b Fl(\()p Fj(BZ2_bzWriteClose)p Fl(\))h(should)h(then)i(b)s(e)g(called)g(to)h(clean)f(up.)225 3905 y Fi(\017)60 b Fl(The)33 b Fj(FILE*)f Fl(argumen)m(ts)h(passed)g (to)h Fj(BZ2_bzReadOpen)p Fl(/)p Fj(BZ2_bzWriteOp)o(en)27 b Fl(should)32 b(b)s(e)g(set)i(to)330 4015 y(binary)23 b(mo)s(de.)38 b(Most)26 b(Unix)d(systems)i(will)d(do)i(this)g(b)m(y)g (default,)i(but)e(other)g(platforms,)h(including)330 4124 y(Windo)m(ws)20 b(and)g(Mac,)k(will)19 b(not.)38 b(If)20 b(y)m(ou)h(omit)g(this,)h(y)m(ou)f(ma)m(y)h(encoun)m(ter)f (problems)e(when)h(mo)m(ving)330 4234 y(co)s(de)31 b(to)g(new)f (platforms.)225 4371 y Fi(\017)60 b Fl(Memory)23 b(allo)s(cation)f (requests)h(are)g(handled)e(b)m(y)i Fj(malloc)p Fl(/)p Fj(free)p Fl(.)36 b(A)m(t)23 b(presen)m(t)g(there)g(is)f(no)h(facilit)m (y)330 4481 y(for)40 b(user-de\014ned)e(memory)i(allo)s(cators)g(in)f (the)h(\014le)g(I/O)g(functions)e(\(could)i(easily)f(b)s(e)g(added,)330 4590 y(though\).)150 4842 y Ff(3.4.1)63 b Fe(BZ2_bzReadOpen)533 5029 y Fj(typedef)46 b(void)h(BZFILE;)533 5236 y(BZFILE)f (*BZ2_bzReadOpen)e(\()j(int)g(*bzerror,)f(FILE)g(*f,)1726 5340 y(int)h(small,)f(int)h(verbosity,)p eop %%Page: 20 21 20 20 bop 150 -116 a Fl(Chapter)30 b(3:)h(Programming)e(with)g Fj(libbzip2)1891 b Fl(20)1726 299 y Fj(void)47 b(*unused,)f(int)g (nUnused)g(\);)150 456 y Fl(Prepare)29 b(to)g(read)g(compressed)f(data) i(from)e(\014le)g(handle)f Fj(f)p Fl(.)40 b Fj(f)29 b Fl(should)d(refer)j(to)h(a)f(\014le)f(whic)m(h)f(has)i(b)s(een)150 565 y(op)s(ened)h(for)h(reading,)f(and)h(for)f(whic)m(h)g(the)h(error)g (indicator)e(\()p Fj(ferror\(f\))p Fl(\)is)f(not)k(set.)42 b(If)31 b Fj(small)e Fl(is)h(1,)150 675 y(the)h(library)d(will)f(try)j (to)i(decompress)e(using)f(less)g(memory)-8 b(,)31 b(at)g(the)g(exp)s (ense)f(of)g(sp)s(eed.)150 832 y(F)-8 b(or)39 b(reasons)f(explained)f (b)s(elo)m(w,)j Fj(BZ2_bzRead)35 b Fl(will)h(decompress)i(the)g Fj(nUnused)e Fl(b)m(ytes)j(starting)f(at)150 941 y Fj(unused)p Fl(,)k(b)s(efore)e(starting)h(to)g(read)g(from)f(the)h(\014le)f Fj(f)p Fl(.)71 b(A)m(t)42 b(most)f Fj(BZ_MAX_UNUSED)c Fl(b)m(ytes)k(ma)m(y)h(b)s(e)150 1051 y(supplied)32 b(lik)m(e)k(this.) 55 b(If)36 b(this)e(facilit)m(y)h(is)g(not)h(required,)g(y)m(ou)g (should)e(pass)h Fj(NULL)g Fl(and)g Fj(0)g Fl(for)h Fj(unused)150 1160 y Fl(and)30 b(n)p Fj(Unused)e Fl(resp)s(ectiv)m(ely)-8 b(.)150 1317 y(F)g(or)31 b(the)g(meaning)e(of)i(parameters)g Fj(small)e Fl(and)g Fj(verbosity)p Fl(,)f(see)j Fj (BZ2_bzDecompressInit)p Fl(.)150 1474 y(The)k(amoun)m(t)g(of)g(memory)g (needed)g(to)g(decompress)g(a)h(\014le)e(cannot)h(b)s(e)g(determined)e (un)m(til)h(the)h(\014le's)150 1584 y(header)22 b(has)f(b)s(een)g (read.)38 b(So)22 b(it)f(is)g(p)s(ossible)e(that)k Fj(BZ2_bzReadOpen)17 b Fl(returns)k Fj(BZ_OK)f Fl(but)h(a)i(subsequen)m(t)150 1693 y(call)30 b(of)g Fj(BZ2_bzRead)e Fl(will)f(return)j Fj(BZ_MEM_ERROR)p Fl(.)150 1850 y(P)m(ossible)f(assignmen)m(ts)h(to)h Fj(bzerror)p Fl(:)572 2001 y Fj(BZ_CONFIG_ERROR)663 2105 y Fl(if)e(the)i(library)d(has)i(b)s(een)f(mis-compiled)572 2209 y Fj(BZ_PARAM_ERROR)663 2313 y Fl(if)g Fj(f)h Fl(is)g Fj(NULL)663 2416 y Fl(or)g Fj(small)f Fl(is)g(neither)h Fj(0)g Fl(nor)g Fj(1)663 2520 y Fl(or)g Fj(\(unused)46 b(==)h(NULL)g(&&)g(nUnused)f(!=)h(0\))663 2624 y Fl(or)30 b Fj(\(unused)46 b(!=)h(NULL)g(&&)g(!\(0)g(<=)g(nUnused)f(<=)h (BZ_MAX_UNUSED\)\))572 2728 y(BZ_IO_ERROR)663 2831 y Fl(if)29 b Fj(ferror\(f\))f Fl(is)h(nonzero)572 2935 y Fj(BZ_MEM_ERROR)663 3039 y Fl(if)g(insu\016cien)m(t)g(memory)h(is)f (a)m(v)-5 b(ailable)572 3143 y Fj(BZ_OK)663 3247 y Fl(otherwise.)150 3403 y(P)m(ossible)29 b(return)h(v)-5 b(alues:)572 3554 y(P)m(oin)m(ter)31 b(to)g(an)f(abstract)h Fj(BZFILE)663 3658 y Fl(if)e Fj(bzerror)f Fl(is)i Fj(BZ_OK)572 3762 y(NULL)663 3866 y Fl(otherwise)150 4023 y(Allo)m(w)m(able)g(next)g (actions:)572 4174 y Fj(BZ2_bzRead)663 4277 y Fl(if)f Fj(bzerror)f Fl(is)i Fj(BZ_OK)572 4381 y(BZ2_bzClose)663 4485 y Fl(otherwise)150 4887 y Ff(3.4.2)63 b Fe(BZ2_bzRead)533 5074 y Fj(int)47 b(BZ2_bzRead)e(\()j(int)e(*bzerror,)g(BZFILE)g(*b,)h (void)f(*buf,)h(int)g(len)g(\);)150 5230 y Fl(Reads)35 b(up)f(to)h Fj(len)f Fl(\(uncompressed\))h(b)m(ytes)g(from)f(the)h (compressed)g(\014le)f Fj(b)g Fl(in)m(to)h(the)g(bu\013er)f Fj(buf)p Fl(.)53 b(If)150 5340 y(the)30 b(read)f(w)m(as)h(successful,)f Fj(bzerror)e Fl(is)i(set)h(to)g Fj(BZ_OK)e Fl(and)h(the)h(n)m(um)m(b)s (er)e(of)i(b)m(ytes)g(read)f(is)g(returned.)p eop %%Page: 21 22 21 21 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29 b(with)g Fj(libbzip2)1881 b Fl(21)150 299 y(If)33 b(the)g(logical)g (end-of-stream)h(w)m(as)g(detected,)i Fj(bzerror)31 b Fl(will)g(b)s(e)h(set)i(to)g Fj(BZ_STREAM_END)p Fl(,)d(and)i(the)150 408 y(n)m(um)m(b)s(er)c(of)i(b)m(ytes)f(read)h(is)e(returned.)40 b(All)29 b(other)h Fj(bzerror)f Fl(v)-5 b(alues)29 b(denote)i(an)g (error.)150 565 y Fj(BZ2_bzRead)37 b Fl(will)f(supply)h Fj(len)i Fl(b)m(ytes,)j(unless)c(the)i(logical)f(stream)h(end)e(is)h (detected)i(or)e(an)g(error)150 675 y(o)s(ccurs.)75 b(Because)43 b(of)f(this,)i(it)d(is)g(p)s(ossible)e(to)k(detect)g(the)f(stream)g (end)f(b)m(y)h(observing)f(when)g(the)150 784 y(n)m(um)m(b)s(er)29 b(of)h(b)m(ytes)g(returned)f(is)g(less)g(than)h(the)g(n)m(um)m(b)s(er)f (requested.)40 b(Nev)m(ertheless,)31 b(this)e(is)g(regarded)150 894 y(as)38 b(inadvisable;)g(y)m(ou)g(should)d(instead)i(c)m(hec)m(k)i Fj(bzerror)d Fl(after)i(ev)m(ery)g(call)e(and)h(w)m(atc)m(h)i(out)f (for)f Fj(BZ_)150 1004 y(STREAM_END)p Fl(.)150 1160 y(In)m(ternally)-8 b(,)47 b Fj(BZ2_bzRead)41 b Fl(copies)j(data)g(from)g(the)g(compressed) g(\014le)f(in)f(c)m(h)m(unks)i(of)g(size)g Fj(BZ_MAX_)150 1270 y(UNUSED)31 b Fl(b)m(ytes)i(b)s(efore)f(decompressing)f(it.)47 b(If)32 b(the)h(\014le)e(con)m(tains)i(more)g(b)m(ytes)g(than)f (strictly)f(needed)150 1380 y(to)48 b(reac)m(h)f(the)g(logical)f (end-of-stream,)52 b Fj(BZ2_bzRead)44 b Fl(will)g(almost)j(certainly)f (read)h(some)g(of)g(the)150 1489 y(trailing)c(data)j(b)s(efore)e (signalling)f Fj(BZ_SEQUENCE_END)p Fl(.)80 b(T)-8 b(o)46 b(collect)f(the)g(read)g(but)g(un)m(used)e(data)150 1599 y(once)29 b Fj(BZ_SEQUENCE_END)24 b Fl(has)k(app)s(eared,)g(call)f Fj(BZ2_bzReadGetUnused)c Fl(immediately)j(b)s(efore)i Fj(BZ2_)150 1708 y(bzReadClose)p Fl(.)150 1865 y(P)m(ossible)h (assignmen)m(ts)h(to)h Fj(bzerror)p Fl(:)572 2016 y Fj(BZ_PARAM_ERROR) 663 2120 y Fl(if)e Fj(b)h Fl(is)g Fj(NULL)f Fl(or)h Fj(buf)g Fl(is)f Fj(NULL)g Fl(or)i Fj(len)46 b(<)i(0)572 2224 y(BZ_SEQUENCE_ERROR)663 2328 y Fl(if)29 b Fj(b)h Fl(w)m(as)h(op)s(ened) e(with)h Fj(BZ2_bzWriteOpen)572 2431 y(BZ_IO_ERROR)663 2535 y Fl(if)f(there)i(is)e(an)h(error)g(reading)g(from)g(the)g (compressed)g(\014le)572 2639 y Fj(BZ_UNEXPECTED_EOF)663 2743 y Fl(if)f(the)i(compressed)f(\014le)f(ended)h(b)s(efore)g(the)g (logical)g(end-of-stream)h(w)m(as)g(detected)572 2847 y Fj(BZ_DATA_ERROR)663 2950 y Fl(if)e(a)i(data)g(in)m(tegrit)m(y)f (error)g(w)m(as)h(detected)h(in)d(the)h(compressed)g(stream)572 3054 y Fj(BZ_DATA_ERROR_MAGIC)663 3158 y Fl(if)f(the)i(stream)f(do)s (es)g(not)h(b)s(egin)e(with)g(the)i(requisite)e(header)h(b)m(ytes)h (\(ie,)f(is)g(not)663 3262 y(a)g Fj(bzip2)f Fl(data)i(\014le\).)61 b(This)28 b(is)i(really)f(a)i(sp)s(ecial)e(case)i(of)g Fj(BZ_DATA_ERROR)p Fl(.)572 3365 y Fj(BZ_MEM_ERROR)663 3469 y Fl(if)e(insu\016cien)m(t)g(memory)h(w)m(as)h(a)m(v)-5 b(ailable)572 3573 y Fj(BZ_STREAM_END)663 3677 y Fl(if)29 b(the)i(logical)e(end)h(of)h(stream)f(w)m(as)h(detected.)572 3781 y Fj(BZ_OK)663 3884 y Fl(otherwise.)150 4041 y(P)m(ossible)e (return)h(v)-5 b(alues:)572 4192 y(n)m(um)m(b)s(er)29 b(of)h(b)m(ytes)h(read)663 4296 y(if)e Fj(bzerror)f Fl(is)i Fj(BZ_OK)f Fl(or)h Fj(BZ_STREAM_END)572 4400 y Fl(unde\014ned)663 4503 y(otherwise)150 4660 y(Allo)m(w)m(able)g(next)g(actions:)572 4811 y(collect)h(data)g(from)f Fj(buf)p Fl(,)f(then)h Fj(BZ2_bzRead)e Fl(or)i Fj(BZ2_bzReadClose)663 4915 y Fl(if)f Fj(bzerror)f Fl(is)i Fj(BZ_OK)572 5019 y Fl(collect)h(data)g (from)f Fj(buf)p Fl(,)f(then)h Fj(BZ2_bzReadClose)d Fl(or)j Fj(BZ2_bzReadGetUnused)663 5123 y Fl(if)f Fj(bzerror)f Fl(is)i Fj(BZ_SEQUENCE_END)572 5226 y(BZ2_bzReadClose)663 5330 y Fl(otherwise)p eop %%Page: 22 23 22 22 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29 b(with)g Fj(libbzip2)1881 b Fl(22)150 299 y Ff(3.4.3)63 b Fe(BZ2_bzReadGetUnused)533 486 y Fj(void)47 b(BZ2_bzReadGetUnused)42 b(\()48 b(int*)e(bzerror,)g(BZFILE)g(*b,)1822 589 y(void**)g(unused,)g (int*)g(nUnused)g(\);)150 746 y Fl(Returns)36 b(data)i(whic)m(h)d(w)m (as)j(read)f(from)f(the)h(compressed)g(\014le)f(but)g(w)m(as)h(not)h (needed)e(to)i(get)g(to)g(the)150 856 y(logical)k(end-of-stream.)78 b Fj(*unused)41 b Fl(is)h(set)h(to)g(the)g(address)f(of)g(the)h(data,)k (and)42 b Fj(*nUnused)e Fl(to)k(the)150 965 y(n)m(um)m(b)s(er)29 b(of)i(b)m(ytes.)41 b Fj(*nUnused)28 b Fl(will)g(b)s(e)h(set)i(to)g(a)g (v)-5 b(alue)30 b(b)s(et)m(w)m(een)h Fj(0)f Fl(and)g Fj(BZ_MAX_UNUSED)d Fl(inclusiv)m(e.)150 1122 y(This)d(function)h(ma)m (y)h(only)g(b)s(e)f(called)g(once)i Fj(BZ2_bzRead)c Fl(has)j(signalled) e Fj(BZ_STREAM_END)e Fl(but)j(b)s(efore)150 1232 y Fj(BZ2_bzReadClose)p Fl(.)150 1389 y(P)m(ossible)k(assignmen)m(ts)h(to)h Fj(bzerror)p Fl(:)572 1540 y Fj(BZ_PARAM_ERROR)663 1644 y Fl(if)e Fj(b)h Fl(is)g Fj(NULL)663 1747 y Fl(or)g Fj(unused)f Fl(is)g Fj(NULL)g Fl(or)i Fj(nUnused)d Fl(is)i Fj(NULL)572 1851 y(BZ_SEQUENCE_ERROR)663 1955 y Fl(if)f Fj(BZ_STREAM_END)e Fl(has)j(not)h(b)s(een)e(signalled)663 2059 y(or)h(if)f Fj(b)h Fl(w)m(as)h(op)s(ened)f(with)f Fj(BZ2_bzWriteOpen)542 2162 y(BZ_OK)663 2266 y Fl(otherwise)150 2423 y(Allo)m(w)m(able)h(next) g(actions:)572 2574 y Fj(BZ2_bzReadClose)150 2882 y Ff(3.4.4)63 b Fe(BZ2_bzReadClose)533 3068 y Fj(void)47 b(BZ2_bzReadClose)c(\()48 b(int)f(*bzerror,)e(BZFILE)h(*b)h(\);)150 3225 y Fl(Releases)36 b(all)e(memory)h(p)s(ertaining)e(to)i(the)h(compressed)f(\014le)f Fj(b)p Fl(.)54 b Fj(BZ2_bzReadClose)31 b Fl(do)s(es)k(not)h(call)150 3335 y Fj(fclose)c Fl(on)h(the)h(underlying)d(\014le)h(handle,)h(so)h (y)m(ou)g(should)e(do)h(that)h(y)m(ourself)f(if)g(appropriate.)49 b Fj(BZ2_)150 3445 y(bzReadClose)27 b Fl(should)i(b)s(e)g(called)h(to)h (clean)f(up)g(after)h(all)e(error)h(situations.)150 3601 y(P)m(ossible)f(assignmen)m(ts)h(to)h Fj(bzerror)p Fl(:)572 3752 y Fj(BZ_SEQUENCE_ERROR)663 3856 y Fl(if)e Fj(b)h Fl(w)m(as)h(op)s(ened)e(with)h Fj(BZ2_bzOpenWrite)572 3960 y(BZ_OK)663 4064 y Fl(otherwise)150 4221 y(Allo)m(w)m(able)g(next) g(actions:)572 4372 y(none)150 4679 y Ff(3.4.5)63 b Fe(BZ2_bzWriteOpen) 533 4866 y Fj(BZFILE)46 b(*BZ2_bzWriteOpen)e(\()j(int)g(*bzerror,)e (FILE)i(*f,)1774 4970 y(int)g(blockSize100k,)d(int)j(verbosity,)1774 5074 y(int)g(workFactor)e(\);)150 5230 y Fl(Prepare)33 b(to)g(write)f(compressed)h(data)h(to)f(\014le)f(handle)g Fj(f)p Fl(.)47 b Fj(f)33 b Fl(should)e(refer)i(to)g(a)g(\014le)f(whic)m (h)g(has)h(b)s(een)150 5340 y(op)s(ened)d(for)g(writing,)e(and)i(for)g (whic)m(h)f(the)i(error)f(indicator)f(\()p Fj(ferror\(f\))p Fl(\)is)f(not)i(set.)p eop %%Page: 23 24 23 23 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29 b(with)g Fj(libbzip2)1881 b Fl(23)150 299 y(F)-8 b(or)31 b(the)g(meaning)e(of)i(parameters)g Fj(blockSize100k)p Fl(,)c Fj(verbosity)g Fl(and)j Fj(workFactor)p Fl(,)e(see)150 408 y Fj(BZ2_bzCompressInit)p Fl(.)150 565 y(All)d(required)f(memory)i (is)f(allo)s(cated)i(at)g(this)e(stage,)j(so)f(if)e(the)h(call)g (completes)g(successfully)-8 b(,)26 b Fj(BZ_MEM_)150 675 y(ERROR)j Fl(cannot)i(b)s(e)f(signalled)e(b)m(y)i(a)h(subsequen)m (t)f(call)f(to)i Fj(BZ2_bzWrite)p Fl(.)150 832 y(P)m(ossible)e (assignmen)m(ts)h(to)h Fj(bzerror)p Fl(:)572 983 y Fj(BZ_CONFIG_ERROR) 663 1087 y Fl(if)e(the)i(library)d(has)i(b)s(een)f(mis-compiled)572 1190 y Fj(BZ_PARAM_ERROR)663 1294 y Fl(if)g Fj(f)h Fl(is)g Fj(NULL)663 1398 y Fl(or)g Fj(blockSize100k)44 b(<)k(1)30 b Fl(or)g Fj(blockSize100k)44 b(>)k(9)572 1502 y(BZ_IO_ERROR)663 1605 y Fl(if)29 b Fj(ferror\(f\))f Fl(is)h(nonzero)572 1709 y Fj(BZ_MEM_ERROR)663 1813 y Fl(if)g(insu\016cien)m(t)g(memory)h (is)f(a)m(v)-5 b(ailable)572 1917 y Fj(BZ_OK)663 2021 y Fl(otherwise)150 2177 y(P)m(ossible)29 b(return)h(v)-5 b(alues:)572 2328 y(P)m(oin)m(ter)31 b(to)g(an)f(abstract)h Fj(BZFILE)663 2432 y Fl(if)e Fj(bzerror)f Fl(is)i Fj(BZ_OK)572 2536 y(NULL)663 2640 y Fl(otherwise)150 2797 y(Allo)m(w)m(able)g(next)g (actions:)572 2948 y Fj(BZ2_bzWrite)663 3051 y Fl(if)f Fj(bzerror)f Fl(is)i Fj(BZ_OK)604 3155 y Fl(\(y)m(ou)25 b(could)e(go)h(directly)f(to)h Fj(BZ2_bzWriteClose)p Fl(,)c(but)j(this)g(w)m(ould)g(b)s(e)g(prett)m(y)h(p)s(oin)m(tless\)) 572 3259 y Fj(BZ2_bzWriteClose)663 3363 y Fl(otherwise)150 3639 y Ff(3.4.6)63 b Fe(BZ2_bzWrite)533 3826 y Fj(void)47 b(BZ2_bzWrite)e(\()i(int)g(*bzerror,)e(BZFILE)h(*b,)h(void)g(*buf,)f (int)h(len)g(\);)150 3983 y Fl(Absorbs)26 b Fj(len)g Fl(b)m(ytes)i(from)e(the)i(bu\013er)e Fj(buf)p Fl(,)h(ev)m(en)m(tually) g(to)h(b)s(e)e(compressed)h(and)f(written)g(to)i(the)g(\014le.)150 4140 y(P)m(ossible)h(assignmen)m(ts)h(to)h Fj(bzerror)p Fl(:)572 4291 y Fj(BZ_PARAM_ERROR)663 4395 y Fl(if)e Fj(b)h Fl(is)g Fj(NULL)f Fl(or)h Fj(buf)g Fl(is)f Fj(NULL)g Fl(or)i Fj(len)46 b(<)i(0)572 4498 y(BZ_SEQUENCE_ERROR)663 4602 y Fl(if)29 b(b)h(w)m(as)h(op)s(ened)e(with)g Fj(BZ2_bzReadOpen)572 4706 y(BZ_IO_ERROR)663 4810 y Fl(if)g(there)i(is)e(an)h(error)g (writing)f(the)h(compressed)g(\014le.)572 4914 y Fj(BZ_OK)663 5017 y Fl(otherwise)150 5294 y Ff(3.4.7)63 b Fe(BZ2_bzWriteClose)p eop %%Page: 24 25 24 24 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29 b(with)g Fj(libbzip2)1881 b Fl(24)533 299 y Fj(void)47 b(BZ2_bzWriteClose)c(\()48 b(int)f(*bzerror,)e(BZFILE*)h(f,)1679 403 y(int)h(abandon,)1679 506 y(unsigned)e(int*)i(nbytes_in,)1679 610 y(unsigned)e(int*)i(nbytes_out)e(\);)533 818 y(void)i (BZ2_bzWriteClose64)c(\()k(int)g(*bzerror,)e(BZFILE*)h(f,)1774 922 y(int)h(abandon,)1774 1025 y(unsigned)f(int*)g(nbytes_in_lo32,)1774 1129 y(unsigned)g(int*)g(nbytes_in_hi32,)1774 1233 y(unsigned)g(int*)g (nbytes_out_lo32,)1774 1337 y(unsigned)g(int*)g(nbytes_out_hi32)e(\);) 150 1493 y Fl(Compresses)39 b(and)g(\015ushes)g(to)h(the)g(compressed)g (\014le)f(all)f(data)j(so)f(far)g(supplied)c(b)m(y)k Fj(BZ2_bzWrite)p Fl(.)150 1603 y(The)27 b(logical)g(end-of-stream)h (mark)m(ers)g(are)g(also)f(written,)h(so)f(subsequen)m(t)g(calls)g(to)h Fj(BZ2_bzWrite)d Fl(are)150 1713 y(illegal.)50 b(All)33 b(memory)h(asso)s(ciated)g(with)f(the)i(compressed)e(\014le)h Fj(b)f Fl(is)g(released.)52 b Fj(fflush)33 b Fl(is)g(called)g(on)150 1822 y(the)e(compressed)f(\014le,)f(but)h(it)g(is)f(not)i Fj(fclose)p Fl('d.)150 1979 y(If)i Fj(BZ2_bzWriteClose)c Fl(is)k(called)f(to)j(clean)e(up)f(after)i(an)g(error,)g(the)g(only)e (action)i(is)f(to)h(release)g(the)150 2089 y(memory)-8 b(.)42 b(The)30 b(library)e(records)j(the)g(error)f(co)s(des)h(issued)e (b)m(y)h(previous)f(calls,)i(so)f(this)g(situation)g(will)150 2198 y(b)s(e)c(detected)h(automatically)-8 b(.)40 b(There)26 b(is)g(no)g(attempt)h(to)h(complete)e(the)h(compression)f(op)s (eration,)g(nor)150 2308 y(to)32 b Fj(fflush)d Fl(the)i(compressed)g (\014le.)42 b(Y)-8 b(ou)32 b(can)f(force)h(this)e(b)s(eha)m(viour)g(to) h(happ)s(en)f(ev)m(en)i(in)d(the)j(case)g(of)150 2417 y(no)e(error,)g(b)m(y)h(passing)e(a)i(nonzero)f(v)-5 b(alue)30 b(to)h Fj(abandon)p Fl(.)150 2574 y(If)j Fj(nbytes_in)d Fl(is)j(non-n)m(ull,)f Fj(*nbytes_in)e Fl(will)h(b)s(e)h(set)i(to)g(b)s (e)f(the)g(total)h(v)m(olume)f(of)g(uncompressed)150 2684 y(data)k(handled.)60 b(Similarly)-8 b(,)35 b Fj(nbytes_out)g Fl(will)g(b)s(e)h(set)i(to)g(the)g(total)g(v)m(olume)f(of)g(compressed) g(data)150 2793 y(written.)h(F)-8 b(or)27 b(compatibilit)m(y)d(with)h (older)g(v)m(ersions)h(of)g(the)g(library)-8 b(,)25 b Fj(BZ2_bzWriteClose)d Fl(only)j(yields)150 2903 y(the)40 b(lo)m(w)m(er)g(32)h(bits)d(of)i(these)h(coun)m(ts.)69 b(Use)40 b Fj(BZ2_bzWriteClose64)35 b Fl(if)k(y)m(ou)h(w)m(an)m(t)h (the)f(full)d(64)k(bit)150 3013 y(coun)m(ts.)g(These)30 b(t)m(w)m(o)i(functions)d(are)i(otherwise)f(absolutely)f(iden)m(tical.) 150 3169 y(P)m(ossible)g(assignmen)m(ts)h(to)h Fj(bzerror)p Fl(:)572 3320 y Fj(BZ_SEQUENCE_ERROR)663 3424 y Fl(if)e Fj(b)h Fl(w)m(as)h(op)s(ened)e(with)h Fj(BZ2_bzReadOpen)572 3528 y(BZ_IO_ERROR)663 3632 y Fl(if)f(there)i(is)e(an)h(error)g (writing)f(the)h(compressed)g(\014le)572 3736 y Fj(BZ_OK)663 3839 y Fl(otherwise)150 4161 y Ff(3.4.8)63 b(Handling)41 b(em)m(b)s(edded)g(compressed)h(data)e(streams)150 4354 y Fl(The)i(high-lev)m(el)g(library)f(facilitates)h(use)h(of)g Fj(bzip2)e Fl(data)j(streams)f(whic)m(h)f(form)g(some)i(part)e(of)i(a) 150 4463 y(surrounding,)27 b(larger)j(data)h(stream.)225 4620 y Fi(\017)60 b Fl(F)-8 b(or)22 b(writing,)f(the)g(library)e(tak)m (es)k(an)e(op)s(en)f(\014le)g(handle,)i(writes)e(compressed)h(data)h (to)g(it,)g Fj(fflush)p Fl(es)330 4730 y(it)34 b(but)f(do)s(es)h(not)h Fj(fclose)d Fl(it.)52 b(The)34 b(calling)f(application)g(can)h(write)g (its)f(o)m(wn)i(data)g(b)s(efore)f(and)330 4839 y(after)d(the)f (compressed)h(data)g(stream,)g(using)d(that)j(same)g(\014le)f(handle.) 225 5011 y Fi(\017)60 b Fl(Reading)34 b(is)f(more)i(complex,)g(and)f (the)h(facilities)d(are)j(not)g(as)g(general)f(as)h(they)f(could)g(b)s (e)g(since)330 5121 y(generalit)m(y)e(is)f(hard)f(to)j(reconcile)e (with)f(e\016ciency)-8 b(.)46 b Fj(BZ2_bzRead)29 b Fl(reads)i(from)g (the)h(compressed)330 5230 y(\014le)39 b(in)g(blo)s(c)m(ks)g(of)h(size) g Fj(BZ_MAX_UNUSED)c Fl(b)m(ytes,)44 b(and)39 b(in)g(doing)g(so)h (probably)e(will)f(o)m(v)m(ersho)s(ot)330 5340 y(the)i(logical)g(end)f (of)h(compressed)f(stream.)67 b(T)-8 b(o)40 b(reco)m(v)m(er)g(this)e (data)i(once)f(decompression)f(has)p eop %%Page: 25 26 25 25 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29 b(with)g Fj(libbzip2)1881 b Fl(25)330 299 y(ended,)28 b(call)g Fj(BZ2_bzReadGetUnused)23 b Fl(after)29 b(the)g(last)f(call)g (of)g Fj(BZ2_bzRead)e Fl(\(the)j(one)g(returning)330 408 y Fj(BZ_STREAM_END)p Fl(\))e(but)j(b)s(efore)g(calling)f Fj(BZ2_bzReadClose)p Fl(.)150 596 y(This)51 b(mec)m(hanism)g(mak)m(es)j (it)e(easy)h(to)g(decompress)f(m)m(ultiple)e Fj(bzip2)i Fl(streams)g(placed)g(end-to-)150 706 y(end.)90 b(As)48 b(the)f(end)f(of)i(one)f(stream,)52 b(when)46 b Fj(BZ2_bzRead)f Fl(returns)h Fj(BZ_STREAM_END)p Fl(,)i(call)e Fj(BZ2_)150 816 y(bzReadGetUnused)36 b Fl(to)41 b(collect)g(the)g(un)m(used)e(data) i(\(cop)m(y)g(it)f(in)m(to)g(y)m(our)h(o)m(wn)f(bu\013er)f (somewhere\).)150 925 y(That)25 b(data)g(forms)f(the)h(start)h(of)e (the)h(next)g(compressed)g(stream.)39 b(T)-8 b(o)25 b(start)h (uncompressing)c(that)k(next)150 1035 y(stream,)40 b(call)d Fj(BZ2_bzReadOpen)d Fl(again,)40 b(feeding)d(in)g(the)h(un)m(used)e (data)j(via)e(the)h Fj(unused)p Fl(/)p Fj(nUnused)150 1144 y Fl(parameters.)54 b(Keep)34 b(doing)g(this)f(un)m(til)g Fj(BZ_STREAM_END)e Fl(return)j(coincides)f(with)h(the)g(ph)m(ysical)g (end)150 1254 y(of)d(\014le)e(\()p Fj(feof\(f\))p Fl(\).)39 b(In)30 b(this)f(situation)h Fj(BZ2_bzReadGetUnused)25 b Fl(will)i(of)k(course)g(return)e(no)h(data.)150 1411 y(This)c(should)f(giv)m(e)j(some)g(feel)f(for)g(ho)m(w)h(the)g (high-lev)m(el)e(in)m(terface)i(can)f(b)s(e)g(used.)39 b(If)27 b(y)m(ou)h(require)e(extra)150 1520 y(\015exibilit)m(y)-8 b(,)28 b(y)m(ou'll)i(ha)m(v)m(e)h(to)g(bite)f(the)h(bullet)d(and)i(get) i(to)f(grips)e(with)g(the)h(lo)m(w-lev)m(el)h(in)m(terface.)150 1779 y Ff(3.4.9)63 b(Standard)40 b(\014le-reading/writing)j(co)s(de)150 1972 y Fl(Here's)31 b(ho)m(w)f(y)m(ou'd)h(write)e(data)j(to)f(a)f (compressed)g(\014le:)390 2330 y Fj(FILE*)142 b(f;)390 2434 y(BZFILE*)46 b(b;)390 2538 y(int)238 b(nBuf;)390 2642 y(char)190 b(buf[)46 b(/*)i(whatever)d(size)i(you)g(like)f(*/)i (];)390 2746 y(int)238 b(bzerror;)390 2849 y(int)g(nWritten;)390 3057 y(f)47 b(=)h(fopen)e(\()i("myfile.bz2",)c("w")j(\);)390 3161 y(if)g(\(!f\))g({)533 3264 y(/*)g(handle)f(error)h(*/)390 3368 y(})390 3472 y(b)g(=)h(BZ2_bzWriteOpen)c(\()j(&bzerror,)e(f,)i(9)h (\);)390 3576 y(if)f(\(bzerror)f(!=)h(BZ_OK\))f({)533 3680 y(BZ2_bzWriteClose)e(\()j(b)g(\);)533 3783 y(/*)g(handle)f(error)h (*/)390 3887 y(})390 4095 y(while)f(\()i(/*)f(condition)e(*/)i(\))h({) 533 4198 y(/*)f(get)g(data)g(to)g(write)f(into)h(buf,)g(and)g(set)g (nBuf)f(appropriately)e(*/)533 4302 y(nWritten)i(=)h(BZ2_bzWrite)e(\()i (&bzerror,)f(b,)h(buf,)f(nBuf)h(\);)533 4406 y(if)g(\(bzerror)f(==)h (BZ_IO_ERROR\))e({)676 4510 y(BZ2_bzWriteClose)f(\()j(&bzerror,)e(b)j (\);)676 4614 y(/*)g(handle)e(error)g(*/)533 4717 y(})390 4821 y(})390 5029 y(BZ2_bzWriteClose)d(\()48 b(&bzerror,)d(b)j(\);)390 5132 y(if)f(\(bzerror)f(==)h(BZ_IO_ERROR\))d({)533 5236 y(/*)j(handle)f(error)h(*/)390 5340 y(})p eop %%Page: 26 27 26 26 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29 b(with)g Fj(libbzip2)1881 b Fl(26)150 299 y(And)29 b(to)j(read)e(from)g (a)h(compressed)f(\014le:)390 450 y Fj(FILE*)142 b(f;)390 554 y(BZFILE*)46 b(b;)390 657 y(int)238 b(nBuf;)390 761 y(char)190 b(buf[)46 b(/*)i(whatever)d(size)i(you)g(like)f(*/)i(];)390 865 y(int)238 b(bzerror;)390 969 y(int)g(nWritten;)390 1176 y(f)47 b(=)h(fopen)e(\()i("myfile.bz2",)c("r")j(\);)390 1280 y(if)g(\(!f\))g({)533 1384 y(/*)g(handle)f(error)h(*/)390 1488 y(})390 1591 y(b)g(=)h(BZ2_bzReadOpen)c(\()j(&bzerror,)f(f,)h(0,)g (NULL,)f(0)i(\);)390 1695 y(if)f(\(bzerror)f(!=)h(BZ_OK\))f({)533 1799 y(BZ2_bzReadClose)e(\()j(&bzerror,)f(b)h(\);)533 1903 y(/*)g(handle)f(error)h(*/)390 2007 y(})390 2214 y(bzerror)f(=)h(BZ_OK;)390 2318 y(while)f(\(bzerror)g(==)h(BZ_OK)f(&&)i (/*)f(arbitrary)e(other)h(conditions)f(*/\))i({)533 2422 y(nBuf)g(=)g(BZ2_bzRead)e(\()j(&bzerror,)d(b,)i(buf,)g(/*)g(size)g(of)g (buf)g(*/)g(\);)533 2525 y(if)g(\(bzerror)f(==)h(BZ_OK\))f({)676 2629 y(/*)i(do)f(something)e(with)i(buf[0)f(..)h(nBuf-1])f(*/)533 2733 y(})390 2837 y(})390 2941 y(if)h(\(bzerror)f(!=)h(BZ_STREAM_END\)) d({)533 3044 y(BZ2_bzReadClose)g(\()j(&bzerror,)f(b)h(\);)533 3148 y(/*)g(handle)f(error)h(*/)390 3252 y(})g(else)g({)533 3356 y(BZ2_bzReadClose)d(\()j(&bzerror)f(\);)390 3459 y(})150 3753 y Fk(3.5)68 b(Utilit)l(y)47 b(functions)150 4045 y Ff(3.5.1)63 b Fe(BZ2_bzBuffToBuffCompress)533 4232 y Fj(int)47 b(BZ2_bzBuffToBuffCompress\()41 b(char*)428 b(dest,)1965 4335 y(unsigned)46 b(int*)g(destLen,)1965 4439 y(char*)428 b(source,)1965 4543 y(unsigned)46 b(int)94 b(sourceLen,)1965 4647 y(int)524 b(blockSize100k,)1965 4751 y(int)g(verbosity,)1965 4854 y(int)g(workFactor)45 b(\);)150 5011 y Fl(A)m(ttempts)33 b(to)g(compress)f(the)g(data)h(in)e Fj(source[0)d(..)i(sourceLen-1])e Fl(in)m(to)k(the)h(destination)e (bu\013er,)150 5121 y Fj(dest[0)e(..)g(*destLen-1])p Fl(.)37 b(If)26 b(the)g(destination)g(bu\013er)f(is)h(big)f(enough,)j Fj(*destLen)c Fl(is)h(set)i(to)g(the)g(size)150 5230 y(of)i(the)f(compressed)h(data,)g(and)f Fj(BZ_OK)f Fl(is)h(returned.)39 b(If)28 b(the)h(compressed)f(data)h(w)m(on't)g(\014t,)g Fj(*destLen)150 5340 y Fl(is)g(unc)m(hanged,)i(and)e Fj(BZ_OUTBUFF_FULL)e Fl(is)i(returned.)p eop %%Page: 27 28 27 27 bop 150 -116 a Fl(Chapter)30 b(3:)h(Programming)e(with)g Fj(libbzip2)1891 b Fl(27)150 299 y(Compression)22 b(in)g(this)h(manner) g(is)g(a)h(one-shot)g(ev)m(en)m(t,)j(done)c(with)g(a)h(single)e(call)h (to)i(this)d(function.)37 b(The)150 408 y(resulting)25 b(compressed)i(data)i(is)d(a)i(complete)f Fj(bzip2)f Fl(format)i(data)g(stream.)40 b(There)27 b(is)f(no)i(mec)m(hanism)150 518 y(for)23 b(making)g(additional)e(calls)i(to)h(pro)m(vide)f(extra)h (input)e(data.)39 b(If)23 b(y)m(ou)h(w)m(an)m(t)g(that)g(kind)e(of)h (mec)m(hanism,)150 628 y(use)30 b(the)h(lo)m(w-lev)m(el)f(in)m (terface.)150 784 y(F)-8 b(or)31 b(the)g(meaning)e(of)i(parameters)g Fj(blockSize100k)p Fl(,)c Fj(verbosity)g Fl(and)j Fj(workFactor)p Fl(,)150 894 y(see)h Fj(BZ2_bzCompressInit)p Fl(.)150 1051 y(T)-8 b(o)27 b(guaran)m(tee)h(that)e(the)h(compressed)f(data)h (will)d(\014t)i(in)f(its)g(bu\013er,)i(allo)s(cate)f(an)g(output)g (bu\013er)g(of)g(size)150 1160 y(1\045)31 b(larger)f(than)g(the)g (uncompressed)f(data,)j(plus)c(six)h(h)m(undred)g(extra)i(b)m(ytes.)150 1317 y Fj(BZ2_bzBuffToBuffDecompre)o(ss)25 b Fl(will)k(not)j(write)e (data)j(at)f(or)f(b)s(ey)m(ond)g Fj(dest[*destLen])p Fl(,)d(ev)m(en)k(in)150 1427 y(case)f(of)g(bu\013er)e(o)m(v)m(er\015o)m (w.)150 1584 y(P)m(ossible)g(return)h(v)-5 b(alues:)572 1735 y Fj(BZ_CONFIG_ERROR)663 1839 y Fl(if)29 b(the)i(library)d(has)i (b)s(een)f(mis-compiled)572 1942 y Fj(BZ_PARAM_ERROR)663 2046 y Fl(if)g Fj(dest)g Fl(is)h Fj(NULL)f Fl(or)h Fj(destLen)f Fl(is)g Fj(NULL)663 2150 y Fl(or)h Fj(blockSize100k)44 b(<)k(1)30 b Fl(or)g Fj(blockSize100k)44 b(>)k(9)663 2254 y Fl(or)30 b Fj(verbosity)45 b(<)j(0)30 b Fl(or)g Fj(verbosity)45 b(>)j(4)663 2357 y Fl(or)30 b Fj(workFactor)45 b(<)j(0)30 b Fl(or)g Fj(workFactor)45 b(>)i(250)572 2461 y(BZ_MEM_ERROR)663 2565 y Fl(if)29 b(insu\016cien)m(t)g(memory)h(is)f (a)m(v)-5 b(ailable)572 2669 y Fj(BZ_OUTBUFF_FULL)663 2773 y Fl(if)29 b(the)i(size)f(of)g(the)h(compressed)f(data)h(exceeds)g Fj(*destLen)572 2876 y(BZ_OK)663 2980 y Fl(otherwise)150 3349 y Ff(3.5.2)63 b Fe(BZ2_bzBuffToBuffDecompress)533 3536 y Fj(int)47 b(BZ2_bzBuffToBuffDecompres)o(s)42 b(\()47 b(char*)428 b(dest,)2108 3640 y(unsigned)46 b(int*)g(destLen,)2108 3744 y(char*)428 b(source,)2108 3848 y(unsigned)46 b(int)94 b(sourceLen,)2108 3951 y(int)524 b(small,)2108 4055 y(int)g(verbosity) 46 b(\);)150 4212 y Fl(A)m(ttempts)24 b(to)g(decompress)f(the)g(data)g (in)f Fj(source[0)28 b(..)i(sourceLen-1])20 b Fl(in)m(to)j(the)g (destination)f(bu\013er,)150 4322 y Fj(dest[0)29 b(..)g(*destLen-1])p Fl(.)37 b(If)26 b(the)g(destination)g(bu\013er)f(is)h(big)f(enough,)j Fj(*destLen)c Fl(is)h(set)i(to)g(the)g(size)150 4431 y(of)21 b(the)g(uncompressed)e(data,)24 b(and)c Fj(BZ_OK)f Fl(is)h(returned.)36 b(If)20 b(the)h(compressed)g(data)g(w)m(on't)h (\014t,)g Fj(*destLen)150 4541 y Fl(is)29 b(unc)m(hanged,)i(and)e Fj(BZ_OUTBUFF_FULL)e Fl(is)i(returned.)150 4698 y Fj(source)g Fl(is)g(assumed)h(to)h(hold)e(a)i(complete)f Fj(bzip2)f Fl(format)i(data)g(stream.)150 4807 y Fj(BZ2_bzBuffToBuffDecompre)o(ss) 22 b Fl(tries)28 b(to)i(decompress)e(the)h(en)m(tiret)m(y)g(of)g(the)f (stream)h(in)m(to)g(the)f(out-)150 4917 y(put)i(bu\013er.)150 5074 y(F)-8 b(or)31 b(the)g(meaning)e(of)i(parameters)g Fj(small)e Fl(and)g Fj(verbosity)p Fl(,)f(see)j Fj (BZ2_bzDecompressInit)p Fl(.)150 5230 y(Because)j(the)f(compression)e (ratio)i(of)g(the)g(compressed)f(data)h(cannot)g(b)s(e)f(kno)m(wn)g(in) g(adv)-5 b(ance,)34 b(there)150 5340 y(is)d(no)h(easy)g(w)m(a)m(y)h(to) f(guaran)m(tee)i(that)e(the)g(output)f(bu\013er)g(will)e(b)s(e)i(big)g (enough.)45 b(Y)-8 b(ou)32 b(ma)m(y)h(of)f(course)p eop %%Page: 28 29 28 28 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29 b(with)g Fj(libbzip2)1881 b Fl(28)150 299 y(mak)m(e)36 b(arrangemen)m(ts)f(in)e(y)m(our)i(co)s(de)g(to)g(record)g(the)g(size)f (of)h(the)g(uncompressed)f(data,)i(but)e(suc)m(h)h(a)150 408 y(mec)m(hanism)30 b(is)f(b)s(ey)m(ond)h(the)g(scop)s(e)h(of)f(this) g(library)-8 b(.)150 565 y Fj(BZ2_bzBuffToBuffDecompre)o(ss)25 b Fl(will)k(not)j(write)e(data)j(at)f(or)f(b)s(ey)m(ond)g Fj(dest[*destLen])p Fl(,)d(ev)m(en)k(in)150 675 y(case)f(of)g(bu\013er) e(o)m(v)m(er\015o)m(w.)150 832 y(P)m(ossible)g(return)h(v)-5 b(alues:)572 983 y Fj(BZ_CONFIG_ERROR)663 1087 y Fl(if)29 b(the)i(library)d(has)i(b)s(een)f(mis-compiled)572 1190 y Fj(BZ_PARAM_ERROR)663 1294 y Fl(if)g Fj(dest)g Fl(is)h Fj(NULL)f Fl(or)h Fj(destLen)f Fl(is)g Fj(NULL)663 1398 y Fl(or)h Fj(small)46 b(!=)i(0)f(&&)g(small)g(!=)g(1)663 1502 y Fl(or)30 b Fj(verbosity)45 b(<)j(0)30 b Fl(or)g Fj(verbosity)45 b(>)j(4)572 1605 y(BZ_MEM_ERROR)663 1709 y Fl(if)29 b(insu\016cien)m(t)g(memory)h(is)f(a)m(v)-5 b(ailable)572 1813 y Fj(BZ_OUTBUFF_FULL)663 1917 y Fl(if)29 b(the)i(size)f(of)g(the)h(compressed)f(data)h(exceeds)g Fj(*destLen)572 2021 y(BZ_DATA_ERROR)663 2124 y Fl(if)e(a)i(data)g(in)m (tegrit)m(y)f(error)g(w)m(as)h(detected)h(in)d(the)h(compressed)g(data) 572 2228 y Fj(BZ_DATA_ERROR_MAGIC)663 2332 y Fl(if)f(the)i(compressed)f (data)h(do)s(esn't)f(b)s(egin)f(with)g(the)i(righ)m(t)e(magic)i(b)m (ytes)572 2436 y Fj(BZ_UNEXPECTED_EOF)663 2539 y Fl(if)e(the)i (compressed)f(data)h(ends)e(unexp)s(ectedly)572 2643 y Fj(BZ_OK)663 2747 y Fl(otherwise)150 3116 y Fk(3.6)68 b Fd(zlib)43 b Fk(compatibilit)l(y)k(functions)150 3308 y Fl(Y)-8 b(oshiok)j(a)33 b(Tsuneo)e(has)h(con)m(tributed)g(some)g (functions)f(to)i(giv)m(e)g(b)s(etter)f Fj(zlib)f Fl(compatibilit)m(y) -8 b(.)45 b(These)150 3418 y(functions)36 b(are)i Fj(BZ2_bzopen)p Fl(,)e Fj(BZ2_bzread)p Fl(,)h Fj(BZ2_bzwrite)p Fl(,)f Fj(BZ2_bzflush)p Fl(,)h Fj(BZ2_bzclose)p Fl(,)f Fj(BZ2_)150 3527 y(bzerror)23 b Fl(and)h Fj(BZ2_bzlibVersion)p Fl(.)34 b(These)25 b(functions)e(are)j(not)f(\(y)m(et\))h(o\016cially)e(part)h (of)g(the)g(library)-8 b(.)150 3637 y(If)30 b(they)g(break,)h(y)m(ou)g (get)g(to)g(k)m(eep)g(all)f(the)g(pieces.)41 b(Nev)m(ertheless,)31 b(I)f(think)f(they)i(w)m(ork)f(ok.)390 3788 y Fj(typedef)46 b(void)g(BZFILE;)390 3995 y(const)g(char)h(*)g(BZ2_bzlibVersion)d(\()j (void)g(\);)150 4152 y Fl(Returns)29 b(a)i(string)f(indicating)e(the)i (library)e(v)m(ersion.)390 4303 y Fj(BZFILE)46 b(*)i(BZ2_bzopen)92 b(\()48 b(const)e(char)h(*path,)f(const)g(char)h(*mode)f(\);)390 4407 y(BZFILE)g(*)i(BZ2_bzdopen)c(\()k(int)381 b(fd,)190 b(const)46 b(char)h(*mode)f(\);)150 4564 y Fl(Op)s(ens)19 b(a)j Fj(.bz2)e Fl(\014le)g(for)g(reading)g(or)h(writing,)g(using)f (either)g(its)h(name)g(or)g(a)g(pre-existing)f(\014le)g(descriptor.)150 4674 y(Analogous)30 b(to)i Fj(fopen)c Fl(and)i Fj(fdopen)p Fl(.)390 4825 y Fj(int)47 b(BZ2_bzread)93 b(\()47 b(BZFILE*)f(b,)h (void*)f(buf,)h(int)g(len)g(\);)390 4928 y(int)g(BZ2_bzwrite)e(\()i (BZFILE*)f(b,)h(void*)f(buf,)h(int)g(len)g(\);)150 5085 y Fl(Reads/writes)30 b(data)h(from/to)g(a)g(previously)d(op)s(ened)i Fj(BZFILE)p Fl(.)39 b(Analogous)30 b(to)h Fj(fread)e Fl(and)h Fj(fwrite)p Fl(.)390 5236 y Fj(int)95 b(BZ2_bzflush)44 b(\()k(BZFILE*)e(b)h(\);)390 5340 y(void)g(BZ2_bzclose)d(\()k(BZFILE*)e (b)h(\);)p eop %%Page: 29 30 29 29 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29 b(with)g Fj(libbzip2)1881 b Fl(29)150 299 y(Flushes/closes)27 b(a)h Fj(BZFILE)p Fl(.)39 b Fj(BZ2_bzflush)24 b Fl(do)s(esn't)k (actually)f(do)h(an)m(ything.)39 b(Analogous)28 b(to)h Fj(fflush)150 408 y Fl(and)h Fj(fclose)p Fl(.)390 559 y Fj(const)46 b(char)h(*)g(BZ2_bzerror)e(\()j(BZFILE)e(*b,)h(int)g (*errnum)e(\))150 716 y Fl(Returns)31 b(a)i(string)e(describing)f(the)i (more)g(recen)m(t)h(error)f(status)h(of)f Fj(b)p Fl(,)g(and)g(also)g (sets)h Fj(*errnum)d Fl(to)j(its)150 826 y(n)m(umerical)c(v)-5 b(alue.)150 1242 y Fk(3.7)68 b(Using)46 b(the)f(library)g(in)g(a)g Fd(stdio)p Fk(-free)f(en)l(vironmen)l(t)150 1615 y Ff(3.7.1)63 b(Getting)40 b(rid)h(of)g Fe(stdio)150 1807 y Fl(In)i(a)g(deeply)g(em)m (b)s(edded)f(application,)j(y)m(ou)f(migh)m(t)f(w)m(an)m(t)h(to)g(use)f (just)g(the)h(memory-to-memory)150 1917 y(functions.)39 b(Y)-8 b(ou)30 b(can)f(do)g(this)g(con)m(v)m(enien)m(tly)g(b)m(y)g (compiling)e(the)j(library)d(with)h(prepro)s(cessor)g(sym)m(b)s(ol)150 2026 y Fj(BZ_NO_STDIO)35 b Fl(de\014ned.)63 b(Doing)39 b(this)e(giv)m(es)h(y)m(ou)h(a)f(library)e(con)m(taining)i(only)f(the)i (follo)m(wing)e(eigh)m(t)150 2136 y(functions:)150 2293 y Fj(BZ2_bzCompressInit)p Fl(,)26 b Fj(BZ2_bzCompress)p Fl(,)g Fj(BZ2_bzCompressEnd)150 2402 y(BZ2_bzDecompressInit)p Fl(,)f Fj(BZ2_bzDecompress)p Fl(,)h Fj(BZ2_bzDecompressEnd)150 2512 y(BZ2_bzBuffToBuffCompress)o Fl(,)f Fj(BZ2_bzBuffToBuffDecompre)o (ss)150 2669 y Fl(When)30 b(compiled)f(lik)m(e)h(this,)f(all)g (functions)g(will)f(ignore)i Fj(verbosity)e Fl(settings.)150 3006 y Ff(3.7.2)63 b(Critical)40 b(error)h(handling)150 3199 y Fj(libbzip2)20 b Fl(con)m(tains)j(a)g(n)m(um)m(b)s(er)f(of)g(in) m(ternal)g(assertion)g(c)m(hec)m(ks)i(whic)m(h)d(should,)i(needless)f (to)h(sa)m(y)-8 b(,)26 b(nev)m(er)150 3308 y(b)s(e)g(activ)-5 b(ated.)40 b(Nev)m(ertheless,)28 b(if)d(an)i(assertion)f(should)e (fail,)i(b)s(eha)m(viour)f(dep)s(ends)f(on)j(whether)e(or)i(not)150 3418 y(the)k(library)d(w)m(as)i(compiled)f(with)g Fj(BZ_NO_STDIO)e Fl(set.)150 3575 y(F)-8 b(or)31 b(a)g(normal)e(compile,)h(an)g (assertion)g(failure)f(yields)f(the)j(message)533 3726 y Fj(bzip2/libbzip2:)44 b(internal)h(error)i(number)f(N.)533 3829 y(This)h(is)g(a)g(bug)g(in)h(bzip2/libbzip2,)43 b(1.0)k(of)g(21-Mar-2000.)533 3933 y(Please)f(report)g(it)i(to)f(me)g (at:)g(jseward@acm.org.)91 b(If)47 b(this)g(happened)533 4037 y(when)g(you)g(were)f(using)h(some)f(program)g(which)h(uses)f (libbzip2)g(as)h(a)533 4141 y(component,)e(you)i(should)f(also)h (report)f(this)h(bug)f(to)i(the)f(author\(s\))533 4244 y(of)g(that)g(program.)93 b(Please)46 b(make)h(an)g(effort)f(to)h (report)g(this)f(bug;)533 4348 y(timely)g(and)h(accurate)f(bug)h (reports)e(eventually)g(lead)i(to)g(higher)533 4452 y(quality)f (software.)93 b(Thanks.)h(Julian)46 b(Seward,)f(21)j(March)e(2000.)150 4609 y Fl(where)30 b Fj(N)g Fl(is)f(some)i(error)f(co)s(de)h(n)m(um)m (b)s(er.)39 b Fj(exit\(3\))28 b Fl(is)i(then)g(called.)150 4766 y(F)-8 b(or)31 b(a)g Fj(stdio)p Fl(-free)e(library)-8 b(,)29 b(assertion)h(failures)e(result)i(in)f(a)i(call)e(to)i(a)g (function)e(declared)h(as:)533 4917 y Fj(extern)46 b(void)h (bz_internal_error)c(\()k(int)g(errcode)f(\);)150 5074 y Fl(The)30 b(relev)-5 b(an)m(t)31 b(co)s(de)f(is)g(passed)f(as)i(a)g (parameter.)41 b(Y)-8 b(ou)31 b(should)d(supply)g(suc)m(h)i(a)h (function.)150 5230 y(In)g(either)g(case,)j(once)e(an)g(assertion)g (failure)e(has)h(o)s(ccurred,)h(an)m(y)g Fj(bz_stream)e Fl(records)h(in)m(v)m(olv)m(ed)h(can)150 5340 y(b)s(e)e(regarded)g(as)h (in)m(v)-5 b(alid.)38 b(Y)-8 b(ou)31 b(should)d(not)j(attempt)g(to)g (resume)f(normal)g(op)s(eration)f(with)g(them.)p eop %%Page: 30 31 30 30 bop 150 -116 a Fl(Chapter)30 b(3:)41 b(Programming)29 b(with)g Fj(libbzip2)1881 b Fl(30)150 299 y(Y)-8 b(ou)22 b(ma)m(y)-8 b(,)25 b(of)d(course,)h(c)m(hange)g(critical)e(error)g (handling)e(to)j(suit)f(y)m(our)g(needs.)38 b(As)21 b(I)h(said)e(ab)s (o)m(v)m(e,)25 b(critical)150 408 y(errors)30 b(indicate)g(bugs)g(in)g (the)h(library)d(and)i(should)f(not)i(o)s(ccur.)42 b(All)29 b Fj(")p Fl(normal)p Fj(")h Fl(error)g(situations)g(are)150 518 y(indicated)f(via)h(error)g(return)f(co)s(des)i(from)f(functions,)f (and)g(can)i(b)s(e)f(reco)m(v)m(ered)i(from.)150 798 y Fk(3.8)68 b(Making)45 b(a)g(Windo)l(ws)h(DLL)150 990 y Fl(Ev)m(erything)30 b(related)g(to)h(Windo)m(ws)f(has)g(b)s(een)f (con)m(tributed)h(b)m(y)g(Y)-8 b(oshiok)j(a)31 b(Tsuneo)150 1100 y(\()p Fj(QWF00133@niftyserve.or.jp)46 b Fl(/)52 b Fj(tsuneo-y@is.aist-nara.ac.j)o(p)p Fl(\),)g(so)h(y)m(ou)f(should)f (send)150 1210 y(y)m(our)30 b(queries)g(to)h(him)e(\(but)h(p)s(erhaps)e (Cc:)41 b(me,)31 b Fj(jseward@acm.org)p Fl(\).)150 1366 y(My)43 b(v)-5 b(ague)44 b(understanding)d(of)i(what)g(to)h(do)f(is:)65 b(using)41 b(Visual)h(C)p Fj(++)g Fl(5.0,)48 b(op)s(en)42 b(the)h(pro)5 b(ject)44 b(\014le)150 1476 y Fj(libbz2.dsp)p Fl(,)28 b(and)i(build.)37 b(That's)31 b(all.)150 1633 y(If)41 b(y)m(ou)g(can't)h(op)s(en)e(the)h(pro)5 b(ject)42 b(\014le)e(for)h(some)g(reason,)j(mak)m(e)e(a)g(new)e(one,)k(naming)c (these)i(\014les:)150 1742 y Fj(blocksort.c)p Fl(,)28 b Fj(bzlib.c)p Fl(,)g Fj(compress.c)p Fl(,)g Fj(crctable.c)p Fl(,)g Fj(decompress.c)p Fl(,)f Fj(huffman.c)p Fl(,)150 1852 y Fj(randtable.c)32 b Fl(and)j Fj(libbz2.def)p Fl(.)53 b(Y)-8 b(ou)36 b(will)d(also)i(need)g(to)h(name)g(the)g(header)f (\014les)f Fj(bzlib.h)g Fl(and)150 1962 y Fj(bzlib_private.h)p Fl(.)150 2118 y(If)c(y)m(ou)h(don't)f(use)g(V)m(C)p Fj(++)p Fl(,)g(y)m(ou)h(ma)m(y)g(need)f(to)h(de\014ne)f(the)h(propro)s(cessor)e (sym)m(b)s(ol)g Fj(_WIN32)p Fl(.)150 2275 y(Finally)-8 b(,)28 b Fj(dlltest.c)e Fl(is)h(a)i(sample)f(program)g(using)g(the)g (DLL.)h(It)g(has)f(a)h(pro)5 b(ject)29 b(\014le,)g Fj(dlltest.dsp)p Fl(.)150 2432 y(If)h(y)m(ou)h(just)e(w)m(an)m(t)j(a)e(mak)m(e\014le)h (for)f(Visual)f(C,)h(ha)m(v)m(e)i(a)e(lo)s(ok)g(at)i Fj(makefile.msc)p Fl(.)150 2589 y(Be)k(a)m(w)m(are)g(that)g(if)e(y)m (ou)h(compile)f Fj(bzip2)g Fl(itself)g(on)h(Win32,)h(y)m(ou)g(m)m(ust)f (set)g Fj(BZ_UNIX)e Fl(to)j(0)f(and)g Fj(BZ_)150 2698 y(LCCWIN32)27 b Fl(to)j(1,)g(in)f(the)g(\014le)g Fj(bzip2.c)p Fl(,)e(b)s(efore)i(compiling.)39 b(Otherwise)28 b(the)h(resulting)f (binary)f(w)m(on't)150 2808 y(w)m(ork)j(correctly)-8 b(.)150 2965 y(I)30 b(ha)m(v)m(en't)i(tried)d(an)m(y)i(of)g(this)e (stu\013)h(m)m(yself,)g(but)g(it)f(all)h(lo)s(oks)g(plausible.)p eop %%Page: 31 32 31 31 bop 150 -116 a Fl(Chapter)30 b(4:)41 b(Miscellanea)2586 b(31)150 299 y Fh(4)80 b(Miscellanea)150 583 y Fl(These)30 b(are)h(just)f(some)g(random)g(though)m(ts)h(of)f(mine.)40 b(Y)-8 b(our)30 b(mileage)h(ma)m(y)g(v)-5 b(ary)d(.)150 884 y Fk(4.1)68 b(Limitations)47 b(of)e(the)g(compressed)g(\014le)h (format)150 1077 y Fj(bzip2-1.0)p Fl(,)e Fj(0.9.5)e Fl(and)g Fj(0.9.0)g Fl(use)h(exactly)h(the)f(same)h(\014le)e(format)i(as)f(the)h (previous)d(v)m(ersion,)150 1186 y Fj(bzip2-0.1)p Fl(.)75 b(This)41 b(decision)g(w)m(as)i(made)g(in)e(the)i(in)m(terests)g(of)g (stabilit)m(y)-8 b(.)77 b(Creating)42 b(y)m(et)i(another)150 1296 y(incompatible)21 b(compressed)i(\014le)f(format)i(w)m(ould)e (create)i(further)e(confusion)g(and)h(disruption)d(for)j(users.)150 1453 y(Nev)m(ertheless,)31 b(this)e(is)g(not)h(a)g(painless)e (decision.)39 b(Dev)m(elopmen)m(t)31 b(w)m(ork)f(since)f(the)h(release) h(of)f Fj(bzip2-)150 1562 y(0.1)19 b Fl(in)g(August)i(1997)h(has)e(sho) m(wn)f(complexities)h(in)f(the)h(\014le)g(format)g(whic)m(h)f(slo)m(w)h (do)m(wn)g(decompression)150 1672 y(and,)30 b(in)f(retrosp)s(ect,)i (are)g(unnecessary)-8 b(.)40 b(These)31 b(are:)225 1829 y Fi(\017)60 b Fl(The)20 b(run-length)g(enco)s(der,)i(whic)m(h)e(is)g (the)h(\014rst)f(of)h(the)g(compression)f(transformations,)i(is)e(en)m (tirely)330 1938 y(irrelev)-5 b(an)m(t.)63 b(The)38 b(original)e(purp)s (ose)g(w)m(as)j(to)g(protect)g(the)f(sorting)g(algorithm)f(from)g(the)i (v)m(ery)330 2048 y(w)m(orst)h(case)h(input:)58 b(a)41 b(string)e(of)h(rep)s(eated)g(sym)m(b)s(ols.)68 b(But)40 b(algorithm)f(steps)h(Q6a)h(and)e(Q6b)330 2157 y(in)30 b(the)i(original)e(Burro)m(ws-Wheeler)i(tec)m(hnical)g(rep)s(ort)f (\(SR)m(C-124\))i(sho)m(w)f(ho)m(w)g(rep)s(eats)g(can)g(b)s(e)330 2267 y(handled)c(without)i(di\016cult)m(y)f(in)g(blo)s(c)m(k)h (sorting.)225 2409 y Fi(\017)60 b Fl(The)30 b(randomisation)e(mec)m (hanism)i(do)s(esn't)g(really)f(need)h(to)g(b)s(e)g(there.)41 b(Udi)29 b(Man)m(b)s(er)h(and)f(Gene)330 2518 y(My)m(ers)j(published)c (a)33 b(su\016x)e(arra)m(y)h(construction)f(algorithm)g(a)h(few)g(y)m (ears)h(bac)m(k,)g(whic)m(h)d(can)j(b)s(e)330 2628 y(emplo)m(y)m(ed)27 b(to)h(sort)g(an)m(y)f(blo)s(c)m(k,)h(no)f(matter)h(ho)m(w)f(rep)s (etitiv)m(e,)h(in)d(O\(N)j(log)f(N\))h(time.)39 b(Subsequen)m(t)330 2737 y(w)m(ork)25 b(b)m(y)f(Kunihik)m(o)f(Sadak)-5 b(ane)24 b(has)h(pro)s(duced)e(a)i(deriv)-5 b(ativ)m(e)24 b(O\(N)h(\(log)g(N\))p Fj(^)p Fl(2\))h(algorithm)d(whic)m(h)330 2847 y(usually)28 b(outp)s(erforms)h(the)i(Man)m(b)s(er-My)m(ers)g(algorithm.)330 2988 y(I)g(could)g(ha)m(v)m(e)i(c)m(hanged)f(to)g(Sadak)-5 b(ane's)32 b(algorithm,)f(but)g(I)g(\014nd)f(it)h(to)h(b)s(e)f(slo)m(w) m(er)h(than)f Fj(bzip2)p Fl('s)330 3098 y(existing)38 b(algorithm)g(for)h(most)h(inputs,)f(and)g(the)g(randomisation)f(mec)m (hanism)g(protects)i(ade-)330 3208 y(quately)34 b(against)f(bad)g (cases.)52 b(I)33 b(didn't)f(think)g(it)i(w)m(as)g(a)g(go)s(o)s(d)f (tradeo\013)i(to)f(mak)m(e.)51 b(P)m(artly)34 b(this)330 3317 y(is)39 b(due)h(to)h(the)f(fact)h(that)g(I)f(w)m(as)g(not)h(\015o) s(o)s(ded)e(with)g(email)g(complain)m(ts)g(ab)s(out)h Fj(bzip2-0.1)p Fl('s)330 3427 y(p)s(erformance)30 b(on)g(rep)s(etitiv)m (e)g(data,)h(so)g(p)s(erhaps)d(it)i(isn't)g(a)h(problem)d(for)j(real)f (inputs.)330 3568 y(Probably)i(the)h(b)s(est)g(long-term)g(solution,)g (and)g(the)g(one)h(I)f(ha)m(v)m(e)h(incorp)s(orated)e(in)m(to)i(0.9.5)h (and)330 3678 y(ab)s(o)m(v)m(e,)42 b(is)c(to)h(use)f(the)h(existing)f (sorting)g(algorithm)f(initially)-8 b(,)38 b(and)g(fall)f(bac)m(k)i(to) h(a)f(O\(N)f(\(log)330 3787 y(N\))p Fj(^)p Fl(2\))31 b(algorithm)f(if)f(the)i(standard)e(algorithm)h(gets)h(in)m(to)f (di\016culties.)225 3929 y Fi(\017)60 b Fl(The)31 b(compressed)f (\014le)g(format)i(w)m(as)f(nev)m(er)h(designed)d(to)j(b)s(e)f(handled) e(b)m(y)i(a)g(library)-8 b(,)29 b(and)i(I)g(ha)m(v)m(e)330 4039 y(had)d(to)i(jump)e(though)g(some)i(ho)s(ops)e(to)i(pro)s(duce)e (an)h(e\016cien)m(t)g(implemen)m(tation)f(of)h(decompres-)330 4148 y(sion.)38 b(It's)26 b(a)h(bit)e(hairy)-8 b(.)38 b(T)-8 b(ry)26 b(passing)f Fj(decompress.c)d Fl(through)k(the)g(C)f (prepro)s(cessor)g(and)h(y)m(ou'll)330 4258 y(see)32 b(what)g(I)f(mean.)45 b(Muc)m(h)32 b(of)g(this)e(complexit)m(y)i(could) f(ha)m(v)m(e)i(b)s(een)e(a)m(v)m(oided)h(if)e(the)i(compressed)330 4367 y(size)e(of)h(eac)m(h)g(blo)s(c)m(k)f(of)h(data)g(w)m(as)g (recorded)f(in)f(the)h(data)h(stream.)225 4509 y Fi(\017)60 b Fl(An)30 b(Adler-32)g(c)m(hec)m(ksum,)i(rather)e(than)g(a)h(CR)m(C32) g(c)m(hec)m(ksum,)g(w)m(ould)e(b)s(e)h(faster)h(to)g(compute.)150 4698 y(It)e(w)m(ould)f(b)s(e)g(fair)g(to)h(sa)m(y)h(that)g(the)f Fj(bzip2)e Fl(format)i(w)m(as)h(frozen)f(b)s(efore)f(I)h(prop)s(erly)d (and)j(fully)d(under-)150 4807 y(sto)s(o)s(d)k(the)h(p)s(erformance)e (consequences)i(of)g(doing)e(so.)150 4964 y(Impro)m(v)m(emen)m(ts)d (whic)m(h)e(I)i(w)m(as)g(able)f(to)h(incorp)s(orate)f(in)m(to)g(0.9.0,) k(despite)24 b(using)g(the)i(same)g(\014le)e(format,)150 5074 y(are:)225 5230 y Fi(\017)60 b Fl(Single)30 b(arra)m(y)i(implemen) m(tation)e(of)h(the)h(in)m(v)m(erse)f(BWT.)h(This)e(signi\014can)m(tly) f(sp)s(eeds)i(up)f(decom-)330 5340 y(pression,)f(presumably)f(b)s (ecause)i(it)g(reduces)g(the)h(n)m(um)m(b)s(er)e(of)i(cac)m(he)h (misses.)p eop %%Page: 32 33 32 32 bop 150 -116 a Fl(Chapter)30 b(4:)41 b(Miscellanea)2586 b(32)225 299 y Fi(\017)60 b Fl(F)-8 b(aster)27 b(in)m(v)m(erse)e(MTF)h (transform)f(for)g(large)h(MTF)f(v)-5 b(alues.)39 b(The)25 b(new)g(implemen)m(tation)f(is)g(based)330 408 y(on)30 b(the)h(notion)f(of)g(sliding)e(blo)s(c)m(ks)h(of)i(v)-5 b(alues.)225 544 y Fi(\017)60 b Fj(bzip2-0.9.0)24 b Fl(no)m(w)k(reads)f (and)f(writes)h(\014les)f(with)g Fj(fread)g Fl(and)h Fj(fwrite)p Fl(;)f(v)m(ersion)h(0.1)i(used)d Fj(putc)330 653 y Fl(and)k Fj(getc)p Fl(.)39 b(Duh!)h(W)-8 b(ell,)31 b(y)m(ou)f(liv)m(e)g(and)g(learn.)150 836 y(F)-8 b(urther)30 b(ahead,)g(it)f(w)m(ould)g(b)s(e)g(nice)h(to)g(b)s(e)g(able)f(to)i(do)e (random)g(access)j(in)m(to)d(\014les.)40 b(This)28 b(will)f(require)150 945 y(some)k(careful)e(design)h(of)g(compressed)g(\014le)g(formats.)150 1227 y Fk(4.2)68 b(P)l(ortabilit)l(y)47 b(issues)150 1419 y Fl(After)36 b(some)g(consideration,)g(I)f(ha)m(v)m(e)i(decided)d (not)i(to)g(use)g(GNU)g Fj(autoconf)d Fl(to)j(con\014gure)g(0.9.5)h(or) 150 1529 y(1.0.)150 1686 y Fj(autoconf)p Fl(,)31 b(admirable)g(and)h(w) m(onderful)f(though)i(it)f(is,)h(mainly)d(assists)j(with)e(p)s (ortabilit)m(y)g(problems)150 1795 y(b)s(et)m(w)m(een)f(Unix-lik)m(e)d (platforms.)40 b(But)29 b Fj(bzip2)f Fl(do)s(esn't)h(ha)m(v)m(e)h(m)m (uc)m(h)f(in)f(the)h(w)m(a)m(y)h(of)g(p)s(ortabilit)m(y)d(prob-)150 1905 y(lems)35 b(on)h(Unix;)j(most)d(of)g(the)h(di\016culties)d(app)s (ear)h(when)g(p)s(orting)g(to)i(the)f(Mac,)j(or)d(to)h(Microsoft's)150 2015 y(op)s(erating)26 b(systems.)40 b Fj(autoconf)25 b Fl(do)s(esn't)h(help)g(in)f(those)j(cases,)h(and)d(brings)f(in)g(a)j (whole)e(load)g(of)h(new)150 2124 y(complexit)m(y)-8 b(.)150 2281 y(Most)28 b(p)s(eople)f(should)f(b)s(e)h(able)g(to)h (compile)e(the)i(library)d(and)i(program)h(under)e(Unix)g(straigh)m(t)i (out-of-)150 2391 y(the-b)s(o)m(x,)j(so)g(to)g(sp)s(eak,)f(esp)s (ecially)f(if)g(y)m(ou)i(ha)m(v)m(e)g(a)g(v)m(ersion)f(of)g(GNU)h(C)f (a)m(v)-5 b(ailable.)150 2547 y(There)32 b(are)h(a)g(couple)f(of)h Fj(__inline__)d Fl(directiv)m(es)i(in)f(the)i(co)s(de.)48 b(GNU)33 b(C)f(\()p Fj(gcc)p Fl(\))g(should)f(b)s(e)h(able)g(to)150 2657 y(handle)24 b(them.)39 b(If)25 b(y)m(ou're)i(not)e(using)g(GNU)h (C,)f(y)m(our)h(C)f(compiler)f(shouldn't)g(see)i(them)f(at)i(all.)38 b(If)25 b(y)m(our)150 2767 y(compiler)k(do)s(es,)i(for)g(some)g (reason,)h(see)f(them)g(and)f(do)s(esn't)h(lik)m(e)f(them,)i(just)e Fj(#define)f(__inline__)150 2876 y Fl(to)37 b(b)s(e)f Fj(/*)30 b(*/)p Fl(.)58 b(One)36 b(easy)h(w)m(a)m(y)g(to)h(do)e(this)f (is)h(to)h(compile)e(with)g(the)i(\015ag)g Fj(-D__inline__=)p Fl(,)d(whic)m(h)150 2986 y(should)28 b(b)s(e)i(understo)s(o)s(d)f(b)m (y)h(most)h(Unix)e(compilers.)150 3143 y(If)35 b(y)m(ou)g(still)e(ha)m (v)m(e)j(di\016culties,)e(try)h(compiling)e(with)g(the)j(macro)f Fj(BZ_STRICT_ANSI)c Fl(de\014ned.)54 b(This)150 3252 y(should)28 b(enable)i(y)m(ou)h(to)g(build)d(the)i(library)e(in)h(a)i (strictly)f(ANSI)g(complian)m(t)f(en)m(vironmen)m(t.)41 b(Building)150 3362 y(the)25 b(program)f(itself)f(lik)m(e)g(this)h(is)f (dangerous)h(and)g(not)g(supp)s(orted,)g(since)g(y)m(ou)h(remo)m(v)m(e) g Fj(bzip2)p Fl('s)e(c)m(hec)m(ks)150 3471 y(against)30 b(compressing)f(directories,)g(sym)m(b)s(olic)g(links,)f(devices,)i (and)f(other)h(not-really-a-\014le)g(en)m(tities.)150 3581 y(This)f(could)g(cause)i(\014lesystem)f(corruption!)150 3738 y(One)e(other)i(thing:)39 b(if)27 b(y)m(ou)j(create)g(a)f Fj(bzip2)f Fl(binary)f(for)i(public)d(distribution,)g(please)i(try)h (and)g(link)d(it)150 3847 y(statically)g(\()p Fj(gcc)k(-s)p Fl(\).)39 b(This)25 b(a)m(v)m(oids)i(all)f(sorts)h(of)g(library-v)m (ersion)d(issues)h(that)i(others)g(ma)m(y)g(encoun)m(ter)150 3957 y(later)j(on.)150 4114 y(If)f(y)m(ou)g(build)e Fj(bzip2)h Fl(on)h(Win32,)h(y)m(ou)f(m)m(ust)g(set)h Fj(BZ_UNIX)e Fl(to)i(0)f(and)g Fj(BZ_LCCWIN32)d Fl(to)k(1,)g(in)e(the)i(\014le)150 4223 y Fj(bzip2.c)p Fl(,)f(b)s(efore)h(compiling.)38 b(Otherwise)29 b(the)i(resulting)d(binary)h(w)m(on't)i(w)m(ork)f (correctly)-8 b(.)150 4505 y Fk(4.3)68 b(Rep)t(orting)46 b(bugs)150 4698 y Fl(I)25 b(tried)f(prett)m(y)i(hard)e(to)i(mak)m(e)g (sure)f Fj(bzip2)e Fl(is)i(bug)f(free,)j(b)s(oth)d(b)m(y)h(design)f (and)h(b)m(y)g(testing.)39 b(Hop)s(efully)150 4807 y(y)m(ou'll)29 b(nev)m(er)i(need)f(to)h(read)g(this)e(section)h(for)h(real.)150 4964 y(Nev)m(ertheless,)36 b(if)c Fj(bzip2)h Fl(dies)g(with)f(a)i (segmen)m(tation)h(fault,)g(a)f(bus)f(error)g(or)h(an)g(in)m(ternal)e (assertion)150 5074 y(failure,)i(it)h(will)d(ask)j(y)m(ou)g(to)g(email) f(me)h(a)g(bug)f(rep)s(ort.)54 b(Exp)s(erience)33 b(with)h(v)m(ersion)g (0.1)i(sho)m(ws)e(that)150 5183 y(almost)c(all)g(these)h(problems)d (can)j(b)s(e)f(traced)h(to)g(either)f(compiler)e(bugs)i(or)g(hardw)m (are)g(problems.)225 5340 y Fi(\017)60 b Fl(Recompile)22 b(the)h(program)g(with)f(no)h(optimisation,)g(and)f(see)i(if)e(it)g(w)m (orks.)39 b(And/or)22 b(try)h(a)g(di\013eren)m(t)p eop %%Page: 33 34 33 33 bop 150 -116 a Fl(Chapter)30 b(4:)41 b(Miscellanea)2586 b(33)330 299 y(compiler.)77 b(I)43 b(heard)f(all)g(sorts)h(of)h (stories)e(ab)s(out)h(v)-5 b(arious)42 b(\015a)m(v)m(ours)h(of)h(GNU)f (C)g(\(and)g(other)330 408 y(compilers\))20 b(generating)i(bad)e(co)s (de)i(for)f Fj(bzip2)p Fl(,)h(and)f(I'v)m(e)h(run)e(across)i(t)m(w)m(o) g(suc)m(h)f(examples)g(m)m(yself.)330 606 y(2.7.X)35 b(v)m(ersions)e(of)g(GNU)h(C)f(are)h(kno)m(wn)f(to)h(generate)h(bad)d (co)s(de)i(from)f(time)g(to)h(time,)g(at)g(high)330 716 y(optimisation)20 b(lev)m(els.)37 b(If)21 b(y)m(ou)g(get)i(problems,)e (try)g(using)f(the)i(\015ags)f Fj(-O2)f(-fomit-frame-pointer)330 825 y(-fno-strength-reduce)p Fl(.)35 b(Y)-8 b(ou)31 b(should)d(sp)s (eci\014cally)h Fc(not)j Fl(use)e Fj(-funroll-loops)p Fl(.)330 1023 y(Y)-8 b(ou)38 b(ma)m(y)g(notice)g(that)g(the)g(Mak)m (e\014le)g(runs)e(six)g(tests)i(as)g(part)f(of)h(the)g(build)c(pro)s (cess.)62 b(If)37 b(the)330 1132 y(program)43 b(passes)g(all)f(of)h (these,)k(it's)c(a)h(prett)m(y)f(go)s(o)s(d)g(\(but)g(not)g(100\045\))i (indication)c(that)j(the)330 1242 y(compiler)29 b(has)h(done)g(its)g (job)g(correctly)-8 b(.)225 1440 y Fi(\017)60 b Fl(If)33 b Fj(bzip2)f Fl(crashes)i(randomly)-8 b(,)33 b(and)g(the)h(crashes)g (are)g(not)g(rep)s(eatable,)g(y)m(ou)g(ma)m(y)g(ha)m(v)m(e)h(a)f (\015aky)330 1549 y(memory)k(subsystem.)64 b Fj(bzip2)37 b Fl(really)g(hammers)h(y)m(our)g(memory)g(hierarc)m(h)m(y)-8 b(,)41 b(and)d(if)f(it's)h(a)h(bit)330 1659 y(marginal,)33 b(y)m(ou)h(ma)m(y)g(get)h(these)f(problems.)49 b(Ditto)34 b(if)f(y)m(our)h(disk)e(or)h(I/O)h(subsystem)e(is)h(slo)m(wly)330 1768 y(failing.)39 b(Y)-8 b(up,)30 b(this)f(really)g(do)s(es)h(happ)s (en.)330 1966 y(T)-8 b(ry)28 b(using)f(a)i(di\013eren)m(t)f(mac)m(hine) g(of)h(the)g(same)f(t)m(yp)s(e,)i(and)e(see)h(if)e(y)m(ou)i(can)g(rep)s (eat)g(the)f(problem.)225 2163 y Fi(\017)60 b Fl(This)21 b(isn't)i(really)f(a)h(bug,)i(but)d(...)39 b(If)23 b Fj(bzip2)f Fl(tells)g(y)m(ou)h(y)m(our)h(\014le)e(is)g(corrupted)h(on)g (decompression,)330 2273 y(and)29 b(y)m(ou)g(obtained)f(the)i(\014le)e (via)h(FTP)-8 b(,)29 b(there)h(is)e(a)h(p)s(ossibilit)m(y)d(that)k(y)m (ou)f(forgot)h(to)g(tell)e(FTP)h(to)330 2383 y(do)23 b(a)g(binary)e(mo)s(de)i(transfer.)38 b(That)23 b(absolutely)f(will)e (cause)j(the)h(\014le)e(to)h(b)s(e)g(non-decompressible.)330 2492 y(Y)-8 b(ou'll)30 b(ha)m(v)m(e)h(to)g(transfer)f(it)g(again.)150 2737 y(If)i(y)m(ou'v)m(e)h(incorp)s(orated)e Fj(libbzip2)f Fl(in)m(to)i(y)m(our)g(o)m(wn)g(program)g(and)g(are)g(getting)h (problems,)e(please,)150 2847 y(please,)d(please,)h(c)m(hec)m(k)g(that) f(the)g(parameters)g(y)m(ou)g(are)g(passing)f(in)f(calls)h(to)h(the)g (library)-8 b(,)26 b(are)j(correct,)150 2956 y(and)e(in)f(accordance)k (with)c(what)i(the)g(do)s(cumen)m(tation)f(sa)m(ys)h(is)f(allo)m(w)m (able.)39 b(I)28 b(ha)m(v)m(e)h(tried)e(to)h(mak)m(e)h(the)150 3066 y(library)f(robust)i(against)g(suc)m(h)g(problems,)f(but)h(I'm)g (sure)g(I)g(ha)m(v)m(en't)h(succeeded.)150 3223 y(Finally)-8 b(,)32 b(if)g(the)h(ab)s(o)m(v)m(e)i(commen)m(ts)e(don't)g(help,)g(y)m (ou'll)f(ha)m(v)m(e)i(to)g(send)e(me)h(a)g(bug)g(rep)s(ort.)48 b(No)m(w,)34 b(it's)150 3332 y(just)c(amazing)g(ho)m(w)h(man)m(y)f(p)s (eople)g(will)d(send)j(me)g(a)h(bug)f(rep)s(ort)g(sa)m(ying)g (something)g(lik)m(e)481 3483 y(bzip2)f(crashed)h(with)f(segmen)m (tation)j(fault)e(on)g(m)m(y)g(mac)m(hine)150 3640 y(and)h(absolutely)f (nothing)h(else.)44 b(Needless)32 b(to)g(sa)m(y)-8 b(,)33 b(a)f(suc)m(h)f(a)h(rep)s(ort)f(is)g Fc(totally)-8 b(,)32 b(utterly)-8 b(,)32 b(completely)150 3750 y(and)40 b(comprehensiv)m (ely)g(100\045)h(useless;)46 b(a)41 b(w)m(aste)g(of)g(y)m(our)g(time,)i (m)m(y)e(time,)i(and)e(net)g(bandwidth)p Fl(.)150 3859 y(With)31 b(no)h(details)f(at)i(all,)e(there's)h(no)g(w)m(a)m(y)h(I)f (can)g(p)s(ossibly)d(b)s(egin)h(to)j(\014gure)e(out)i(what)e(the)i (problem)150 3969 y(is.)150 4126 y(The)d(rules)e(of)i(the)g(game)h (are:)41 b(facts,)32 b(facts,)f(facts.)41 b(Don't)31 b(omit)f(them)g(b)s(ecause)g Fj(")p Fl(oh,)g(they)g(w)m(on't)h(b)s(e) 150 4235 y(relev)-5 b(an)m(t)p Fj(")p Fl(.)41 b(A)m(t)31 b(the)g(bare)f(minim)m(um:)481 4386 y(Mac)m(hine)h(t)m(yp)s(e.)61 b(Op)s(erating)29 b(system)h(v)m(ersion.)481 4490 y(Exact)h(v)m(ersion) f(of)h Fj(bzip2)e Fl(\(do)h Fj(bzip2)47 b(-V)p Fl(\).)481 4594 y(Exact)31 b(v)m(ersion)f(of)h(the)f(compiler)f(used.)481 4698 y(Flags)i(passed)e(to)j(the)e(compiler.)150 4854 y(Ho)m(w)m(ev)m(er,)i(the)d(most)h(imp)s(ortan)m(t)f(single)f(thing)g (that)i(will)d(help)h(me)h(is)f(the)i(\014le)e(that)i(y)m(ou)g(w)m(ere) g(trying)150 4964 y(to)f(compress)f(or)g(decompress)g(at)h(the)f(time)g (the)g(problem)f(happ)s(ened.)38 b(Without)28 b(that,)h(m)m(y)g(abilit) m(y)d(to)150 5074 y(do)k(an)m(ything)g(more)h(than)f(sp)s(eculate)g(ab) s(out)g(the)g(cause,)i(is)d(limited.)150 5230 y(Please)34 b(remem)m(b)s(er)f(that)h(I)f(connect)i(to)f(the)g(In)m(ternet)g(with)e (a)i(mo)s(dem,)g(so)f(y)m(ou)h(should)e(con)m(tact)k(me)150 5340 y(b)s(efore)30 b(mailing)e(me)j(h)m(uge)f(\014les.)p eop %%Page: 34 35 34 34 bop 150 -116 a Fl(Chapter)30 b(4:)41 b(Miscellanea)2586 b(34)150 299 y Fk(4.4)68 b(Did)45 b(y)l(ou)g(get)h(the)f(righ)l(t)h (pac)l(k)-7 b(age?)150 491 y Fj(bzip2)34 b Fl(is)h(a)h(resource)g(hog.) 56 b(It)36 b(soaks)g(up)f(large)g(amoun)m(ts)h(of)g(CPU)f(cycles)h(and) f(memory)-8 b(.)57 b(Also,)36 b(it)150 601 y(giv)m(es)26 b(v)m(ery)h(large)f(latencies.)39 b(In)25 b(the)h(w)m(orst)g(case,)i(y) m(ou)f(can)f(feed)g(man)m(y)g(megab)m(ytes)h(of)f(uncompressed)150 711 y(data)45 b(in)m(to)e(the)i(library)c(b)s(efore)j(getting)g(an)m(y) g(compressed)g(output,)j(so)d(this)f(probably)f(rules)h(out)150 820 y(applications)29 b(requiring)e(in)m(teractiv)m(e)32 b(b)s(eha)m(viour.)150 977 y(These)38 b(aren't)h(faults)e(of)h(m)m(y)g (implemen)m(tation,)h(I)f(hop)s(e,)i(but)d(more)h(an)g(in)m(trinsic)e (prop)s(ert)m(y)h(of)i(the)150 1087 y(Burro)m(ws-Wheeler)30 b(transform)g(\(unfortunately\).)40 b(Ma)m(yb)s(e)31 b(this)e(isn't)h(what)g(y)m(ou)h(w)m(an)m(t.)150 1244 y(If)h(y)m(ou)h(w)m(an)m(t)g(a)g(compressor)g(and/or)f(library)e(whic)m (h)h(is)h(faster,)i(uses)e(less)g(memory)g(but)g(gets)h(prett)m(y)150 1353 y(go)s(o)s(d)e(compression,)g(and)g(has)h(minimal)c(latency)-8 b(,)33 b(consider)e(Jean-loup)f(Gailly's)g(and)h(Mark)h(Adler's)150 1463 y(w)m(ork,)f Fj(zlib-1.1.2)c Fl(and)j Fj(gzip-1.2.4)p Fl(.)38 b(Lo)s(ok)31 b(for)f(them)g(at)150 1620 y Fj (http://www.cdrom.com/pub)o(/inf)o(ozip)o(/zl)o(ib)24 b Fl(and)30 b Fj(http://www.gzip.org)25 b Fl(resp)s(ectiv)m(ely)-8 b(.)150 1776 y(F)g(or)32 b(something)f(faster)i(and)e(ligh)m(ter)f (still,)h(y)m(ou)g(migh)m(t)h(try)f(Markus)h(F)g(X)f(J)h(Ob)s(erh)m (umer's)d Fj(LZO)i Fl(real-)150 1886 y(time)f (compression/decompression)f(library)-8 b(,)28 b(at)150 1996 y Fj(http://wildsau.idv.uni-l)o(inz.)o(ac.a)o(t/m)o(fx/l)o(zo.h)o (tml)o Fl(.)150 2152 y(If)38 b(y)m(ou)h(w)m(an)m(t)g(to)h(use)e(the)g Fj(bzip2)g Fl(algorithms)f(to)i(compress)f(small)g(blo)s(c)m(ks)f(of)i (data,)j(64k)d(b)m(ytes)g(or)150 2262 y(smaller,)i(for)e(example)g(on)h (an)f(on-the-\015y)h(disk)e(compressor,)k(y)m(ou'd)e(b)s(e)f(w)m(ell)g (advised)f(not)i(to)g(use)150 2372 y(this)i(library)-8 b(.)77 b(Instead,)47 b(I'v)m(e)d(made)f(a)h(sp)s(ecial)e(library)f (tuned)h(for)h(that)h(kind)d(of)j(use.)79 b(It's)43 b(part)150 2481 y(of)d Fj(e2compr-0.40)p Fl(,)f(an)g(on-the-\015y)h(disk)e (compressor)h(for)h(the)f(Lin)m(ux)f Fj(ext2)h Fl(\014lesystem.)67 b(Lo)s(ok)40 b(at)150 2591 y Fj(http://www.netspace.net.)o(au/~)o(reit) o(er/)o(e2co)o(mpr)p Fl(.)150 2880 y Fk(4.5)68 b(T)-11 b(esting)150 3072 y Fl(A)30 b(record)h(of)f(the)h(tests)g(I'v)m(e)g (done.)150 3229 y(First,)f(some)h(data)g(sets:)225 3386 y Fi(\017)60 b Fl(B:)32 b(a)f(directory)f(con)m(taining)h(6001)i (\014les,)d(one)h(for)g(ev)m(ery)h(length)e(in)g(the)h(range)g(0)h(to)f (6000)i(b)m(ytes.)330 3496 y(The)d(\014les)f(con)m(tain)i(random)e(lo)m (w)m(ercase)j(letters.)41 b(18.7)32 b(megab)m(ytes.)225 3633 y Fi(\017)60 b Fl(H:)36 b(m)m(y)f(home)h(directory)f(tree.)56 b(Do)s(cumen)m(ts,)38 b(source)d(co)s(de,)i(mail)d(\014les,)i (compressed)f(data.)57 b(H)330 3743 y(con)m(tains)39 b(B,)h(and)f(also)g(a)g(directory)g(of)g(\014les)f(designed)g(as)i(b)s (oundary)d(cases)j(for)f(the)g(sorting;)330 3853 y(mostly)30 b(v)m(ery)h(rep)s(etitiv)m(e,)f(nast)m(y)h(\014les.)39 b(565)32 b(megab)m(ytes.)225 3990 y Fi(\017)60 b Fl(A:)43 b(directory)f(tree)i(holding)d(v)-5 b(arious)41 b(applications)g(built) g(from)h(source:)66 b Fj(egcs)p Fl(,)45 b Fj(gcc-2.8.1)p Fl(,)330 4100 y(KDE,)31 b(GTK,)f(Octa)m(v)m(e,)j(etc.)41 b(2200)33 b(megab)m(ytes.)150 4285 y(The)i(tests)g(conducted)g(are)h (as)f(follo)m(ws.)54 b(Eac)m(h)36 b(test)g(means)f(compressing)f(\(a)h (cop)m(y)h(of)7 b(\))36 b(eac)m(h)g(\014le)e(in)150 4394 y(the)d(data)g(set,)g(decompressing)e(it)h(and)g(comparing)f(it)h (against)h(the)g(original.)150 4551 y(First,)26 b(a)g(bunc)m(h)f(of)h (tests)h(with)d(blo)s(c)m(k)h(sizes)h(and)f(in)m(ternal)g(bu\013er)f (sizes)i(set)g(v)m(ery)g(small,)g(to)g(detect)i(an)m(y)150 4661 y(problems)g(with)g(the)i(blo)s(c)m(king)f(and)g(bu\013ering)e (mec)m(hanisms.)40 b(This)28 b(required)g(mo)s(difying)f(the)j(source) 150 4770 y(co)s(de)h(so)f(as)h(to)g(try)f(to)h(break)g(it.)199 4927 y(1.)61 b(Data)32 b(set)f(H,)g(with)e(bu\013er)g(size)h(of)h(1)g (b)m(yte,)g(and)f(blo)s(c)m(k)g(size)g(of)g(23)i(b)m(ytes.)199 5065 y(2.)61 b(Data)32 b(set)f(B,)g(bu\013er)e(sizes)h(1)h(b)m(yte,)g (blo)s(c)m(k)f(size)g(1)h(b)m(yte.)199 5202 y(3.)61 b(As)30 b(\(2\))i(but)d(small-mo)s(de)g(decompression.)199 5340 y(4.)61 b(As)30 b(\(2\))i(with)d(blo)s(c)m(k)h(size)g(2)h(b)m(ytes.)p eop %%Page: 35 36 35 35 bop 150 -116 a Fl(Chapter)30 b(4:)41 b(Miscellanea)2586 b(35)199 299 y(5.)61 b(As)30 b(\(2\))i(with)d(blo)s(c)m(k)h(size)g(3)h (b)m(ytes.)199 431 y(6.)61 b(As)30 b(\(2\))i(with)d(blo)s(c)m(k)h(size) g(4)h(b)m(ytes.)199 564 y(7.)61 b(As)30 b(\(2\))i(with)d(blo)s(c)m(k)h (size)g(5)h(b)m(ytes.)199 697 y(8.)61 b(As)30 b(\(2\))i(with)d(blo)s(c) m(k)h(size)g(6)h(b)m(ytes)g(and)e(small-mo)s(de)g(decompression.)199 829 y(9.)61 b(H)30 b(with)g(bu\013er)f(size)h(of)h(1)f(b)m(yte,)i(but)d (normal)h(blo)s(c)m(k)g(size)g(\(up)f(to)j(900000)h(b)m(ytes\).)150 1009 y(Then)c(some)i(tests)g(with)e(unmo)s(di\014ed)f(source)i(co)s (de.)199 1166 y(1.)61 b(H,)31 b(all)e(settings)h(normal.)199 1299 y(2.)61 b(As)30 b(\(1\),)i(with)d(small-mo)s(de)g(decompress.)199 1431 y(3.)61 b(H,)31 b(compress)f(with)f(\015ag)i Fj(-1)p Fl(.)199 1564 y(4.)61 b(H,)31 b(compress)f(with)f(\015ag)i Fj(-s)p Fl(,)f(decompress)g(with)f(\015ag)i Fj(-s)p Fl(.)199 1697 y(5.)61 b(F)-8 b(orw)m(ards)33 b(compatibilit)m(y:)45 b(H,)33 b Fj(bzip2-0.1pl2)d Fl(compressing,)j Fj(bzip2-0.9.5)d Fl(decompressing,)330 1806 y(all)f(settings)i(normal.)199 1939 y(6.)61 b(Bac)m(kw)m(ards)23 b(compatibilit)m(y:)35 b(H,)23 b Fj(bzip2-0.9.5)c Fl(compressing,)k Fj(bzip2-0.1pl2)c Fl(decompressing,)330 2048 y(all)29 b(settings)i(normal.)199 2181 y(7.)61 b(Bigger)31 b(tests:)41 b(A,)31 b(all)e(settings)i (normal.)199 2314 y(8.)61 b(As)30 b(\(7\),)i(using)d(the)i(fallbac)m(k) e(\(Sadak)-5 b(ane-lik)m(e\))31 b(sorting)f(algorithm.)199 2446 y(9.)61 b(As)30 b(\(8\),)i(compress)e(with)f(\015ag)i Fj(-1)p Fl(,)f(decompress)g(with)f(\015ag)i Fj(-s)p Fl(.)154 2579 y(10.)61 b(H,)31 b(using)e(the)h(fallbac)m(k)g(sorting)g (algorithm.)154 2711 y(11.)61 b(F)-8 b(orw)m(ards)33 b(compatibilit)m(y:)45 b(A,)33 b Fj(bzip2-0.1pl2)d Fl(compressing,)j Fj(bzip2-0.9.5)d Fl(decompressing,)330 2821 y(all)f(settings)i(normal.) 154 2954 y(12.)61 b(Bac)m(kw)m(ards)23 b(compatibilit)m(y:)35 b(A,)23 b Fj(bzip2-0.9.5)c Fl(compressing,)k Fj(bzip2-0.1pl2)c Fl(decompressing,)330 3063 y(all)29 b(settings)i(normal.)154 3196 y(13.)61 b(Misc)39 b(test:)58 b(ab)s(out)39 b(400)h(megab)m(ytes)h (of)e Fj(.tar)f Fl(\014les)f(with)h Fj(bzip2)f Fl(compiled)h(with)f (Chec)m(k)m(er)j(\(a)330 3305 y(memory)30 b(access)i(error)e(detector,) i(lik)m(e)e(Purify\).)154 3438 y(14.)61 b(Misc)30 b(tests)h(to)g(mak)m (e)h(sure)d(it)h(builds)e(and)h(runs)g(ok)i(on)f(non-Lin)m(ux/x86)g (platforms.)150 3618 y(These)35 b(tests)h(w)m(ere)f(conducted)g(on)g(a) h(225)g(MHz)g(IDT)f(WinChip)d(mac)m(hine,)k(running)d(Lin)m(ux)g (2.0.36.)150 3728 y(They)d(represen)m(t)g(nearly)g(a)h(w)m(eek)g(of)f (con)m(tin)m(uous)g(computation.)41 b(All)29 b(tests)i(completed)f (successfully)-8 b(.)150 4003 y Fk(4.6)68 b(F)-11 b(urther)44 b(reading)150 4196 y Fj(bzip2)28 b Fl(is)h(not)h(researc)m(h)g(w)m (ork,)g(in)e(the)i(sense)g(that)g(it)f(do)s(esn't)g(presen)m(t)h(an)m (y)g(new)f(ideas.)40 b(Rather,)30 b(it's)150 4306 y(an)g(engineering)f (exercise)i(based)f(on)g(existing)g(ideas.)150 4463 y(F)-8 b(our)31 b(do)s(cumen)m(ts)f(describ)s(e)e(essen)m(tially)i(all)f(the)i (ideas)e(b)s(ehind)f Fj(bzip2)p Fl(:)390 4614 y Fj(Michael)46 b(Burrows)g(and)h(D.)g(J.)g(Wheeler:)485 4717 y("A)h(block-sorting)c (lossless)h(data)i(compression)e(algorithm")533 4821 y(10th)i(May)g(1994.)533 4925 y(Digital)f(SRC)h(Research)e(Report)i (124.)533 5029 y(ftp://ftp.digital.com/pub)o(/DEC)o(/SR)o(C/re)o(sear)o (ch-)o(repo)o(rts/)o(SRC)o(-124)o(.ps.)o(gz)533 5132 y(If)g(you)g(have)g(trouble)f(finding)g(it,)g(try)h(searching)f(at)h (the)533 5236 y(New)g(Zealand)f(Digital)g(Library,)f (http://www.nzdl.org.)p eop %%Page: 36 37 36 36 bop 150 -116 a Fl(Chapter)30 b(4:)41 b(Miscellanea)2586 b(36)390 299 y Fj(Daniel)46 b(S.)h(Hirschberg)e(and)i(Debra)g(A.)g (LeLewer)485 403 y("Efficient)e(Decoding)h(of)h(Prefix)f(Codes")533 506 y(Communications)e(of)j(the)g(ACM,)g(April)f(1990,)h(Vol)f(33,)h (Number)f(4.)533 610 y(You)h(might)f(be)i(able)e(to)h(get)g(an)h (electronic)d(copy)h(of)h(this)676 714 y(from)g(the)g(ACM)g(Digital)f (Library.)390 922 y(David)g(J.)i(Wheeler)533 1025 y(Program)e(bred3.c)g (and)h(accompanying)d(document)i(bred3.ps.)533 1129 y(This)h(contains)e (the)i(idea)g(behind)f(the)h(multi-table)e(Huffman)533 1233 y(coding)h(scheme.)533 1337 y(ftp://ftp.cl.cam.ac.uk/us)o(ers/)o (djw)o(3/)390 1544 y(Jon)h(L.)g(Bentley)f(and)h(Robert)f(Sedgewick)485 1648 y("Fast)h(Algorithms)e(for)i(Sorting)f(and)g(Searching)g(Strings") 533 1752 y(Available)f(from)i(Sedgewick's)e(web)i(page,)533 1856 y(www.cs.princeton.edu/~rs)150 2012 y Fl(The)29 b(follo)m(wing)f(pap)s(er)g(giv)m(es)h(v)-5 b(aluable)28 b(additional)g(insigh)m(ts)f(in)m(to)j(the)f(algorithm,)g(but)g(is)f (not)i(imme-)150 2122 y(diately)g(the)g(basis)f(of)i(an)m(y)g(co)s(de)f (used)g(in)f(bzip2.)390 2273 y Fj(Peter)46 b(Fenwick:)533 2377 y(Block)h(Sorting)e(Text)i(Compression)533 2481 y(Proceedings)e(of)i(the)g(19th)g(Australasian)d(Computer)i(Science)f (Conference,)629 2584 y(Melbourne,)g(Australia.)92 b(Jan)47 b(31)g(-)h(Feb)f(2,)g(1996.)533 2688 y(ftp://ftp.cs.auckland.ac.)o (nz/p)o(ub/)o(pete)o(r-f/)o(ACS)o(C96p)o(aper)o(.ps)150 2845 y Fl(Kunihik)m(o)28 b(Sadak)-5 b(ane's)31 b(sorting)e(algorithm,)h (men)m(tioned)g(ab)s(o)m(v)m(e,)i(is)d(a)m(v)-5 b(ailable)30 b(from:)390 2996 y Fj(http://naomi.is.s.u-toky)o(o.ac)o(.jp/)o(~sa)o (da/p)o(aper)o(s/S)o(ada9)o(8b.p)o(s.g)o(z)150 3153 y Fl(The)41 b(Man)m(b)s(er-My)m(ers)g(su\016x)g(arra)m(y)g(construction)g (algorithm)f(is)g(describ)s(ed)f(in)h(a)i(pap)s(er)e(a)m(v)-5 b(ailable)150 3262 y(from:)390 3413 y Fj(http://www.cs.arizona.ed)o (u/pe)o(ople)o(/ge)o(ne/P)o(APER)o(S/s)o(uffi)o(x.ps)150 3570 y Fl(Finally)d(,)33 b(the)h(follo)m(wing)e(pap)s(er)h(do)s(cumen)m (ts)g(some)h(recen)m(t)h(in)m(v)m(estigations)e(I)h(made)f(in)m(to)h (the)g(p)s(erfor-)150 3680 y(mance)d(of)f(sorting)g(algorithms:)390 3831 y Fj(Julian)46 b(Seward:)533 3935 y(On)h(the)g(Performance)e(of)i (BWT)g(Sorting)f(Algorithms)533 4038 y(Proceedings)f(of)i(the)g(IEEE)g (Data)f(Compression)f(Conference)g(2000)629 4142 y(Snowbird,)g(Utah.)94 b(28-30)46 b(March)h(2000.)p eop %%Page: -1 38 -1 37 bop 3725 -116 a Fl(i)150 299 y Fh(T)-13 b(able)54 b(of)g(Con)l(ten)l(ts)150 641 y Fk(1)135 b(In)l(tro)t(duction)15 b Fb(.)20 b(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f (.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)60 b Fk(2)150 911 y(2)135 b(Ho)l(w)45 b(to)h(use)f Fd(bzip2)31 b Fb(.)19 b(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g (.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)78 b Fk(3)1047 1048 y Fl(NAME)20 b Fa(.)c(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)50 b Fl(3)1047 1157 y(SYNOPSIS)21 b Fa(.)13 b(.)i(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)50 b Fl(3)1047 1267 y(DESCRIPTION)10 b Fa(.)j(.)i(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)40 b Fl(3)1047 1377 y(OPTIONS)16 b Fa(.)d(.)i(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)45 b Fl(4)1047 1486 y(MEMOR)-8 b(Y)31 b(MANA)m(GEMENT)14 b Fa(.)j(.)e(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)44 b Fl(6)1047 1596 y(RECO)m(VERING)30 b(D)m(A)-8 b(T)g(A)32 b(FR)m(OM)f(D)m(AMA)m(GED)i(FILES)1256 1705 y Fa(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)g(.)57 b Fl(7)1047 1815 y(PERF)m(ORMANCE)30 b(NOTES)9 b Fa(.)14 b(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)38 b Fl(7)1047 1924 y(CA)-10 b(VEA)i(TS)10 b Fa(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)40 b Fl(8)1047 2034 y(A)m(UTHOR)23 b Fa(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)g(.)g(.)53 b Fl(8)150 2276 y Fk(3)135 b(Programming)46 b(with)f Fd(libbzip2)29 b Fb(.)16 b(.)j(.)h(.)f(.)h(.) f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)74 b Fk(9)449 2413 y Fl(3.1)92 b(T)-8 b(op-lev)m(el)30 b(structure)24 b Fa(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)54 b Fl(9)748 2523 y(3.1.1)93 b(Lo)m(w-lev)m(el)30 b(summary)23 b Fa(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)53 b Fl(9)748 2633 y(3.1.2)93 b(High-lev)m(el)29 b(summary)12 b Fa(.)i(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)41 b Fl(9)748 2742 y(3.1.3)93 b(Utilit)m(y)29 b(functions)g(summary)12 b Fa(.)h(.)j(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)41 b Fl(10)449 2852 y(3.2)92 b(Error)29 b(handling)18 b Fa(.)13 b(.)i(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)48 b Fl(10)449 2961 y(3.3)92 b(Lo)m(w-lev)m(el)31 b(in)m(terface)d Fa(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)57 b Fl(12)748 3071 y(3.3.1)93 b Fj(BZ2_bzCompressInit)21 b Fa(.)9 b(.)15 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)50 b Fl(12)748 3181 y(3.3.2)93 b Fj(BZ2_bzCompress)9 b Fa(.)h(.)15 b(.)g(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)g(.)g(.)38 b Fl(14)748 3290 y(3.3.3)93 b Fj(BZ2_bzCompressEnd)23 b Fa(.)10 b(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g (.)52 b Fl(17)748 3400 y(3.3.4)93 b Fj(BZ2_bzDecompressInit)16 b Fa(.)9 b(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)45 b Fl(17)748 3509 y(3.3.5)93 b Fj(BZ2_bzDecompress)21 b Fa(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)55 b Fl(17)748 3619 y(3.3.6)93 b Fj(BZ2_bzDecompressEnd)18 b Fa(.)10 b(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)48 b Fl(19)449 3729 y(3.4)92 b(High-lev)m(el)30 b(in)m(terface)16 b Fa(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)45 b Fl(19)748 3838 y(3.4.1)93 b Fj(BZ2_bzReadOpen)9 b Fa(.)h(.)15 b(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)38 b Fl(19)748 3948 y(3.4.2)93 b Fj(BZ2_bzRead)18 b Fa(.)12 b(.)j(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)47 b Fl(20)748 4057 y(3.4.3)93 b Fj(BZ2_bzReadGetUnused)18 b Fa(.)10 b(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)48 b Fl(22)748 4167 y(3.4.4)93 b Fj(BZ2_bzReadClose)23 b Fa(.)15 b(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)57 b Fl(22)748 4276 y(3.4.5)93 b Fj(BZ2_bzWriteOpen)23 b Fa(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)57 b Fl(22)748 4386 y(3.4.6)93 b Fj(BZ2_bzWrite)16 b Fa(.)11 b(.)k(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) 45 b Fl(23)748 4496 y(3.4.7)93 b Fj(BZ2_bzWriteClose)21 b Fa(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)55 b Fl(23)748 4605 y(3.4.8)93 b(Handling)28 b(em)m(b)s(edded)h(compressed)h(data)h (streams)17 b Fa(.)f(.)f(.)g(.)46 b Fl(24)748 4715 y(3.4.9)93 b(Standard)29 b(\014le-reading/writing)e(co)s(de)22 b Fa(.)16 b(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)52 b Fl(25)449 4824 y(3.5)92 b(Utilit)m(y)29 b(functions)f Fa(.)15 b(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)59 b Fl(26)748 4934 y(3.5.1)93 b Fj(BZ2_bzBuffToBuffCompres)o(s)22 b Fa(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)57 b Fl(26)748 5044 y(3.5.2)93 b Fj(BZ2_bzBuffToBuffDecompr)o(ess)17 b Fa(.)e(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) 53 b Fl(27)449 5153 y(3.6)92 b Fj(zlib)29 b Fl(compatibilit)m(y)g (functions)23 b Fa(.)13 b(.)i(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)52 b Fl(28)449 5263 y(3.7)92 b(Using)30 b(the)g(library)e(in)h(a)i Fj(stdio)p Fl(-free)e(en)m(vironmen)m(t)23 b Fa(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)52 b Fl(29)p eop %%Page: -2 39 -2 38 bop 3699 -116 a Fl(ii)748 83 y(3.7.1)93 b(Getting)31 b(rid)d(of)j Fj(stdio)20 b Fa(.)13 b(.)i(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)49 b Fl(29)748 193 y(3.7.2)93 b(Critical)28 b(error)i(handling)22 b Fa(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)54 b Fl(29)449 302 y(3.8)92 b(Making)30 b(a)h(Windo)m(ws)e(DLL)15 b Fa(.)h(.)f(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)44 b Fl(30)150 545 y Fk(4)135 b(Miscellanea)11 b Fb(.)21 b(.)f(.)f(.)h(.)f(.)g(.)h(.)f(.)h (.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)g(.)h(.)56 b Fk(31)449 682 y Fl(4.1)92 b(Limitations)29 b(of)h(the)h(compressed)f(\014le)f(format)9 b Fa(.)15 b(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)38 b Fl(31)449 791 y(4.2)92 b(P)m(ortabilit)m(y)30 b(issues)14 b Fa(.)f(.)j(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)43 b Fl(32)449 901 y(4.3)92 b(Rep)s(orting)29 b(bugs)f Fa(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)58 b Fl(32)449 1010 y(4.4)92 b(Did)29 b(y)m(ou)i(get)h(the)e(righ)m(t)g(pac)m(k)-5 b(age?)22 b Fa(.)17 b(.)e(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)51 b Fl(34)449 1120 y(4.5)92 b(T)-8 b(esting)16 b Fa(.)f(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)45 b Fl(34)449 1230 y(4.6)92 b(F)-8 b(urther)30 b(reading)22 b Fa(.)14 b(.)h(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)51 b Fl(35)p eop %%Trailer end userdict /end-hook known{end-hook}if %%EOF