home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / snobol4 / misc.lha / compress.bdl next >
SHell self-extracting ARchive  |  1993-07-24  |  57.7 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: SHell self-extracting ARchive (archive/shar).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert SHell self-extracting ARchive (archive/shar) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file ASCII text default
79% TrID shar SHell self-extracting aRchive (var.2) default
20% TrID Xilinx User Constraints File default (weak)
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried x-fmt/111 Plain Text File default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 23 20 54 6f 20 75 6e 62 | 75 6e 64 6c 65 2c 20 73 |# To unb|undle, s|
|00000010| 68 20 74 68 69 73 20 66 | 69 6c 65 0a 65 63 68 6f |h this f|ile.echo|
|00000020| 20 75 6e 62 75 6e 64 6c | 69 6e 67 20 4d 61 6b 65 | unbundl|ing Make|
|00000030| 66 69 6c 65 20 31 3e 26 | 32 0a 63 61 74 20 3e 4d |file 1>&|2.cat >M|
|00000040| 61 6b 65 66 69 6c 65 20 | 3c 3c 27 41 6c 42 65 52 |akefile |<<'AlBeR|
|00000050| 74 45 69 4e 73 54 65 49 | 6e 27 0a 23 0a 23 09 40 |tEiNsTeI|n'.#.#.@|
|00000060| 28 23 29 4d 61 6b 65 66 | 69 6c 65 09 35 2e 35 20 |(#)Makef|ile.5.5 |
|00000070| 28 42 65 72 6b 65 6c 65 | 79 29 20 39 2f 31 38 2f |(Berkele|y) 9/18/|
|00000080| 38 35 0a 23 0a 43 4f 4d | 46 4c 41 47 53 3d 2d 44 |85.#.COM|FLAGS=-D|
|00000090| 42 53 44 34 5f 32 20 2d | 4f 20 2d 44 53 41 43 52 |BSD4_2 -|O -DSACR|
|000000a0| 45 44 4d 45 4d 3d 32 35 | 36 30 30 30 0a 42 49 4e |EDMEM=25|6000.BIN|
|000000b0| 3d 24 7b 44 45 53 54 44 | 49 52 7d 2f 75 73 72 2f |=${DESTD|IR}/usr/|
|000000c0| 75 63 62 0a 0a 63 6f 6d | 70 72 65 73 73 3a 20 63 |ucb..com|press: c|
|000000d0| 6f 6d 70 72 65 73 73 2e | 63 20 55 53 45 52 4d 45 |ompress.|c USERME|
|000000e0| 4d 0a 09 63 63 20 24 28 | 43 4f 4d 46 4c 41 47 53 |M..cc $(|COMFLAGS|
|000000f0| 29 20 2d 44 55 53 45 52 | 4d 45 4d 3d 60 63 61 74 |) -DUSER|MEM=`cat|
|00000100| 20 55 53 45 52 4d 45 4d | 60 20 2d 6f 20 63 6f 6d | USERMEM|` -o com|
|00000110| 70 72 65 73 73 20 63 6f | 6d 70 72 65 73 73 2e 63 |press co|mpress.c|
|00000120| 0a 0a 23 20 55 53 45 52 | 4d 45 4d 20 6d 61 79 20 |..# USER|MEM may |
|00000130| 68 61 76 65 20 74 6f 20 | 62 65 20 73 65 74 20 62 |have to |be set b|
|00000140| 79 20 68 61 6e 64 2e 20 | 20 49 74 20 73 68 6f 75 |y hand. | It shou|
|00000150| 6c 64 20 63 6f 6e 74 61 | 69 6e 20 74 68 65 20 61 |ld conta|in the a|
|00000160| 6d 6f 75 6e 74 20 6f 66 | 0a 23 20 61 76 61 69 6c |mount of|.# avail|
|00000170| 61 62 6c 65 20 75 73 65 | 72 20 6d 65 6d 6f 72 79 |able use|r memory|
|00000180| 20 69 6e 20 62 79 74 65 | 73 2e 20 20 53 65 74 20 | in byte|s. Set |
|00000190| 69 74 20 74 6f 20 7a 65 | 72 6f 2c 20 66 6f 72 20 |it to ze|ro, for |
|000001a0| 70 68 79 73 69 63 61 6c | 20 6d 65 6d 6f 72 79 0a |physical| memory.|
|000001b0| 23 20 6c 65 73 73 20 74 | 68 61 6e 20 31 20 4d 65 |# less t|han 1 Me|
|000001c0| 67 2e 0a 55 53 45 52 4d | 45 4d 3a 0a 09 73 68 20 |g..USERM|EM:..sh |
|000001d0| 75 73 65 72 6d 65 6d 2e | 73 68 20 3e 20 55 53 45 |usermem.|sh > USE|
|000001e0| 52 4d 45 4d 0a 0a 69 6e | 73 74 61 6c 6c 3a 20 63 |RMEM..in|stall: c|
|000001f0| 6f 6d 70 72 65 73 73 0a | 09 69 6e 73 74 61 6c 6c |ompress.|.install|
|00000200| 20 2d 73 20 63 6f 6d 70 | 72 65 73 73 20 24 28 42 | -s comp|ress $(B|
|00000210| 49 4e 29 0a 09 72 6d 20 | 2d 66 20 24 28 42 49 4e |IN)..rm |-f $(BIN|
|00000220| 29 2f 75 6e 63 6f 6d 70 | 72 65 73 73 20 24 28 42 |)/uncomp|ress $(B|
|00000230| 49 4e 29 2f 7a 63 61 74 | 0a 09 6c 6e 20 24 28 42 |IN)/zcat|..ln $(B|
|00000240| 49 4e 29 2f 63 6f 6d 70 | 72 65 73 73 20 24 28 42 |IN)/comp|ress $(B|
|00000250| 49 4e 29 2f 75 6e 63 6f | 6d 70 72 65 73 73 0a 09 |IN)/unco|mpress..|
|00000260| 6c 6e 20 24 28 42 49 4e | 29 2f 63 6f 6d 70 72 65 |ln $(BIN|)/compre|
|00000270| 73 73 20 24 28 42 49 4e | 29 2f 7a 63 61 74 0a 0a |ss $(BIN|)/zcat..|
|00000280| 23 20 54 65 6d 70 6f 72 | 61 72 69 6c 79 20 64 6f |# Tempor|arily do|
|00000290| 6e 27 74 20 64 65 6c 65 | 74 65 20 55 53 45 52 4d |n't dele|te USERM|
|000002a0| 45 4d 2e 20 20 57 68 65 | 6e 20 63 68 72 6f 6f 74 |EM. Whe|n chroot|
|000002b0| 27 65 64 20 74 6f 20 2f | 6e 62 73 64 2c 20 75 73 |'ed to /|nbsd, us|
|000002c0| 65 72 6d 65 6d 2e 73 68 | 0a 23 20 66 61 69 6c 73 |ermem.sh|.# fails|
|000002d0| 20 74 6f 74 61 6c 6c 79 | 2e 0a 63 6c 65 61 6e 3a | totally|..clean:|
|000002e0| 0a 09 72 6d 20 2d 66 20 | 63 6f 6d 70 72 65 73 73 |..rm -f |compress|
|000002f0| 20 63 6f 72 65 20 65 72 | 72 73 0a 23 09 72 6d 20 | core er|rs.#.rm |
|00000300| 2d 66 20 63 6f 6d 70 72 | 65 73 73 20 55 53 45 52 |-f compr|ess USER|
|00000310| 4d 45 4d 20 63 6f 72 65 | 20 65 72 72 73 0a 41 6c |MEM core| errs.Al|
|00000320| 42 65 52 74 45 69 4e 73 | 54 65 49 6e 0a 65 63 68 |BeRtEiNs|TeIn.ech|
|00000330| 6f 20 75 6e 62 75 6e 64 | 6c 69 6e 67 20 52 45 41 |o unbund|ling REA|
|00000340| 44 4d 45 20 31 3e 26 32 | 0a 63 61 74 20 3e 52 45 |DME 1>&2|.cat >RE|
|00000350| 41 44 4d 45 20 3c 3c 27 | 41 6c 42 65 52 74 45 69 |ADME <<'|AlBeRtEi|
|00000360| 4e 73 54 65 49 6e 27 0a | 0a 09 40 28 23 29 52 45 |NsTeIn'.|..@(#)RE|
|00000370| 41 44 4d 45 09 35 2e 33 | 20 28 42 65 72 6b 65 6c |ADME.5.3| (Berkel|
|00000380| 65 79 29 20 39 2f 31 37 | 2f 38 35 0a 0a 43 6f 6d |ey) 9/17|/85..Com|
|00000390| 70 72 65 73 73 20 76 65 | 72 73 69 6f 6e 20 34 2e |press ve|rsion 4.|
|000003a0| 30 20 69 6d 70 72 6f 76 | 65 6d 65 6e 74 73 20 6f |0 improv|ements o|
|000003b0| 76 65 72 20 33 2e 30 3a | 0a 09 6f 20 63 6f 6d 70 |ver 3.0:|..o comp|
|000003c0| 72 65 73 73 28 29 20 73 | 70 65 65 64 75 70 20 28 |ress() s|peedup (|
|000003d0| 31 30 2d 35 30 25 29 20 | 62 79 20 63 68 61 6e 67 |10-50%) |by chang|
|000003e0| 69 6e 67 20 64 69 76 69 | 73 69 6f 6e 20 68 61 73 |ing divi|sion has|
|000003f0| 68 20 74 6f 20 78 6f 72 | 0a 09 6f 20 64 65 63 6f |h to xor|..o deco|
|00000400| 6d 70 72 65 73 73 28 29 | 20 73 70 65 65 64 75 70 |mpress()| speedup|
|00000410| 20 28 35 2d 31 30 25 29 | 0a 09 6f 20 4d 65 6d 6f | (5-10%)|..o Memo|
|00000420| 72 79 20 72 65 71 75 69 | 72 65 6d 65 6e 74 73 20 |ry requi|rements |
|00000430| 72 65 64 75 63 65 64 20 | 28 33 2d 33 30 25 29 0a |reduced |(3-30%).|
|00000440| 09 6f 20 53 74 61 63 6b | 20 72 65 71 75 69 72 65 |.o Stack| require|
|00000450| 6d 65 6e 74 73 20 72 65 | 64 75 63 65 64 20 74 6f |ments re|duced to|
|00000460| 20 6c 65 73 73 20 74 68 | 61 6e 20 34 6b 62 0a 09 | less th|an 4kb..|
|00000470| 6f 20 52 65 6d 6f 76 65 | 64 20 27 42 69 67 2b 46 |o Remove|d 'Big+F|
|00000480| 61 73 74 27 20 63 6f 6d | 70 72 65 73 73 20 63 6f |ast' com|press co|
|00000490| 64 65 20 28 46 42 49 54 | 53 29 20 62 65 63 61 75 |de (FBIT|S) becau|
|000004a0| 73 65 20 6f 66 20 63 6f | 6d 70 72 65 73 73 20 73 |se of co|mpress s|
|000004b0| 70 65 65 64 75 70 0a 20 | 20 20 20 09 6f 20 50 6f |peedup. | .o Po|
|000004c0| 72 74 61 62 69 6c 69 74 | 79 20 6d 6f 64 73 20 66 |rtabilit|y mods f|
|000004d0| 6f 72 20 5a 38 30 30 30 | 20 61 6e 64 20 50 43 2f |or Z8000| and PC/|
|000004e0| 58 54 20 28 62 75 74 20 | 6e 6f 74 20 7a 65 75 73 |XT (but |not zeus|
|000004f0| 20 33 2e 32 29 0a 09 6f | 20 44 65 66 61 75 6c 74 | 3.2)..o| Default|
|00000500| 20 74 6f 20 27 71 75 69 | 65 74 27 20 6d 6f 64 65 | to 'qui|et' mode|
|00000510| 0a 09 6f 20 55 6e 69 66 | 69 63 61 74 69 6f 6e 20 |..o Unif|ication |
|00000520| 6f 66 20 27 66 6f 72 63 | 65 27 20 66 6c 61 67 73 |of 'forc|e' flags|
|00000530| 0a 09 6f 20 4d 61 6e 75 | 61 6c 20 70 61 67 65 20 |..o Manu|al page |
|00000540| 6f 76 65 72 68 61 75 6c | 0a 09 6f 20 50 6f 72 74 |overhaul|..o Port|
|00000550| 61 62 69 6c 69 74 79 20 | 65 6e 68 61 6e 63 65 6d |ability |enhancem|
|00000560| 65 6e 74 20 66 6f 72 20 | 4d 5f 58 45 4e 49 58 0a |ent for |M_XENIX.|
|00000570| 09 6f 20 52 65 6d 6f 76 | 65 64 20 74 65 78 74 20 |.o Remov|ed text |
|00000580| 6f 6e 20 23 65 6c 73 65 | 20 61 6e 64 20 23 65 6e |on #else| and #en|
|00000590| 64 69 66 0a 09 6f 20 41 | 64 64 65 64 20 22 2d 56 |dif..o A|dded "-V|
|000005a0| 22 20 73 77 69 74 63 68 | 20 74 6f 20 70 72 69 6e |" switch| to prin|
|000005b0| 74 20 76 65 72 73 69 6f | 6e 20 61 6e 64 20 6f 70 |t versio|n and op|
|000005c0| 74 69 6f 6e 73 0a 09 6f | 20 41 64 64 65 64 20 23 |tions..o| Added #|
|000005d0| 64 65 66 69 6e 65 73 20 | 66 6f 72 20 53 49 47 4e |defines |for SIGN|
|000005e0| 45 44 5f 43 4f 4d 50 41 | 52 45 5f 53 4c 4f 57 0a |ED_COMPA|RE_SLOW.|
|000005f0| 09 6f 20 41 64 64 65 64 | 20 4d 61 6b 65 66 69 6c |.o Added| Makefil|
|00000600| 65 20 61 6e 64 20 22 75 | 73 65 72 6d 65 6d 22 20 |e and "u|sermem" |
|00000610| 70 72 6f 67 72 61 6d 0a | 09 6f 20 52 65 6d 6f 76 |program.|.o Remov|
|00000620| 65 64 20 61 6c 6c 20 66 | 6c 6f 61 74 69 6e 67 20 |ed all f|loating |
|00000630| 70 6f 69 6e 74 20 63 6f | 6d 70 75 74 61 74 69 6f |point co|mputatio|
|00000640| 6e 73 0a 09 6f 20 4e 65 | 77 20 70 72 6f 67 72 61 |ns..o Ne|w progra|
|00000650| 6d 73 3a 20 5b 64 65 6c | 65 74 65 64 5d 0a 0a 54 |ms: [del|eted]..T|
|00000660| 68 65 20 22 75 73 65 72 | 6d 65 6d 22 20 73 63 72 |he "user|mem" scr|
|00000670| 69 70 74 20 61 74 74 65 | 6d 70 74 73 20 74 6f 20 |ipt atte|mpts to |
|00000680| 64 65 74 65 72 6d 69 6e | 65 20 74 68 65 20 6d 61 |determin|e the ma|
|00000690| 78 69 6d 75 6d 20 70 72 | 6f 63 65 73 73 20 73 69 |ximum pr|ocess si|
|000006a0| 7a 65 2e 20 20 53 6f 6d | 65 0a 65 64 69 74 69 6e |ze. Som|e.editin|
|000006b0| 67 20 6f 66 20 74 68 65 | 20 73 63 72 69 70 74 20 |g of the| script |
|000006c0| 6d 61 79 20 62 65 20 6e | 65 63 65 73 73 61 72 79 |may be n|ecessary|
|000006d0| 20 28 73 65 65 20 74 68 | 65 20 63 6f 6d 6d 65 6e | (see th|e commen|
|000006e0| 74 73 29 2e 20 20 5b 49 | 74 20 73 68 6f 75 6c 64 |ts). [I|t should|
|000006f0| 20 77 6f 72 6b 0a 66 69 | 6e 65 20 6f 6e 20 34 2e | work.fi|ne on 4.|
|00000700| 33 20 62 73 64 2e 5d 20 | 49 66 20 79 6f 75 20 63 |3 bsd.] |If you c|
|00000710| 61 6e 27 74 20 67 65 74 | 20 69 74 20 74 6f 20 77 |an't get| it to w|
|00000720| 6f 72 6b 20 61 74 20 61 | 6c 6c 2c 20 6a 75 73 74 |ork at a|ll, just|
|00000730| 20 63 72 65 61 74 65 20 | 66 69 6c 65 0a 22 55 53 | create |file."US|
|00000740| 45 52 4d 45 4d 22 20 63 | 6f 6e 74 61 69 6e 69 6e |ERMEM" c|ontainin|
|00000750| 67 20 74 68 65 20 6d 61 | 78 69 6d 75 6d 20 70 72 |g the ma|ximum pr|
|00000760| 6f 63 65 73 73 20 73 69 | 7a 65 20 69 6e 20 64 65 |ocess si|ze in de|
|00000770| 63 69 6d 61 6c 2e 0a 0a | 54 68 65 20 66 6f 6c 6c |cimal...|The foll|
|00000780| 6f 77 69 6e 67 20 70 72 | 65 70 72 6f 63 65 73 73 |owing pr|eprocess|
|00000790| 6f 72 20 73 79 6d 62 6f | 6c 73 20 63 6f 6e 74 72 |or symbo|ls contr|
|000007a0| 6f 6c 20 74 68 65 20 63 | 6f 6d 70 69 6c 61 74 69 |ol the c|ompilati|
|000007b0| 6f 6e 20 6f 66 20 22 63 | 6f 6d 70 72 65 73 73 2e |on of "c|ompress.|
|000007c0| 63 22 3a 0a 0a 09 6f 20 | 55 53 45 52 4d 45 4d 09 |c":...o |USERMEM.|
|000007d0| 09 4d 61 78 69 6d 75 6d | 20 70 72 6f 63 65 73 73 |.Maximum| process|
|000007e0| 20 6d 65 6d 6f 72 79 20 | 6f 6e 20 74 68 65 20 73 | memory |on the s|
|000007f0| 79 73 74 65 6d 0a 09 6f | 20 53 41 43 52 45 44 4d |ystem..o| SACREDM|
|00000800| 45 4d 09 09 41 6d 6f 75 | 6e 74 20 74 6f 20 72 65 |EM..Amou|nt to re|
|00000810| 73 65 72 76 65 20 66 6f | 72 20 6f 74 68 65 72 20 |serve fo|r other |
|00000820| 70 72 6f 63 65 73 65 73 | 0a 09 6f 20 53 49 47 4e |proceses|..o SIGN|
|00000830| 45 44 5f 43 4f 4d 50 41 | 52 45 5f 53 4c 4f 57 09 |ED_COMPA|RE_SLOW.|
|00000840| 55 6e 73 69 67 6e 65 64 | 20 63 6f 6d 70 61 72 65 |Unsigned| compare|
|00000850| 20 69 6e 73 74 72 75 63 | 74 69 6f 6e 73 20 61 72 | instruc|tions ar|
|00000860| 65 20 66 61 73 74 65 72 | 0a 09 6f 20 4e 4f 5f 55 |e faster|..o NO_U|
|00000870| 43 48 41 52 09 09 44 6f | 6e 27 74 20 75 73 65 20 |CHAR..Do|n't use |
|00000880| 22 75 6e 73 69 67 6e 65 | 64 20 63 68 61 72 22 20 |"unsigne|d char" |
|00000890| 74 79 70 65 73 0a 09 6f | 20 42 49 54 53 09 09 09 |types..o| BITS...|
|000008a0| 4f 76 65 72 72 75 6c 65 | 73 20 64 65 66 61 75 6c |Overrule|s defaul|
|000008b0| 74 20 73 65 74 20 62 79 | 20 55 53 45 52 4d 45 4d |t set by| USERMEM|
|000008c0| 2d 53 41 43 52 45 44 4d | 45 4d 0a 09 6f 20 76 61 |-SACREDM|EM..o va|
|000008d0| 78 09 09 09 47 65 6e 65 | 72 61 74 65 20 69 6e 6c |x...Gene|rate inl|
|000008e0| 69 6e 65 20 61 73 73 65 | 6d 62 6c 65 72 0a 09 6f |ine asse|mbler..o|
|000008f0| 20 69 6e 74 65 72 64 61 | 74 61 09 09 44 65 66 69 | interda|ta..Defi|
|00000900| 6e 65 73 20 53 49 47 4e | 45 44 5f 43 4f 4d 50 41 |nes SIGN|ED_COMPA|
|00000910| 52 45 5f 53 4c 4f 57 0a | 09 6f 20 4d 5f 58 45 4e |RE_SLOW.|.o M_XEN|
|00000920| 49 58 09 09 4d 61 6b 65 | 73 20 61 72 72 61 79 73 |IX..Make|s arrays|
|00000930| 20 3c 20 36 35 35 33 36 | 20 62 79 74 65 73 20 65 | < 65536| bytes e|
|00000940| 61 63 68 0a 09 6f 20 70 | 64 70 31 31 09 09 09 42 |ach..o p|dp11...B|
|00000950| 49 54 53 3d 31 32 2c 20 | 4e 4f 5f 55 43 48 41 52 |ITS=12, |NO_UCHAR|
|00000960| 0a 09 6f 20 7a 38 30 30 | 30 09 09 09 42 49 54 53 |..o z800|0...BITS|
|00000970| 3d 31 32 0a 09 6f 20 70 | 63 78 74 09 09 09 42 49 |=12..o p|cxt...BI|
|00000980| 54 53 3d 31 32 0a 09 6f | 20 42 53 44 34 5f 32 09 |TS=12..o| BSD4_2.|
|00000990| 09 41 6c 6c 6f 77 20 6c | 6f 6e 67 20 66 69 6c 65 |.Allow l|ong file|
|000009a0| 6e 61 6d 65 73 20 28 20 | 3e 20 31 34 20 63 68 61 |names ( |> 14 cha|
|000009b0| 72 61 63 74 65 72 73 29 | 20 26 0a 09 09 09 09 43 |racters)| &.....C|
|000009c0| 61 6c 6c 20 73 65 74 6c | 69 6e 65 62 75 66 28 73 |all setl|inebuf(s|
|000009d0| 74 64 65 72 72 29 0a 0a | 54 68 65 20 64 69 66 66 |tderr)..|The diff|
|000009e0| 65 72 65 6e 63 65 20 22 | 75 73 65 72 6d 65 6d 2d |erence "|usermem-|
|000009f0| 73 61 63 72 65 64 6d 65 | 6d 22 20 64 65 74 65 72 |sacredme|m" deter|
|00000a00| 6d 69 6e 65 73 20 74 68 | 65 20 6d 61 78 69 6d 75 |mines th|e maximu|
|00000a10| 6d 20 42 49 54 53 20 74 | 68 61 74 20 63 61 6e 20 |m BITS t|hat can |
|00000a20| 62 65 0a 73 70 65 63 69 | 66 69 65 64 20 77 69 74 |be.speci|fied wit|
|00000a30| 68 20 74 68 65 20 22 2d | 62 22 20 66 6c 61 67 2e |h the "-|b" flag.|
|00000a40| 0a 0a 6d 65 6d 6f 72 79 | 3a 20 61 74 20 6c 65 61 |..memory|: at lea|
|00000a50| 73 74 09 09 42 49 54 53 | 0a 2d 2d 2d 2d 2d 2d 20 |st..BITS|.------ |
|00000a60| 20 2d 2d 20 2d 2d 2d 2d | 2d 20 20 20 20 20 20 20 | -- ----|- |
|00000a70| 20 20 20 20 20 20 20 20 | 20 2d 2d 2d 2d 0a 20 20 | | ----. |
|00000a80| 20 20 20 34 33 33 2c 34 | 38 34 09 09 09 20 31 36 | 433,4|84... 16|
|00000a90| 0a 20 20 20 20 20 32 32 | 39 2c 36 30 30 09 09 09 |. 22|9,600...|
|00000aa0| 20 31 35 0a 20 20 20 20 | 20 31 32 37 2c 35 33 36 | 15. | 127,536|
|00000ab0| 09 09 09 20 31 34 0a 20 | 20 20 20 20 20 37 33 2c |... 14. | 73,|
|00000ac0| 34 36 34 09 09 09 20 31 | 33 0a 20 20 20 20 20 20 |464... 1|3. |
|00000ad0| 20 20 20 20 20 30 09 09 | 09 20 31 32 0a 0a 54 68 | 0..|. 12..Th|
|00000ae0| 65 20 64 65 66 61 75 6c | 74 20 69 73 20 42 49 54 |e defaul|t is BIT|
|00000af0| 53 3d 31 36 2e 0a 0a 54 | 68 65 20 6d 61 78 69 6d |S=16...T|he maxim|
|00000b00| 75 6d 20 62 69 74 73 20 | 63 61 6e 20 62 65 20 6f |um bits |can be o|
|00000b10| 76 65 72 72 75 6c 6c 65 | 64 20 62 79 20 73 70 65 |verrulle|d by spe|
|00000b20| 63 69 66 79 69 6e 67 20 | 22 2d 44 42 49 54 53 3d |cifying |"-DBITS=|
|00000b30| 62 69 74 73 22 20 61 74 | 0a 63 6f 6d 70 69 6c 61 |bits" at|.compila|
|00000b40| 74 69 6f 6e 20 74 69 6d | 65 2e 0a 0a 57 41 52 4e |tion tim|e...WARN|
|00000b50| 49 4e 47 3a 20 66 69 6c | 65 73 20 63 6f 6d 70 72 |ING: fil|es compr|
|00000b60| 65 73 73 65 64 20 6f 6e | 20 61 20 6c 61 72 67 65 |essed on| a large|
|00000b70| 20 6d 61 63 68 69 6e 65 | 20 77 69 74 68 20 6d 6f | machine| with mo|
|00000b80| 72 65 20 62 69 74 73 20 | 74 68 61 6e 20 61 6c 6c |re bits |than all|
|00000b90| 6f 77 65 64 20 62 79 20 | 0a 61 20 76 65 72 73 69 |owed by |.a versi|
|00000ba0| 6f 6e 20 6f 66 20 63 6f | 6d 70 72 65 73 73 20 6f |on of co|mpress o|
|00000bb0| 6e 20 61 20 73 6d 61 6c | 6c 65 72 20 6d 61 63 68 |n a smal|ler mach|
|00000bc0| 69 6e 65 20 63 61 6e 6e | 6f 74 20 62 65 20 64 65 |ine cann|ot be de|
|00000bd0| 63 6f 6d 70 72 65 73 73 | 65 64 21 20 20 55 73 65 |compress|ed! Use|
|00000be0| 20 74 68 65 0a 22 2d 62 | 31 32 22 20 66 6c 61 67 | the."-b|12" flag|
|00000bf0| 20 74 6f 20 67 65 6e 65 | 72 61 74 65 20 61 20 66 | to gene|rate a f|
|00000c00| 69 6c 65 20 6f 6e 20 61 | 20 6c 61 72 67 65 20 6d |ile on a| large m|
|00000c10| 61 63 68 69 6e 65 20 74 | 68 61 74 20 63 61 6e 20 |achine t|hat can |
|00000c20| 62 65 20 75 6e 63 6f 6d | 70 72 65 73 73 65 64 20 |be uncom|pressed |
|00000c30| 0a 6f 6e 20 61 20 31 36 | 2d 62 69 74 20 6d 61 63 |.on a 16|-bit mac|
|00000c40| 68 69 6e 65 2e 0a 0a 54 | 68 65 20 6f 75 74 70 75 |hine...T|he outpu|
|00000c50| 74 20 6f 66 20 63 6f 6d | 70 72 65 73 73 20 34 2e |t of com|press 4.|
|00000c60| 30 20 69 73 20 66 75 6c | 6c 79 20 63 6f 6d 70 61 |0 is ful|ly compa|
|00000c70| 74 69 62 6c 65 20 77 69 | 74 68 20 74 68 61 74 20 |tible wi|th that |
|00000c80| 6f 66 20 63 6f 6d 70 72 | 65 73 73 20 33 2e 30 2e |of compr|ess 3.0.|
|00000c90| 0a 49 6e 20 6f 74 68 65 | 72 20 77 6f 72 64 73 2c |.In othe|r words,|
|00000ca0| 20 74 68 65 20 6f 75 74 | 70 75 74 20 6f 66 20 63 | the out|put of c|
|00000cb0| 6f 6d 70 72 65 73 73 20 | 34 2e 30 20 6d 61 79 20 |ompress |4.0 may |
|00000cc0| 62 65 20 66 65 64 20 69 | 6e 74 6f 20 75 6e 63 6f |be fed i|nto unco|
|00000cd0| 6d 70 72 65 73 73 20 33 | 2e 30 20 6f 72 0a 74 68 |mpress 3|.0 or.th|
|00000ce0| 65 20 6f 75 74 70 75 74 | 20 6f 66 20 63 6f 6d 70 |e output| of comp|
|00000cf0| 72 65 73 73 20 33 2e 30 | 20 6d 61 79 20 62 65 20 |ress 3.0| may be |
|00000d00| 66 65 64 20 69 6e 74 6f | 20 75 6e 63 6f 6d 70 72 |fed into| uncompr|
|00000d10| 65 73 73 20 34 2e 30 2e | 0a 0a 54 68 65 20 6f 75 |ess 4.0.|..The ou|
|00000d20| 74 70 75 74 20 6f 66 20 | 63 6f 6d 70 72 65 73 73 |tput of |compress|
|00000d30| 20 34 2e 30 20 6e 6f 74 | 20 63 6f 6d 70 61 74 69 | 4.0 not| compati|
|00000d40| 62 6c 65 20 77 69 74 68 | 20 74 68 61 74 20 6f 66 |ble with| that of|
|00000d50| 0a 63 6f 6d 70 72 65 73 | 73 20 32 2e 30 2e 20 20 |.compres|s 2.0. |
|00000d60| 48 6f 77 65 76 65 72 2c | 20 63 6f 6d 70 72 65 73 |However,| compres|
|00000d70| 73 20 34 2e 30 20 73 74 | 69 6c 6c 20 61 63 63 65 |s 4.0 st|ill acce|
|00000d80| 70 74 73 20 74 68 65 20 | 6f 75 74 70 75 74 20 6f |pts the |output o|
|00000d90| 66 0a 63 6f 6d 70 72 65 | 73 73 20 32 2e 30 2e 20 |f.compre|ss 2.0. |
|00000da0| 20 54 6f 20 67 65 6e 65 | 72 61 74 65 20 6f 75 74 | To gene|rate out|
|00000db0| 70 75 74 20 74 68 61 74 | 20 69 73 20 63 6f 6d 70 |put that| is comp|
|00000dc0| 61 74 69 62 6c 65 20 77 | 69 74 68 20 63 6f 6d 70 |atible w|ith comp|
|00000dd0| 72 65 73 73 0a 32 2e 30 | 2c 20 75 73 65 20 74 68 |ress.2.0|, use th|
|00000de0| 65 20 75 6e 64 6f 63 75 | 6d 65 6e 74 65 64 20 22 |e undocu|mented "|
|00000df0| 2d 43 22 20 66 6c 61 67 | 2e 0a 0a 09 2d 66 72 6f |-C" flag|....-fro|
|00000e00| 6d 20 6d 6f 64 2e 73 6f | 75 72 63 65 73 2c 20 73 |m mod.so|urces, s|
|00000e10| 75 62 6d 69 74 74 65 64 | 20 62 79 20 76 61 78 31 |ubmitted| by vax1|
|00000e20| 33 35 21 70 65 74 73 64 | 21 6a 6f 65 20 28 4a 6f |35!petsd|!joe (Jo|
|00000e30| 65 20 4f 72 6f 73 74 29 | 2c 20 38 2f 31 2f 38 35 |e Orost)|, 8/1/85|
|00000e40| 0a 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.-------|--------|
|00000e50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000e60| 2d 0a 0a 45 6e 63 6c 6f | 73 65 64 20 69 73 20 63 |-..Enclo|sed is c|
|00000e70| 6f 6d 70 72 65 73 73 20 | 76 65 72 73 69 6f 6e 20 |ompress |version |
|00000e80| 33 2e 30 20 77 69 74 68 | 20 74 68 65 20 66 6f 6c |3.0 with| the fol|
|00000e90| 6c 6f 77 69 6e 67 20 63 | 68 61 6e 67 65 73 3a 0a |lowing c|hanges:.|
|00000ea0| 0a 31 2e 09 22 42 6c 6f | 63 6b 22 20 63 6f 6d 70 |.1.."Blo|ck" comp|
|00000eb0| 72 65 73 73 69 6f 6e 20 | 69 73 20 70 65 72 66 6f |ression |is perfo|
|00000ec0| 72 6d 65 64 2e 20 20 41 | 66 74 65 72 20 74 68 65 |rmed. A|fter the|
|00000ed0| 20 42 49 54 53 20 72 75 | 6e 20 6f 75 74 2c 20 74 | BITS ru|n out, t|
|00000ee0| 68 65 0a 09 63 6f 6d 70 | 72 65 73 73 69 6f 6e 20 |he..comp|ression |
|00000ef0| 72 61 74 69 6f 20 69 73 | 20 63 68 65 63 6b 65 64 |ratio is| checked|
|00000f00| 20 65 76 65 72 79 20 73 | 6f 20 6f 66 74 65 6e 2e | every s|o often.|
|00000f10| 20 20 49 66 20 69 74 20 | 69 73 20 64 65 63 72 65 | If it |is decre|
|00000f20| 61 73 69 6e 67 2c 0a 09 | 74 68 65 20 74 61 62 6c |asing,..|the tabl|
|00000f30| 65 20 69 73 20 63 6c 65 | 61 72 65 64 20 61 6e 64 |e is cle|ared and|
|00000f40| 20 61 20 6e 65 77 20 73 | 65 74 20 6f 66 20 73 75 | a new s|et of su|
|00000f50| 62 73 74 72 69 6e 67 73 | 20 61 72 65 20 67 65 6e |bstrings| are gen|
|00000f60| 65 72 61 74 65 64 2e 0a | 0a 09 54 68 69 73 20 6d |erated..|..This m|
|00000f70| 61 6b 65 73 20 74 68 65 | 20 6f 75 74 70 75 74 20 |akes the| output |
|00000f80| 6f 66 20 63 6f 6d 70 72 | 65 73 73 20 33 2e 30 20 |of compr|ess 3.0 |
|00000f90| 6e 6f 74 20 63 6f 6d 70 | 61 74 69 62 6c 65 20 77 |not comp|atible w|
|00000fa0| 69 74 68 20 74 68 61 74 | 20 6f 66 0a 09 63 6f 6d |ith that| of..com|
|00000fb0| 70 72 65 73 73 20 32 2e | 30 2e 20 20 48 6f 77 65 |press 2.|0. Howe|
|00000fc0| 76 65 72 2c 20 63 6f 6d | 70 72 65 73 73 20 33 2e |ver, com|press 3.|
|00000fd0| 30 20 73 74 69 6c 6c 20 | 61 63 63 65 70 74 73 20 |0 still |accepts |
|00000fe0| 74 68 65 20 6f 75 74 70 | 75 74 20 6f 66 0a 09 63 |the outp|ut of..c|
|00000ff0| 6f 6d 70 72 65 73 73 20 | 32 2e 30 2e 20 20 54 6f |ompress |2.0. To|
|00001000| 20 67 65 6e 65 72 61 74 | 65 20 6f 75 74 70 75 74 | generat|e output|
|00001010| 20 74 68 61 74 20 69 73 | 20 63 6f 6d 70 61 74 69 | that is| compati|
|00001020| 62 6c 65 20 77 69 74 68 | 20 63 6f 6d 70 72 65 73 |ble with| compres|
|00001030| 73 0a 09 32 2e 30 2c 20 | 75 73 65 20 74 68 65 20 |s..2.0, |use the |
|00001040| 75 6e 64 6f 63 75 6d 65 | 6e 74 65 64 20 22 2d 43 |undocume|nted "-C|
|00001050| 22 20 66 6c 61 67 2e 0a | 0a 32 2e 09 41 20 71 75 |" flag..|.2..A qu|
|00001060| 69 65 74 20 22 2d 71 22 | 20 66 6c 61 67 20 68 61 |iet "-q"| flag ha|
|00001070| 73 20 62 65 65 6e 20 61 | 64 64 65 64 20 66 6f 72 |s been a|dded for|
|00001080| 20 75 73 65 20 62 79 20 | 74 68 65 20 6e 65 77 73 | use by |the news|
|00001090| 20 73 79 73 74 65 6d 2e | 0a 0a 33 2e 09 54 68 65 | system.|..3..The|
|000010a0| 20 63 68 61 72 61 63 74 | 65 72 20 63 68 61 69 6e | charact|er chain|
|000010b0| 69 6e 67 20 68 61 73 20 | 62 65 65 6e 20 64 65 6c |ing has |been del|
|000010c0| 65 74 65 64 20 61 6e 64 | 20 74 68 65 20 70 72 6f |eted and| the pro|
|000010d0| 67 72 61 6d 20 6e 6f 77 | 20 75 73 65 73 0a 09 68 |gram now| uses..h|
|000010e0| 61 73 68 69 6e 67 2e 20 | 20 54 68 69 73 20 69 6d |ashing. | This im|
|000010f0| 70 72 6f 76 65 73 20 74 | 68 65 20 73 70 65 65 64 |proves t|he speed|
|00001100| 20 6f 66 20 74 68 65 20 | 70 72 6f 67 72 61 6d 2c | of the |program,|
|00001110| 20 65 73 70 65 63 69 61 | 6c 6c 79 0a 09 64 75 72 | especia|lly..dur|
|00001120| 69 6e 67 20 64 65 63 6f | 6d 70 72 65 73 73 69 6f |ing deco|mpressio|
|00001130| 6e 2e 20 20 4f 74 68 65 | 72 20 73 70 65 65 64 20 |n. Othe|r speed |
|00001140| 69 6d 70 72 6f 76 65 6d | 65 6e 74 73 20 68 61 76 |improvem|ents hav|
|00001150| 65 20 62 65 65 6e 20 6d | 61 64 65 2c 0a 09 73 75 |e been m|ade,..su|
|00001160| 63 68 20 61 73 20 75 73 | 69 6e 67 20 70 75 74 63 |ch as us|ing putc|
|00001170| 28 29 20 69 6e 73 74 65 | 61 64 20 6f 66 20 66 77 |() inste|ad of fw|
|00001180| 72 69 74 65 28 29 2e 0a | 0a 34 2e 09 41 20 6c 61 |rite()..|.4..A la|
|00001190| 72 67 65 20 74 61 62 6c | 65 20 69 73 20 75 73 65 |rge tabl|e is use|
|000011a0| 64 20 6f 6e 20 6c 61 72 | 67 65 20 6d 61 63 68 69 |d on lar|ge machi|
|000011b0| 6e 65 73 20 77 68 65 6e | 20 61 20 72 65 6c 61 74 |nes when| a relat|
|000011c0| 69 76 65 6c 79 20 73 6d | 61 6c 6c 0a 09 6e 75 6d |ively sm|all..num|
|000011d0| 62 65 72 20 6f 66 20 62 | 69 74 73 20 69 73 20 73 |ber of b|its is s|
|000011e0| 70 65 63 69 66 69 65 64 | 2e 20 20 54 68 69 73 20 |pecified|. This |
|000011f0| 73 61 76 65 73 20 6d 75 | 63 68 20 74 69 6d 65 20 |saves mu|ch time |
|00001200| 77 68 65 6e 20 63 6f 6d | 70 72 65 73 73 69 6e 67 |when com|pressing|
|00001210| 0a 09 66 6f 72 20 61 20 | 31 36 2d 62 69 74 20 6d |..for a |16-bit m|
|00001220| 61 63 68 69 6e 65 20 6f | 6e 20 61 20 33 32 2d 62 |achine o|n a 32-b|
|00001230| 69 74 20 76 69 72 74 75 | 61 6c 20 6d 61 63 68 69 |it virtu|al machi|
|00001240| 6e 65 2e 20 20 4e 6f 74 | 65 20 74 68 61 74 20 74 |ne. Not|e that t|
|00001250| 68 65 0a 09 73 70 65 65 | 64 20 69 6d 70 72 6f 76 |he..spee|d improv|
|00001260| 65 6d 65 6e 74 20 6f 6e | 6c 79 20 6f 63 63 75 72 |ement on|ly occur|
|00001270| 73 20 77 68 65 6e 20 74 | 68 65 20 69 6e 70 75 74 |s when t|he input|
|00001280| 20 66 69 6c 65 20 69 73 | 20 3e 20 33 30 30 30 30 | file is| > 30000|
|00001290| 0a 09 63 68 61 72 61 63 | 74 65 72 73 2c 20 61 6e |..charac|ters, an|
|000012a0| 64 20 74 68 65 20 2d 62 | 20 42 49 54 53 20 69 73 |d the -b| BITS is|
|000012b0| 20 6c 65 73 73 20 74 68 | 61 6e 20 6f 72 20 65 71 | less th|an or eq|
|000012c0| 75 61 6c 20 74 6f 20 74 | 68 65 20 63 75 74 6f 66 |ual to t|he cutof|
|000012d0| 66 0a 09 64 65 73 63 72 | 69 62 65 64 20 62 65 6c |f..descr|ibed bel|
|000012e0| 6f 77 2e 0a 0a 4d 6f 73 | 74 20 6f 66 20 74 68 65 |ow...Mos|t of the|
|000012f0| 73 65 20 63 68 61 6e 67 | 65 73 20 77 65 72 65 20 |se chang|es were |
|00001300| 6d 61 64 65 20 62 79 20 | 4a 61 6d 65 73 20 41 2e |made by |James A.|
|00001310| 20 57 6f 6f 64 73 20 28 | 61 6d 65 73 21 6a 61 77 | Woods (|ames!jaw|
|00001320| 29 2e 20 20 54 68 61 6e | 6b 20 79 6f 75 0a 4a 61 |). Than|k you.Ja|
|00001330| 6d 65 73 21 0a 0a 54 6f | 20 63 6f 6d 70 69 6c 65 |mes!..To| compile|
|00001340| 20 63 6f 6d 70 72 65 73 | 73 3a 0a 0a 09 63 63 20 | compres|s:...cc |
|00001350| 2d 4f 20 2d 44 55 53 45 | 52 4d 45 4d 3d 75 73 65 |-O -DUSE|RMEM=use|
|00001360| 72 6d 65 6d 20 2d 6f 20 | 63 6f 6d 70 72 65 73 73 |rmem -o |compress|
|00001370| 20 63 6f 6d 70 72 65 73 | 73 2e 63 0a 0a 57 68 65 | compres|s.c..Whe|
|00001380| 72 65 20 22 75 73 65 72 | 6d 65 6d 22 20 69 73 20 |re "user|mem" is |
|00001390| 74 68 65 20 61 6d 6f 75 | 6e 74 20 6f 66 20 70 68 |the amou|nt of ph|
|000013a0| 79 73 69 63 61 6c 20 75 | 73 65 72 20 6d 65 6d 6f |ysical u|ser memo|
|000013b0| 72 79 20 61 76 61 69 6c | 61 62 6c 65 20 28 69 6e |ry avail|able (in|
|000013c0| 20 62 79 74 65 73 29 2e | 20 20 0a 49 66 20 61 6e | bytes).| .If an|
|000013d0| 79 20 70 68 79 73 69 63 | 61 6c 20 6d 65 6d 6f 72 |y physic|al memor|
|000013e0| 79 20 69 73 20 74 6f 20 | 62 65 20 72 65 73 65 72 |y is to |be reser|
|000013f0| 76 65 64 20 66 6f 72 20 | 6f 74 68 65 72 20 70 72 |ved for |other pr|
|00001400| 6f 63 65 73 73 65 73 2c | 20 70 75 74 20 69 6e 20 |ocesses,| put in |
|00001410| 0a 22 2d 44 53 41 43 52 | 45 44 4d 45 4d 20 73 61 |."-DSACR|EDMEM sa|
|00001420| 63 72 65 64 6d 65 6d 22 | 2c 20 77 68 65 72 65 20 |credmem"|, where |
|00001430| 22 73 61 63 72 65 64 6d | 65 6d 22 20 69 73 20 74 |"sacredm|em" is t|
|00001440| 68 65 20 61 6d 6f 75 6e | 74 20 74 6f 20 62 65 20 |he amoun|t to be |
|00001450| 72 65 73 65 72 76 65 64 | 2e 0a 0a 54 68 65 20 64 |reserved|...The d|
|00001460| 69 66 66 65 72 65 6e 63 | 65 20 22 75 73 65 72 6d |ifferenc|e "userm|
|00001470| 65 6d 2d 73 61 63 72 65 | 64 6d 65 6d 22 20 64 65 |em-sacre|dmem" de|
|00001480| 74 65 72 6d 69 6e 65 73 | 20 74 68 65 20 6d 61 78 |termines| the max|
|00001490| 69 6d 75 6d 20 42 49 54 | 53 20 74 68 61 74 20 63 |imum BIT|S that c|
|000014a0| 61 6e 20 62 65 0a 73 70 | 65 63 69 66 69 65 64 2c |an be.sp|ecified,|
|000014b0| 20 61 6e 64 20 74 68 65 | 20 63 75 74 6f 66 66 20 | and the| cutoff |
|000014c0| 62 69 74 73 20 77 68 65 | 72 65 20 74 68 65 20 6c |bits whe|re the l|
|000014d0| 61 72 67 65 2b 66 61 73 | 74 20 74 61 62 6c 65 20 |arge+fas|t table |
|000014e0| 69 73 20 75 73 65 64 2e | 0a 0a 6d 65 6d 6f 72 79 |is used.|..memory|
|000014f0| 3a 20 61 74 20 6c 65 61 | 73 74 09 09 42 49 54 53 |: at lea|st..BITS|
|00001500| 09 09 63 75 74 6f 66 66 | 0a 2d 2d 2d 2d 2d 2d 20 |..cutoff|.------ |
|00001510| 20 2d 2d 20 2d 2d 2d 2d | 2d 20 20 20 20 20 20 20 | -- ----|- |
|00001520| 20 20 20 20 20 20 20 20 | 20 2d 2d 2d 2d 20 20 20 | | ---- |
|00001530| 20 20 20 20 20 20 20 20 | 20 2d 2d 2d 2d 2d 2d 0a | | ------.|
|00001540| 20 20 20 34 2c 37 31 38 | 2c 35 39 32 20 09 09 09 | 4,718|,592 ...|
|00001550| 20 31 36 09 09 20 20 31 | 33 0a 20 20 20 32 2c 36 | 16.. 1|3. 2,6|
|00001560| 32 31 2c 34 34 30 20 09 | 09 09 20 31 36 09 09 20 |21,440 .|.. 16.. |
|00001570| 20 31 32 0a 20 20 20 31 | 2c 35 37 32 2c 38 36 34 | 12. 1|,572,864|
|00001580| 09 09 09 20 31 36 09 09 | 20 20 31 31 0a 20 20 20 |... 16..| 11. |
|00001590| 31 2c 30 34 38 2c 35 37 | 36 09 09 09 20 31 36 09 |1,048,57|6... 16.|
|000015a0| 09 20 20 31 30 0a 20 20 | 20 20 20 36 33 31 2c 38 |. 10. | 631,8|
|000015b0| 30 38 09 09 09 20 31 36 | 20 20 20 20 20 20 20 20 |08... 16| |
|000015c0| 20 20 20 20 20 20 20 2d | 2d 0a 20 20 20 20 20 33 | -|-. 3|
|000015d0| 32 39 2c 37 32 38 09 09 | 09 20 31 35 20 20 20 20 |29,728..|. 15 |
|000015e0| 20 20 20 20 20 20 20 20 | 20 20 20 2d 2d 0a 20 20 | | --. |
|000015f0| 20 20 20 31 37 38 2c 31 | 37 36 09 09 09 20 31 34 | 178,1|76... 14|
|00001600| 09 09 20 20 2d 2d 0a 20 | 20 20 20 20 20 39 39 2c |.. --. | 99,|
|00001610| 33 32 38 09 09 09 20 31 | 33 09 09 20 20 2d 2d 0a |328... 1|3.. --.|
|00001620| 20 20 20 20 20 20 20 20 | 20 20 20 30 09 09 09 20 | | 0... |
|00001630| 31 32 09 09 20 20 2d 2d | 0a 0a 54 68 65 20 64 65 |12.. --|..The de|
|00001640| 66 61 75 6c 74 20 6d 65 | 6d 6f 72 79 20 73 69 7a |fault me|mory siz|
|00001650| 65 20 69 73 20 37 35 30 | 2c 30 30 30 20 77 68 69 |e is 750|,000 whi|
|00001660| 63 68 20 67 69 76 65 73 | 20 61 20 6d 61 78 69 6d |ch gives| a maxim|
|00001670| 75 6d 20 42 49 54 53 3d | 31 36 20 61 6e 64 20 6e |um BITS=|16 and n|
|00001680| 6f 0a 6c 61 72 67 65 2b | 66 61 73 74 20 74 61 62 |o.large+|fast tab|
|00001690| 6c 65 2e 0a 0a 54 68 65 | 20 6d 61 78 69 6d 75 6d |le...The| maximum|
|000016a0| 20 62 69 74 73 20 63 61 | 6e 20 62 65 20 6f 76 65 | bits ca|n be ove|
|000016b0| 72 72 75 6c 65 64 20 62 | 79 20 73 70 65 63 69 66 |rruled b|y specif|
|000016c0| 79 69 6e 67 20 22 2d 44 | 42 49 54 53 3d 62 69 74 |ying "-D|BITS=bit|
|000016d0| 73 22 20 61 74 0a 63 6f | 6d 70 69 6c 61 74 69 6f |s" at.co|mpilatio|
|000016e0| 6e 20 74 69 6d 65 2e 0a | 0a 49 66 20 79 6f 75 72 |n time..|.If your|
|000016f0| 20 6d 61 63 68 69 6e 65 | 20 64 6f 65 73 6e 27 74 | machine| doesn't|
|00001700| 20 73 75 70 70 6f 72 74 | 20 75 6e 73 69 67 6e 65 | support| unsigne|
|00001710| 64 20 63 68 61 72 61 63 | 74 65 72 73 2c 20 64 65 |d charac|ters, de|
|00001720| 66 69 6e 65 20 22 4e 4f | 5f 55 43 48 41 52 22 20 |fine "NO|_UCHAR" |
|00001730| 0a 77 68 65 6e 20 63 6f | 6d 70 69 6c 69 6e 67 2e |.when co|mpiling.|
|00001740| 0a 0a 49 66 20 79 6f 75 | 72 20 6d 61 63 68 69 6e |..If you|r machin|
|00001750| 65 20 68 61 73 20 22 69 | 6e 74 22 20 61 73 20 31 |e has "i|nt" as 1|
|00001760| 36 2d 62 69 74 73 2c 20 | 64 65 66 69 6e 65 20 22 |6-bits, |define "|
|00001770| 53 48 4f 52 54 5f 49 4e | 54 22 20 77 68 65 6e 20 |SHORT_IN|T" when |
|00001780| 63 6f 6d 70 69 6c 69 6e | 67 2e 0a 0a 41 66 74 65 |compilin|g...Afte|
|00001790| 72 20 63 6f 6d 70 69 6c | 61 74 69 6f 6e 2c 20 6d |r compil|ation, m|
|000017a0| 6f 76 65 20 22 63 6f 6d | 70 72 65 73 73 22 20 74 |ove "com|press" t|
|000017b0| 6f 20 61 20 73 74 61 6e | 64 61 72 64 20 65 78 65 |o a stan|dard exe|
|000017c0| 63 75 74 61 62 6c 65 20 | 6c 6f 63 61 74 69 6f 6e |cutable |location|
|000017d0| 2c 20 73 75 63 68 20 0a | 61 73 20 2f 75 73 72 2f |, such .|as /usr/|
|000017e0| 6c 6f 63 61 6c 2e 20 20 | 54 68 65 6e 3a 0a 09 63 |local. |Then:..c|
|000017f0| 64 20 2f 75 73 72 2f 6c | 6f 63 61 6c 0a 09 6c 6e |d /usr/l|ocal..ln|
|00001800| 20 63 6f 6d 70 72 65 73 | 73 20 75 6e 63 6f 6d 70 | compres|s uncomp|
|00001810| 72 65 73 73 0a 09 6c 6e | 20 63 6f 6d 70 72 65 73 |ress..ln| compres|
|00001820| 73 20 7a 63 61 74 0a 0a | 4f 6e 20 6d 61 63 68 69 |s zcat..|On machi|
|00001830| 6e 65 73 20 74 68 61 74 | 20 68 61 76 65 20 61 20 |nes that| have a |
|00001840| 66 69 78 65 64 20 73 74 | 61 63 6b 20 73 69 7a 65 |fixed st|ack size|
|00001850| 20 28 73 75 63 68 20 61 | 73 20 50 65 72 6b 69 6e | (such a|s Perkin|
|00001860| 2d 45 6c 6d 65 72 29 2c | 20 73 65 74 20 74 68 65 |-Elmer),| set the|
|00001870| 0a 73 74 61 63 6b 20 74 | 6f 20 61 74 20 6c 65 61 |.stack t|o at lea|
|00001880| 73 74 20 31 32 6b 62 2e | 20 20 28 22 73 65 74 73 |st 12kb.| ("sets|
|00001890| 74 61 63 6b 20 63 6f 6d | 70 72 65 73 73 20 31 32 |tack com|press 12|
|000018a0| 22 20 6f 6e 20 50 65 72 | 6b 69 6e 2d 45 6c 6d 65 |" on Per|kin-Elme|
|000018b0| 72 29 2e 0a 0a 4e 65 78 | 74 2c 20 69 6e 73 74 61 |r)...Nex|t, insta|
|000018c0| 6c 6c 20 74 68 65 20 6d | 61 6e 75 61 6c 20 28 63 |ll the m|anual (c|
|000018d0| 6f 6d 70 72 65 73 73 2e | 6c 29 2e 0a 09 63 70 20 |ompress.|l)...cp |
|000018e0| 63 6f 6d 70 72 65 73 73 | 2e 6c 20 2f 75 73 72 2f |compress|.l /usr/|
|000018f0| 6d 61 6e 2f 6d 61 6e 6c | 0a 09 63 64 20 2f 75 73 |man/manl|..cd /us|
|00001900| 72 2f 6d 61 6e 2f 6d 61 | 6e 6c 0a 09 6c 6e 20 63 |r/man/ma|nl..ln c|
|00001910| 6f 6d 70 72 65 73 73 2e | 6c 20 75 6e 63 6f 6d 70 |ompress.|l uncomp|
|00001920| 72 65 73 73 2e 6c 0a 09 | 6c 6e 20 63 6f 6d 70 72 |ress.l..|ln compr|
|00001930| 65 73 73 2e 6c 20 7a 63 | 61 74 2e 6c 0a 0a 09 09 |ess.l zc|at.l....|
|00001940| 2d 20 6f 72 20 2d 0a 0a | 09 63 70 20 63 6f 6d 70 |- or -..|.cp comp|
|00001950| 72 65 73 73 2e 6c 20 2f | 75 73 72 2f 6d 61 6e 2f |ress.l /|usr/man/|
|00001960| 6d 61 6e 31 2f 63 6f 6d | 70 72 65 73 73 2e 31 0a |man1/com|press.1.|
|00001970| 09 63 64 20 2f 75 73 72 | 2f 6d 61 6e 2f 6d 61 6e |.cd /usr|/man/man|
|00001980| 31 0a 09 6c 6e 20 63 6f | 6d 70 72 65 73 73 2e 31 |1..ln co|mpress.1|
|00001990| 20 75 6e 63 6f 6d 70 72 | 65 73 73 2e 31 0a 09 6c | uncompr|ess.1..l|
|000019a0| 6e 20 63 6f 6d 70 72 65 | 73 73 2e 31 20 7a 63 61 |n compre|ss.1 zca|
|000019b0| 74 2e 31 0a 0a 09 09 09 | 09 09 72 65 67 61 72 64 |t.1.....|..regard|
|000019c0| 73 2c 0a 09 09 09 09 09 | 70 65 74 73 64 21 6a 6f |s,......|petsd!jo|
|000019d0| 65 0a 0a 48 65 72 65 20 | 69 73 20 61 20 6e 6f 74 |e..Here |is a not|
|000019e0| 65 20 66 72 6f 6d 20 74 | 68 65 20 6e 65 74 3a 0a |e from t|he net:.|
|000019f0| 0a 3e 46 72 6f 6d 20 68 | 70 6c 61 62 73 21 70 65 |.>From h|plabs!pe|
|00001a00| 73 6e 74 61 21 61 6d 64 | 21 74 75 72 74 6c 65 76 |snta!amd|!turtlev|
|00001a10| 61 78 21 6b 65 6e 20 53 | 61 74 20 4a 61 6e 20 20 |ax!ken S|at Jan |
|00001a20| 35 20 30 33 3a 33 35 3a | 32 30 20 31 39 38 35 0a |5 03:35:|20 1985.|
|00001a30| 50 61 74 68 3a 20 61 6d | 65 73 21 68 70 6c 61 62 |Path: am|es!hplab|
|00001a40| 73 21 70 65 73 6e 74 61 | 21 61 6d 64 21 74 75 72 |s!pesnta|!amd!tur|
|00001a50| 74 6c 65 76 61 78 21 6b | 65 6e 0a 46 72 6f 6d 3a |tlevax!k|en.From:|
|00001a60| 20 6b 65 6e 40 74 75 72 | 74 6c 65 76 61 78 2e 55 | ken@tur|tlevax.U|
|00001a70| 55 43 50 20 28 4b 65 6e | 20 54 75 72 6b 6f 77 73 |UCP (Ken| Turkows|
|00001a80| 6b 69 29 0a 4e 65 77 73 | 67 72 6f 75 70 73 3a 20 |ki).News|groups: |
|00001a90| 6e 65 74 2e 73 6f 75 72 | 63 65 73 0a 53 75 62 6a |net.sour|ces.Subj|
|00001aa0| 65 63 74 3a 20 52 65 3a | 20 43 6f 6d 70 72 65 73 |ect: Re:| Compres|
|00001ab0| 73 20 72 65 6c 65 61 73 | 65 20 33 2e 30 20 3a 20 |s releas|e 3.0 : |
|00001ac0| 73 61 6d 70 6c 65 20 4d | 61 6b 65 66 69 6c 65 0a |sample M|akefile.|
|00001ad0| 4f 72 67 61 6e 69 7a 61 | 74 69 6f 6e 3a 20 43 41 |Organiza|tion: CA|
|00001ae0| 44 4c 49 4e 43 2c 20 49 | 6e 63 2e 20 40 20 4d 65 |DLINC, I|nc. @ Me|
|00001af0| 6e 6c 6f 20 50 61 72 6b | 2c 20 43 41 0a 0a 49 6e |nlo Park|, CA..In|
|00001b00| 20 74 68 65 20 63 6f 6d | 70 72 65 73 73 20 33 2e | the com|press 3.|
|00001b10| 30 20 73 6f 75 72 63 65 | 20 72 65 63 65 6e 74 6c |0 source| recentl|
|00001b20| 79 20 70 6f 73 74 65 64 | 20 74 6f 20 6d 6f 64 2e |y posted| to mod.|
|00001b30| 73 6f 75 72 63 65 73 2c | 20 74 68 65 72 65 20 69 |sources,| there i|
|00001b40| 73 20 61 0a 23 64 65 66 | 69 6e 65 20 76 61 72 69 |s a.#def|ine vari|
|00001b50| 61 62 6c 65 20 77 68 69 | 63 68 20 63 61 6e 20 62 |able whi|ch can b|
|00001b60| 65 20 73 65 74 20 66 6f | 72 20 6f 70 74 69 6d 75 |e set fo|r optimu|
|00001b70| 6d 20 70 65 72 66 6f 72 | 6d 61 6e 63 65 20 6f 6e |m perfor|mance on|
|00001b80| 20 61 20 6d 61 63 68 69 | 6e 65 0a 77 69 74 68 20 | a machi|ne.with |
|00001b90| 61 20 6c 61 72 67 65 20 | 61 6d 6f 75 6e 74 20 6f |a large |amount o|
|00001ba0| 66 20 6d 65 6d 6f 72 79 | 2e 20 20 41 20 70 72 6f |f memory|. A pro|
|00001bb0| 67 72 61 6d 20 28 75 73 | 65 72 6d 65 6d 29 20 74 |gram (us|ermem) t|
|00001bc0| 6f 20 63 61 6c 63 75 6c | 61 74 65 20 74 68 65 0a |o calcul|ate the.|
|00001bd0| 75 73 65 61 62 6c 65 20 | 61 6d 6f 75 6e 74 20 6f |useable |amount o|
|00001be0| 66 20 70 68 79 73 69 63 | 61 6c 20 75 73 65 72 20 |f physic|al user |
|00001bf0| 6d 65 6d 6f 72 79 20 69 | 73 20 65 6e 63 6c 6f 73 |memory i|s enclos|
|00001c00| 65 64 2c 20 61 73 20 77 | 65 6c 6c 20 61 73 20 61 |ed, as w|ell as a|
|00001c10| 20 73 61 6d 70 6c 65 0a | 34 2e 32 62 73 64 20 56 | sample.|4.2bsd V|
|00001c20| 61 78 20 4d 61 6b 65 66 | 69 6c 65 20 66 6f 72 20 |ax Makef|ile for |
|00001c30| 63 6f 6d 70 72 65 73 73 | 2e 0a 0a 48 65 72 65 20 |compress|...Here |
|00001c40| 69 73 20 74 68 65 20 52 | 45 41 44 4d 45 20 66 69 |is the R|EADME fi|
|00001c50| 6c 65 20 66 72 6f 6d 20 | 74 68 65 20 70 72 65 76 |le from |the prev|
|00001c60| 69 6f 75 73 20 76 65 72 | 73 69 6f 6e 20 6f 66 20 |ious ver|sion of |
|00001c70| 63 6f 6d 70 72 65 73 73 | 20 28 32 2e 30 29 3a 0a |compress| (2.0):.|
|00001c80| 0a 3e 45 6e 63 6c 6f 73 | 65 64 20 69 73 20 63 6f |.>Enclos|ed is co|
|00001c90| 6d 70 72 65 73 73 2e 63 | 20 76 65 72 73 69 6f 6e |mpress.c| version|
|00001ca0| 20 32 2e 30 20 77 69 74 | 68 20 74 68 65 20 66 6f | 2.0 wit|h the fo|
|00001cb0| 6c 6c 6f 77 69 6e 67 20 | 62 75 67 73 20 66 69 78 |llowing |bugs fix|
|00001cc0| 65 64 3a 0a 3e 0a 3e 31 | 2e 09 54 68 65 20 70 61 |ed:.>.>1|..The pa|
|00001cd0| 63 6b 65 64 20 66 69 6c | 65 73 20 70 72 6f 64 75 |cked fil|es produ|
|00001ce0| 63 65 64 20 62 79 20 63 | 6f 6d 70 72 65 73 73 20 |ced by c|ompress |
|00001cf0| 61 72 65 20 64 69 66 66 | 65 72 65 6e 74 20 6f 6e |are diff|erent on|
|00001d00| 20 64 69 66 66 65 72 65 | 6e 74 0a 3e 09 6d 61 63 | differe|nt.>.mac|
|00001d10| 68 69 6e 65 73 20 61 6e | 64 20 64 65 70 65 6e 64 |hines an|d depend|
|00001d20| 65 6e 74 20 6f 6e 20 74 | 68 65 20 76 61 78 20 73 |ent on t|he vax s|
|00001d30| 79 73 67 65 6e 20 6f 70 | 74 69 6f 6e 2e 0a 3e 09 |ysgen op|tion..>.|
|00001d40| 09 54 68 65 20 62 75 67 | 20 77 61 73 20 69 6e 20 |.The bug| was in |
|00001d50| 74 68 65 20 64 69 66 66 | 65 72 65 6e 74 20 62 79 |the diff|erent by|
|00001d60| 74 65 2f 62 69 74 20 6f | 72 64 65 72 69 6e 67 20 |te/bit o|rdering |
|00001d70| 6f 6e 20 74 68 65 0a 3e | 09 09 76 61 72 69 6f 75 |on the.>|..variou|
|00001d80| 73 20 6d 61 63 68 69 6e | 65 73 2e 20 20 54 68 69 |s machin|es. Thi|
|00001d90| 73 20 68 61 73 20 62 65 | 65 6e 20 66 69 78 65 64 |s has be|en fixed|
|00001da0| 2e 0a 3e 0a 3e 09 09 54 | 68 69 73 20 76 65 72 73 |..>.>..T|his vers|
|00001db0| 69 6f 6e 20 69 73 20 4e | 4f 54 20 63 6f 6d 70 61 |ion is N|OT compa|
|00001dc0| 74 69 62 6c 65 20 77 69 | 74 68 20 74 68 65 20 6f |tible wi|th the o|
|00001dd0| 72 69 67 69 6e 61 6c 20 | 76 61 78 20 70 6f 73 74 |riginal |vax post|
|00001de0| 69 6e 67 0a 3e 09 09 75 | 6e 6c 65 73 73 20 74 68 |ing.>..u|nless th|
|00001df0| 65 20 27 2d 44 43 4f 4d | 50 41 54 49 42 4c 45 27 |e '-DCOM|PATIBLE'|
|00001e00| 20 6f 70 74 69 6f 6e 20 | 69 73 20 73 70 65 63 69 | option |is speci|
|00001e10| 66 69 65 64 20 74 6f 20 | 74 68 65 20 43 0a 3e 09 |fied to |the C.>.|
|00001e20| 09 63 6f 6d 70 69 6c 65 | 72 2e 20 20 54 68 65 20 |.compile|r. The |
|00001e30| 6f 72 69 67 69 6e 61 6c | 20 70 6f 73 74 69 6e 67 |original| posting|
|00001e40| 20 68 61 73 20 61 20 62 | 75 67 20 77 68 69 63 68 | has a b|ug which|
|00001e50| 20 49 20 66 69 78 65 64 | 2c 20 0a 3e 09 09 63 61 | I fixed|, .>..ca|
|00001e60| 75 73 69 6e 67 20 69 6e | 63 6f 6d 70 61 74 69 62 |using in|compatib|
|00001e70| 6c 65 20 66 69 6c 65 73 | 2e 20 20 49 20 72 65 63 |le files|. I rec|
|00001e80| 6f 6d 6d 65 6e 64 20 79 | 6f 75 20 4e 4f 54 20 74 |ommend y|ou NOT t|
|00001e90| 6f 20 75 73 65 20 74 68 | 69 73 0a 3e 09 09 6f 70 |o use th|is.>..op|
|00001ea0| 74 69 6f 6e 20 75 6e 6c | 65 73 73 20 79 6f 75 20 |tion unl|ess you |
|00001eb0| 61 6c 72 65 61 64 79 20 | 68 61 76 65 20 61 20 6c |already |have a l|
|00001ec0| 6f 74 20 6f 66 20 70 61 | 63 6b 65 64 20 66 69 6c |ot of pa|cked fil|
|00001ed0| 65 73 20 66 72 6f 6d 0a | 3e 09 09 74 68 65 20 6f |es from.|>..the o|
|00001ee0| 72 69 67 69 6e 61 6c 20 | 70 6f 73 74 69 6e 67 20 |riginal |posting |
|00001ef0| 62 79 20 74 68 6f 6d 61 | 73 2e 0a 3e 32 2e 09 54 |by thoma|s..>2..T|
|00001f00| 68 65 20 65 78 69 74 20 | 73 74 61 74 75 73 20 69 |he exit |status i|
|00001f10| 73 20 6e 6f 74 20 77 65 | 6c 6c 20 64 65 66 69 6e |s not we|ll defin|
|00001f20| 65 64 20 28 6f 6e 20 73 | 6f 6d 65 20 6d 61 63 68 |ed (on s|ome mach|
|00001f30| 69 6e 65 73 29 20 63 61 | 75 73 69 6e 67 20 74 68 |ines) ca|using th|
|00001f40| 65 0a 3e 09 73 63 72 69 | 70 74 73 20 74 6f 20 66 |e.>.scri|pts to f|
|00001f50| 61 69 6c 2e 0a 3e 09 09 | 54 68 65 20 65 78 69 74 |ail..>..|The exit|
|00001f60| 20 73 74 61 74 75 73 20 | 69 73 20 6e 6f 77 20 30 | status |is now 0|
|00001f70| 2c 31 20 6f 72 20 32 20 | 61 6e 64 20 69 73 20 64 |,1 or 2 |and is d|
|00001f80| 6f 63 75 6d 65 6e 74 65 | 64 20 69 6e 0a 3e 09 09 |ocumente|d in.>..|
|00001f90| 63 6f 6d 70 72 65 73 73 | 2e 6c 2e 0a 3e 33 2e 09 |compress|.l..>3..|
|00001fa0| 54 68 65 20 66 75 6e 63 | 74 69 6f 6e 20 67 65 74 |The func|tion get|
|00001fb0| 6f 70 74 28 29 20 69 73 | 20 6e 6f 74 20 61 76 61 |opt() is| not ava|
|00001fc0| 69 6c 61 62 6c 65 20 69 | 6e 20 61 6c 6c 20 43 20 |ilable i|n all C |
|00001fd0| 6c 69 62 72 61 72 69 65 | 73 2e 0a 3e 09 09 54 68 |librarie|s..>..Th|
|00001fe0| 65 20 66 75 6e 63 74 69 | 6f 6e 20 67 65 74 6f 70 |e functi|on getop|
|00001ff0| 74 28 29 20 69 73 20 6e | 6f 20 6c 6f 6e 67 65 72 |t() is n|o longer|
|00002000| 20 72 65 66 65 72 65 6e | 63 65 64 20 62 79 20 74 | referen|ced by t|
|00002010| 68 65 0a 3e 09 09 70 72 | 6f 67 72 61 6d 2e 0a 3e |he.>..pr|ogram..>|
|00002020| 34 2e 09 45 72 72 6f 72 | 20 73 74 61 74 75 73 20 |4..Error| status |
|00002030| 69 73 20 6e 6f 74 20 62 | 65 69 6e 67 20 63 68 65 |is not b|eing che|
|00002040| 63 6b 65 64 20 6f 6e 20 | 74 68 65 20 66 77 72 69 |cked on |the fwri|
|00002050| 74 65 28 29 20 61 6e 64 | 20 66 66 6c 75 73 68 28 |te() and| fflush(|
|00002060| 29 20 63 61 6c 6c 73 2e | 0a 3e 09 09 46 69 78 65 |) calls.|.>..Fixe|
|00002070| 64 2e 0a 3e 0a 3e 54 68 | 65 20 66 6f 6c 6c 6f 77 |d..>.>Th|e follow|
|00002080| 69 6e 67 20 65 6e 68 61 | 6e 63 65 6d 65 6e 74 73 |ing enha|ncements|
|00002090| 20 68 61 76 65 20 62 65 | 65 6e 20 6d 61 64 65 3a | have be|en made:|
|000020a0| 0a 3e 0a 3e 31 2e 09 41 | 64 64 65 64 20 66 61 63 |.>.>1..A|dded fac|
|000020b0| 69 6c 69 74 69 65 73 20 | 6f 66 20 22 63 6f 6d 70 |ilities |of "comp|
|000020c0| 61 63 74 22 20 69 6e 74 | 6f 20 74 68 65 20 63 6f |act" int|o the co|
|000020d0| 6d 70 72 65 73 73 20 70 | 72 6f 67 72 61 6d 2e 20 |mpress p|rogram. |
|000020e0| 20 22 50 61 63 6b 22 2c | 0a 3e 09 22 55 6e 70 61 | "Pack",|.>."Unpa|
|000020f0| 63 6b 22 2c 20 61 6e 64 | 20 22 50 63 61 74 22 20 |ck", and| "Pcat" |
|00002100| 61 72 65 20 6e 6f 20 6c | 6f 6e 67 65 72 20 72 65 |are no l|onger re|
|00002110| 71 75 69 72 65 64 20 28 | 6e 6f 20 6c 6f 6e 67 65 |quired (|no longe|
|00002120| 72 20 73 75 70 70 6c 69 | 65 64 29 2e 0a 3e 32 2e |r suppli|ed)..>2.|
|00002130| 09 49 6e 73 74 61 6c 6c | 65 64 20 77 6f 72 6b 20 |.Install|ed work |
|00002140| 61 72 6f 75 6e 64 20 66 | 6f 72 20 43 20 63 6f 6d |around f|or C com|
|00002150| 70 69 6c 65 72 20 62 75 | 67 20 77 69 74 68 20 22 |piler bu|g with "|
|00002160| 2d 4f 22 2e 0a 3e 33 2e | 09 41 64 64 65 64 20 61 |-O"..>3.|.Added a|
|00002170| 20 6d 61 67 69 63 20 6e | 75 6d 62 65 72 20 68 65 | magic n|umber he|
|00002180| 61 64 65 72 20 28 5c 30 | 33 37 5c 32 33 35 29 2e |ader (\0|37\235).|
|00002190| 20 20 50 75 74 20 74 68 | 65 20 62 69 74 73 20 73 | Put th|e bits s|
|000021a0| 70 65 63 69 66 69 65 64 | 0a 3e 09 69 6e 20 74 68 |pecified|.>.in th|
|000021b0| 65 20 66 69 6c 65 2e 0a | 3e 34 2e 09 41 64 64 65 |e file..|>4..Adde|
|000021c0| 64 20 22 2d 66 22 20 66 | 6c 61 67 20 74 6f 20 66 |d "-f" f|lag to f|
|000021d0| 6f 72 63 65 20 6f 76 65 | 72 77 72 69 74 65 20 6f |orce ove|rwrite o|
|000021e0| 66 20 6f 75 74 70 75 74 | 20 66 69 6c 65 2e 0a 3e |f output| file..>|
|000021f0| 35 2e 09 41 64 64 65 64 | 20 22 2d 63 22 20 66 6c |5..Added| "-c" fl|
|00002200| 61 67 20 61 6e 64 20 22 | 7a 63 61 74 22 20 70 72 |ag and "|zcat" pr|
|00002210| 6f 67 72 61 6d 2e 20 20 | 27 6c 6e 20 63 6f 6d 70 |ogram. |'ln comp|
|00002220| 72 65 73 73 20 7a 63 61 | 74 27 20 61 66 74 65 72 |ress zca|t' after|
|00002230| 20 79 6f 75 0a 3e 09 63 | 6f 6d 70 69 6c 65 2e 0a | you.>.c|ompile..|
|00002240| 3e 36 2e 09 54 68 65 20 | 27 75 6e 63 6f 6d 70 72 |>6..The |'uncompr|
|00002250| 65 73 73 27 20 73 63 72 | 69 70 74 20 68 61 73 20 |ess' scr|ipt has |
|00002260| 62 65 65 6e 20 64 65 6c | 65 74 65 64 3b 20 73 69 |been del|eted; si|
|00002270| 6d 70 6c 79 20 0a 3e 09 | 27 6c 6e 20 63 6f 6d 70 |mply .>.|'ln comp|
|00002280| 72 65 73 73 20 75 6e 63 | 6f 6d 70 72 65 73 73 27 |ress unc|ompress'|
|00002290| 20 61 66 74 65 72 20 79 | 6f 75 20 63 6f 6d 70 69 | after y|ou compi|
|000022a0| 6c 65 20 61 6e 64 20 69 | 74 20 77 69 6c 6c 20 77 |le and i|t will w|
|000022b0| 6f 72 6b 2e 0a 3e 37 2e | 09 52 65 6d 6f 76 65 64 |ork..>7.|.Removed|
|000022c0| 20 65 78 74 72 61 20 62 | 69 74 20 6d 61 73 6b 69 | extra b|it maski|
|000022d0| 6e 67 20 66 6f 72 20 6d | 61 63 68 69 6e 65 73 20 |ng for m|achines |
|000022e0| 74 68 61 74 20 73 75 70 | 70 6f 72 74 20 75 6e 73 |that sup|port uns|
|000022f0| 69 67 6e 65 64 0a 3e 09 | 63 68 61 72 61 63 74 65 |igned.>.|characte|
|00002300| 72 73 2e 20 20 49 66 20 | 79 6f 75 72 20 6d 61 63 |rs. If |your mac|
|00002310| 68 69 6e 65 20 64 6f 65 | 73 6e 27 74 20 73 75 70 |hine doe|sn't sup|
|00002320| 70 6f 72 74 20 75 6e 73 | 69 67 6e 65 64 20 63 68 |port uns|igned ch|
|00002330| 61 72 61 63 74 65 72 73 | 2c 0a 3e 09 64 65 66 69 |aracters|,.>.defi|
|00002340| 6e 65 20 22 4e 4f 5f 55 | 43 48 41 52 22 20 77 68 |ne "NO_U|CHAR" wh|
|00002350| 65 6e 20 63 6f 6d 70 69 | 6c 69 6e 67 2e 0a 3e 0a |en compi|ling..>.|
|00002360| 3e 43 6f 6d 70 69 6c 65 | 20 22 63 6f 6d 70 72 65 |>Compile| "compre|
|00002370| 73 73 2e 63 22 20 77 69 | 74 68 20 22 2d 4f 20 2d |ss.c" wi|th "-O -|
|00002380| 6f 20 63 6f 6d 70 72 65 | 73 73 22 20 66 6c 61 67 |o compre|ss" flag|
|00002390| 73 2e 20 20 4d 6f 76 65 | 20 22 63 6f 6d 70 72 65 |s. Move| "compre|
|000023a0| 73 73 22 20 74 6f 20 61 | 0a 3e 73 74 61 6e 64 61 |ss" to a|.>standa|
|000023b0| 72 64 20 65 78 65 63 75 | 74 61 62 6c 65 20 6c 6f |rd execu|table lo|
|000023c0| 63 61 74 69 6f 6e 2c 20 | 73 75 63 68 20 61 73 20 |cation, |such as |
|000023d0| 2f 75 73 72 2f 6c 6f 63 | 61 6c 2e 20 20 54 68 65 |/usr/loc|al. The|
|000023e0| 6e 3a 0a 3e 09 63 64 20 | 2f 75 73 72 2f 6c 6f 63 |n:.>.cd |/usr/loc|
|000023f0| 61 6c 0a 3e 09 6c 6e 20 | 63 6f 6d 70 72 65 73 73 |al.>.ln |compress|
|00002400| 20 75 6e 63 6f 6d 70 72 | 65 73 73 0a 3e 09 6c 6e | uncompr|ess.>.ln|
|00002410| 20 63 6f 6d 70 72 65 73 | 73 20 7a 63 61 74 0a 3e | compres|s zcat.>|
|00002420| 0a 3e 4f 6e 20 6d 61 63 | 68 69 6e 65 73 20 74 68 |.>On mac|hines th|
|00002430| 61 74 20 68 61 76 65 20 | 61 20 66 69 78 65 64 20 |at have |a fixed |
|00002440| 73 74 61 63 6b 20 73 69 | 7a 65 20 28 73 75 63 68 |stack si|ze (such|
|00002450| 20 61 73 20 50 65 72 6b | 69 6e 2d 45 6c 6d 65 72 | as Perk|in-Elmer|
|00002460| 29 2c 20 73 65 74 20 74 | 68 65 0a 3e 73 74 61 63 |), set t|he.>stac|
|00002470| 6b 20 74 6f 20 61 74 20 | 6c 65 61 73 74 20 31 32 |k to at |least 12|
|00002480| 6b 62 2e 20 20 28 22 73 | 65 74 73 74 61 63 6b 20 |kb. ("s|etstack |
|00002490| 63 6f 6d 70 72 65 73 73 | 20 31 32 22 20 6f 6e 20 |compress| 12" on |
|000024a0| 50 65 72 6b 69 6e 2d 45 | 6c 6d 65 72 29 2e 0a 3e |Perkin-E|lmer)..>|
|000024b0| 0a 3e 4e 65 78 74 2c 20 | 69 6e 73 74 61 6c 6c 20 |.>Next, |install |
|000024c0| 74 68 65 20 6d 61 6e 75 | 61 6c 20 28 63 6f 6d 70 |the manu|al (comp|
|000024d0| 72 65 73 73 2e 6c 29 2e | 0a 3e 09 63 70 20 63 6f |ress.l).|.>.cp co|
|000024e0| 6d 70 72 65 73 73 2e 6c | 20 2f 75 73 72 2f 6d 61 |mpress.l| /usr/ma|
|000024f0| 6e 2f 6d 61 6e 6c 09 09 | 2d 20 6f 72 20 2d 0a 3e |n/manl..|- or -.>|
|00002500| 09 63 70 20 63 6f 6d 70 | 72 65 73 73 2e 6c 20 2f |.cp comp|ress.l /|
|00002510| 75 73 72 2f 6d 61 6e 2f | 6d 61 6e 31 2f 63 6f 6d |usr/man/|man1/com|
|00002520| 70 72 65 73 73 2e 31 0a | 3e 0a 3e 48 65 72 65 20 |press.1.|>.>Here |
|00002530| 69 73 20 74 68 65 20 52 | 45 41 44 4d 45 20 74 68 |is the R|EADME th|
|00002540| 61 74 20 49 20 73 65 6e | 74 20 77 69 74 68 20 6d |at I sen|t with m|
|00002550| 79 20 66 69 72 73 74 20 | 70 6f 73 74 69 6e 67 3a |y first |posting:|
|00002560| 0a 3e 0a 3e 3e 45 6e 63 | 6c 6f 73 65 64 20 69 73 |.>.>>Enc|losed is|
|00002570| 20 61 20 6d 6f 64 69 66 | 69 65 64 20 76 65 72 73 | a modif|ied vers|
|00002580| 69 6f 6e 20 6f 66 20 63 | 6f 6d 70 72 65 73 73 2e |ion of c|ompress.|
|00002590| 63 2c 20 61 6c 6f 6e 67 | 20 77 69 74 68 20 73 63 |c, along| with sc|
|000025a0| 72 69 70 74 73 20 74 6f | 20 6d 61 6b 65 20 69 74 |ripts to| make it|
|000025b0| 0a 3e 3e 72 75 6e 20 69 | 64 65 6e 74 69 63 61 6c |.>>run i|dentical|
|000025c0| 6c 79 20 74 6f 20 70 61 | 63 6b 28 31 29 2c 20 75 |ly to pa|ck(1), u|
|000025d0| 6e 70 61 63 6b 28 31 29 | 2c 20 61 6e 20 70 63 61 |npack(1)|, an pca|
|000025e0| 74 28 31 29 2e 20 20 48 | 65 72 65 20 69 73 20 77 |t(1). H|ere is w|
|000025f0| 68 61 74 20 49 0a 3e 3e | 28 70 65 74 73 64 21 6a |hat I.>>|(petsd!j|
|00002600| 6f 65 29 20 61 6e 64 20 | 61 20 63 6f 6c 6c 65 61 |oe) and |a collea|
|00002610| 67 75 65 20 28 70 65 74 | 73 64 21 70 65 6f 72 61 |gue (pet|sd!peora|
|00002620| 21 73 72 64 29 20 64 69 | 64 3a 0a 3e 3e 0a 3e 3e |!srd) di|d:.>>.>>|
|00002630| 31 2e 20 52 65 6d 6f 76 | 65 64 20 56 41 58 20 64 |1. Remov|ed VAX d|
|00002640| 65 70 65 6e 64 65 6e 63 | 69 65 73 2e 0a 3e 3e 32 |ependenc|ies..>>2|
|00002650| 2e 20 43 68 61 6e 67 65 | 64 20 74 68 65 20 73 74 |. Change|d the st|
|00002660| 72 75 63 74 20 74 6f 20 | 73 65 70 61 72 61 74 65 |ruct to |separate|
|00002670| 20 61 72 72 61 79 73 3b | 20 73 61 76 65 73 20 6d | arrays;| saves m|
|00002680| 75 63 68 6f 20 6d 65 6d | 6f 72 79 2e 0a 3e 3e 33 |ucho mem|ory..>>3|
|00002690| 2e 20 44 69 64 20 63 6f | 6d 70 61 72 69 73 6f 6e |. Did co|mparison|
|000026a0| 73 20 69 6e 20 75 6e 73 | 69 67 6e 65 64 2c 20 77 |s in uns|igned, w|
|000026b0| 68 65 72 65 20 70 6f 73 | 73 69 62 6c 65 2e 20 20 |here pos|sible. |
|000026c0| 28 46 61 73 74 65 72 20 | 6f 6e 20 50 65 72 6b 69 |(Faster |on Perki|
|000026d0| 6e 2d 45 6c 6d 65 72 2e | 29 0a 3e 3e 34 2e 20 53 |n-Elmer.|).>>4. S|
|000026e0| 6f 72 74 65 64 20 74 68 | 65 20 63 68 61 72 61 63 |orted th|e charac|
|000026f0| 74 65 72 20 6e 65 78 74 | 20 63 68 61 69 6e 20 61 |ter next| chain a|
|00002700| 6e 64 20 63 68 61 6e 67 | 65 64 20 74 68 65 20 73 |nd chang|ed the s|
|00002710| 65 61 72 63 68 20 74 6f | 20 73 74 6f 70 0a 3e 3e |earch to| stop.>>|
|00002720| 70 72 65 6d 61 74 75 72 | 65 6c 79 2e 20 20 54 68 |prematur|ely. Th|
|00002730| 69 73 20 73 61 76 65 73 | 20 61 20 6c 6f 74 20 6f |is saves| a lot o|
|00002740| 6e 20 74 68 65 20 65 78 | 65 63 75 74 69 6f 6e 20 |n the ex|ecution |
|00002750| 74 69 6d 65 20 77 68 65 | 6e 20 63 6f 6d 70 72 65 |time whe|n compre|
|00002760| 73 73 69 6e 67 2e 0a 3e | 3e 0a 3e 3e 54 68 69 73 |ssing..>|>.>>This|
|00002770| 20 76 65 72 73 69 6f 6e | 20 69 73 20 74 6f 74 61 | version| is tota|
|00002780| 6c 6c 79 20 63 6f 6d 70 | 61 74 69 62 6c 65 20 77 |lly comp|atible w|
|00002790| 69 74 68 20 74 68 65 20 | 6f 72 69 67 69 6e 61 6c |ith the |original|
|000027a0| 20 76 65 72 73 69 6f 6e | 2e 20 20 45 76 65 6e 20 | version|. Even |
|000027b0| 74 68 6f 75 67 68 0a 3e | 3e 6c 69 6e 74 28 31 29 |though.>|>lint(1)|
|000027c0| 20 2d 70 20 68 61 73 20 | 6e 6f 20 63 6f 6d 70 6c | -p has |no compl|
|000027d0| 61 69 6e 74 73 20 61 62 | 6f 75 74 20 63 6f 6d 70 |aints ab|out comp|
|000027e0| 72 65 73 73 2e 63 2c 20 | 69 74 20 77 6f 6e 27 74 |ress.c, |it won't|
|000027f0| 20 72 75 6e 20 6f 6e 20 | 61 20 31 36 2d 62 69 74 | run on |a 16-bit|
|00002800| 0a 3e 3e 6d 61 63 68 69 | 6e 65 2c 20 64 75 65 20 |.>>machi|ne, due |
|00002810| 74 6f 20 74 68 65 20 73 | 69 7a 65 20 6f 66 20 74 |to the s|ize of t|
|00002820| 68 65 20 61 72 72 61 79 | 73 2e 0a 3e 3e 0a 3e 3e |he array|s..>>.>>|
|00002830| 48 65 72 65 20 69 73 20 | 74 68 65 20 52 45 41 44 |Here is |the READ|
|00002840| 4d 45 20 66 69 6c 65 20 | 66 72 6f 6d 20 74 68 65 |ME file |from the|
|00002850| 20 6f 72 69 67 69 6e 61 | 6c 20 61 75 74 68 6f 72 | origina|l author|
|00002860| 3a 0a 3e 3e 20 0a 3e 3e | 3e 57 65 6c 6c 2c 20 77 |:.>> .>>|>Well, w|
|00002870| 69 74 68 20 61 6c 6c 20 | 74 68 69 73 20 64 69 73 |ith all |this dis|
|00002880| 63 75 73 73 69 6f 6e 20 | 61 62 6f 75 74 20 66 69 |cussion |about fi|
|00002890| 6c 65 20 63 6f 6d 70 72 | 65 73 73 69 6f 6e 20 28 |le compr|ession (|
|000028a0| 66 6f 72 20 6e 65 77 73 | 20 62 61 74 63 68 69 6e |for news| batchin|
|000028b0| 67 0a 3e 3e 3e 69 6e 20 | 70 61 72 74 69 63 75 6c |g.>>>in |particul|
|000028c0| 61 72 29 20 67 6f 69 6e | 67 20 61 72 6f 75 6e 64 |ar) goin|g around|
|000028d0| 2c 20 49 20 64 65 63 69 | 64 65 64 20 74 6f 20 69 |, I deci|ded to i|
|000028e0| 6d 70 6c 65 6d 65 6e 74 | 20 74 68 65 20 74 65 78 |mplement| the tex|
|000028f0| 74 20 63 6f 6d 70 72 65 | 73 73 69 6f 6e 0a 3e 3e |t compre|ssion.>>|
|00002900| 3e 61 6c 67 6f 72 69 74 | 68 6d 20 64 65 73 63 72 |>algorit|hm descr|
|00002910| 69 62 65 64 20 69 6e 20 | 74 68 65 20 4a 75 6e 65 |ibed in |the June|
|00002920| 20 43 6f 6d 70 75 74 65 | 72 20 6d 61 67 61 7a 69 | Compute|r magazi|
|00002930| 6e 65 2e 20 20 54 68 65 | 20 61 75 74 68 6f 72 20 |ne. The| author |
|00002940| 63 6c 61 69 6d 65 64 0a | 3e 3e 3e 62 6c 69 6e 64 |claimed.|>>>blind|
|00002950| 69 6e 67 20 73 70 65 65 | 64 20 61 6e 64 20 67 6f |ing spee|d and go|
|00002960| 6f 64 20 63 6f 6d 70 72 | 65 73 73 69 6f 6e 20 72 |od compr|ession r|
|00002970| 61 74 69 6f 73 2e 20 20 | 49 74 27 73 20 63 65 72 |atios. |It's cer|
|00002980| 74 61 69 6e 6c 79 20 66 | 61 73 74 65 72 20 74 68 |tainly f|aster th|
|00002990| 61 6e 0a 3e 3e 3e 63 6f | 6d 70 61 63 74 20 28 62 |an.>>>co|mpact (b|
|000029a0| 75 74 2c 20 74 68 65 6e | 2c 20 77 68 61 74 20 77 |ut, then|, what w|
|000029b0| 6f 75 6c 64 6e 27 74 20 | 62 65 29 2c 20 62 75 74 |ouldn't |be), but|
|000029c0| 20 69 74 27 73 20 61 6c | 73 6f 20 74 68 65 20 73 | it's al|so the s|
|000029d0| 61 6d 65 20 73 70 65 65 | 64 20 61 73 0a 3e 3e 3e |ame spee|d as.>>>|
|000029e0| 70 61 63 6b 2c 20 61 6e | 64 20 67 65 74 73 20 62 |pack, an|d gets b|
|000029f0| 65 74 74 65 72 20 63 6f | 6d 70 72 65 73 73 69 6f |etter co|mpressio|
|00002a00| 6e 20 74 68 61 6e 20 62 | 6f 74 68 20 6f 66 20 74 |n than b|oth of t|
|00002a10| 68 65 6d 2e 20 20 4f 6e | 20 33 35 30 4b 20 62 79 |hem. On| 350K by|
|00002a20| 74 65 73 20 6f 66 0a 3e | 3e 3e 75 6e 69 78 2d 77 |tes of.>|>>unix-w|
|00002a30| 69 7a 61 72 64 73 2c 20 | 63 6f 6d 70 61 63 74 20 |izards, |compact |
|00002a40| 74 6f 6f 6b 20 61 62 6f | 75 74 20 38 20 6d 69 6e |took abo|ut 8 min|
|00002a50| 75 74 65 73 20 6f 66 20 | 43 50 55 2c 20 70 61 63 |utes of |CPU, pac|
|00002a60| 6b 20 74 6f 6f 6b 20 61 | 62 6f 75 74 20 38 30 0a |k took a|bout 80.|
|00002a70| 3e 3e 3e 73 65 63 6f 6e | 64 73 2c 20 61 6e 64 20 |>>>secon|ds, and |
|00002a80| 63 6f 6d 70 72 65 73 73 | 20 28 68 65 72 65 69 6e |compress| (herein|
|00002a90| 29 20 61 6c 73 6f 20 74 | 6f 6f 6b 20 38 30 20 73 |) also t|ook 80 s|
|00002aa0| 65 63 6f 6e 64 73 2e 20 | 20 42 75 74 2c 20 63 6f |econds. | But, co|
|00002ab0| 6d 70 61 63 74 20 61 6e | 64 0a 3e 3e 3e 70 61 63 |mpact an|d.>>>pac|
|00002ac0| 6b 20 67 6f 74 20 61 62 | 6f 75 74 20 33 30 25 20 |k got ab|out 30% |
|00002ad0| 63 6f 6d 70 72 65 73 73 | 69 6f 6e 2c 20 77 68 65 |compress|ion, whe|
|00002ae0| 72 65 61 73 20 63 6f 6d | 70 72 65 73 73 20 67 6f |reas com|press go|
|00002af0| 74 20 6f 76 65 72 20 35 | 30 25 2e 20 20 53 6f 2c |t over 5|0%. So,|
|00002b00| 20 49 0a 3e 3e 3e 64 65 | 63 69 64 65 64 20 49 20 | I.>>>de|cided I |
|00002b10| 68 61 64 20 73 6f 6d 65 | 74 68 69 6e 67 2c 20 61 |had some|thing, a|
|00002b20| 6e 64 20 74 68 61 74 20 | 6f 74 68 65 72 73 20 6d |nd that |others m|
|00002b30| 69 67 68 74 20 62 65 20 | 69 6e 74 65 72 65 73 74 |ight be |interest|
|00002b40| 65 64 2c 20 74 6f 6f 2e | 0a 3e 3e 3e 0a 3e 3e 3e |ed, too.|.>>>.>>>|
|00002b50| 41 73 20 69 73 20 70 72 | 6f 62 61 62 6c 79 20 74 |As is pr|obably t|
|00002b60| 72 75 65 20 6f 66 20 63 | 6f 6d 70 61 63 74 20 61 |rue of c|ompact a|
|00002b70| 6e 64 20 70 61 63 6b 20 | 28 61 6c 74 68 6f 75 67 |nd pack |(althoug|
|00002b80| 68 20 49 20 68 61 76 65 | 6e 27 74 20 63 68 65 63 |h I have|n't chec|
|00002b90| 6b 65 64 29 2c 0a 3e 3e | 3e 74 68 65 20 62 79 74 |ked),.>>|>the byt|
|00002ba0| 65 20 6f 72 64 65 72 20 | 77 69 74 68 69 6e 20 61 |e order |within a|
|00002bb0| 20 77 6f 72 64 20 69 73 | 20 70 72 6f 62 61 62 6c | word is| probabl|
|00002bc0| 79 20 72 65 6c 65 76 61 | 6e 74 20 68 65 72 65 2c |y releva|nt here,|
|00002bd0| 20 62 75 74 20 61 73 20 | 6c 6f 6e 67 20 61 73 0a | but as |long as.|
|00002be0| 3e 3e 3e 79 6f 75 20 73 | 74 61 79 20 6f 6e 20 61 |>>>you s|tay on a|
|00002bf0| 20 73 69 6e 67 6c 65 20 | 6d 61 63 68 69 6e 65 20 | single |machine |
|00002c00| 74 79 70 65 2c 20 79 6f | 75 20 73 68 6f 75 6c 64 |type, yo|u should|
|00002c10| 20 62 65 20 6f 6b 2e 20 | 20 28 43 61 6e 20 61 6e | be ok. | (Can an|
|00002c20| 79 62 6f 64 79 0a 3e 3e | 3e 65 6c 75 63 69 64 61 |ybody.>>|>elucida|
|00002c30| 74 65 20 6f 6e 20 74 68 | 69 73 3f 29 20 20 54 68 |te on th|is?) Th|
|00002c40| 65 72 65 20 61 72 65 20 | 61 20 63 6f 75 70 6c 65 |ere are |a couple|
|00002c50| 20 6f 66 20 61 73 6d 27 | 73 20 69 6e 20 74 68 65 | of asm'|s in the|
|00002c60| 20 63 6f 64 65 20 28 65 | 78 74 76 20 61 6e 64 0a | code (e|xtv and.|
|00002c70| 3e 3e 3e 69 6e 73 76 20 | 69 6e 73 74 72 75 63 74 |>>>insv |instruct|
|00002c80| 69 6f 6e 73 29 2c 20 73 | 6f 20 61 6e 79 6f 6e 65 |ions), s|o anyone|
|00002c90| 20 70 6f 72 74 69 6e 67 | 20 69 74 20 74 6f 20 61 | porting| it to a|
|00002ca0| 6e 6f 74 68 65 72 20 6d | 61 63 68 69 6e 65 20 77 |nother m|achine w|
|00002cb0| 69 6c 6c 20 68 61 76 65 | 20 74 6f 0a 3e 3e 3e 64 |ill have| to.>>>d|
|00002cc0| 65 61 6c 20 77 69 74 68 | 20 74 68 69 73 20 61 6e |eal with| this an|
|00002cd0| 79 77 61 79 20 28 61 6e | 64 20 63 6f 75 6c 64 20 |yway (an|d could |
|00002ce0| 70 72 6f 62 61 62 6c 79 | 20 6d 61 6b 65 20 69 74 |probably| make it|
|00002cf0| 20 63 6f 6d 70 61 74 69 | 62 6c 65 20 77 69 74 68 | compati|ble with|
|00002d00| 20 56 61 78 0a 3e 3e 3e | 62 79 74 65 20 6f 72 64 | Vax.>>>|byte ord|
|00002d10| 65 72 20 61 74 20 74 68 | 65 20 73 61 6d 65 20 74 |er at th|e same t|
|00002d20| 69 6d 65 29 2e 20 20 41 | 6e 79 77 61 79 2c 20 49 |ime). A|nyway, I|
|00002d30| 27 76 65 20 6c 69 6e 74 | 65 64 20 74 68 65 20 63 |'ve lint|ed the c|
|00002d40| 6f 64 65 20 28 62 6f 74 | 68 20 77 69 74 68 0a 3e |ode (bot|h with.>|
|00002d50| 3e 3e 61 6e 64 20 77 69 | 74 68 6f 75 74 20 2d 70 |>>and wi|thout -p|
|00002d60| 29 2c 20 73 6f 20 69 74 | 20 73 68 6f 75 6c 64 20 |), so it| should |
|00002d70| 72 75 6e 20 65 6c 73 65 | 77 68 65 72 65 2e 20 20 |run else|where. |
|00002d80| 4e 6f 74 65 20 74 68 65 | 20 6c 6f 6e 67 73 20 69 |Note the| longs i|
|00002d90| 6e 20 74 68 65 0a 3e 3e | 3e 63 6f 64 65 2c 20 79 |n the.>>|>code, y|
|00002da0| 6f 75 20 63 61 6e 20 74 | 61 6b 65 20 74 68 65 73 |ou can t|ake thes|
|00002db0| 65 20 6f 75 74 20 69 66 | 20 79 6f 75 20 72 65 64 |e out if| you red|
|00002dc0| 75 63 65 20 42 49 54 53 | 20 74 6f 20 3c 3d 20 31 |uce BITS| to <= 1|
|00002dd0| 35 2e 0a 3e 3e 3e 0a 3e | 3e 3e 48 61 76 65 20 66 |5..>>>.>|>>Have f|
|00002de0| 75 6e 2c 20 61 6e 64 20 | 61 73 20 61 6c 77 61 79 |un, and |as alway|
|00002df0| 73 2c 20 69 66 20 79 6f | 75 20 6d 61 6b 65 20 67 |s, if yo|u make g|
|00002e00| 6f 6f 64 20 65 6e 68 61 | 6e 63 65 6d 65 6e 74 73 |ood enha|ncements|
|00002e10| 2c 20 6f 72 20 62 75 67 | 20 66 69 78 65 73 2c 0a |, or bug| fixes,.|
|00002e20| 3e 3e 3e 49 27 64 20 6c | 69 6b 65 20 74 6f 20 73 |>>>I'd l|ike to s|
|00002e30| 65 65 20 74 68 65 6d 2e | 0a 3e 3e 3e 0a 3e 3e 3e |ee them.|.>>>.>>>|
|00002e40| 3d 53 70 65 6e 63 65 72 | 20 28 74 68 6f 6d 61 73 |=Spencer| (thomas|
|00002e50| 40 75 74 61 68 2d 32 30 | 2c 20 7b 68 61 72 70 6f |@utah-20|, {harpo|
|00002e60| 2c 68 70 6c 61 62 73 2c | 61 72 69 7a 6f 6e 61 7d |,hplabs,|arizona}|
|00002e70| 21 75 74 61 68 2d 63 73 | 21 74 68 6f 6d 61 73 29 |!utah-cs|!thomas)|
|00002e80| 0a 3e 3e 0a 3e 3e 09 09 | 09 09 09 72 65 67 61 72 |.>>.>>..|...regar|
|00002e90| 64 73 2c 0a 3e 3e 09 09 | 09 09 09 6a 6f 65 0a 3e |ds,.>>..|...joe.>|
|00002ea0| 3e 0a 3e 3e 2d 2d 0a 3e | 3e 46 75 6c 6c 2d 4e 61 |>.>>--.>|>Full-Na|
|00002eb0| 6d 65 3a 20 20 4a 6f 73 | 65 70 68 20 4d 2e 20 4f |me: Jos|eph M. O|
|00002ec0| 72 6f 73 74 0a 3e 3e 55 | 55 43 50 3a 20 20 20 20 |rost.>>U|UCP: |
|00002ed0| 20 20 20 2e 2e 21 7b 64 | 65 63 76 61 78 2c 75 63 | ..!{d|ecvax,uc|
|00002ee0| 62 76 61 78 2c 69 68 6e | 70 34 7d 21 76 61 78 31 |bvax,ihn|p4}!vax1|
|00002ef0| 33 35 21 70 65 74 73 64 | 21 6a 6f 65 0a 3e 3e 55 |35!petsd|!joe.>>U|
|00002f00| 53 20 4d 61 69 6c 3a 20 | 20 20 20 4d 53 20 33 31 |S Mail: | MS 31|
|00002f10| 33 3b 20 50 65 72 6b 69 | 6e 2d 45 6c 6d 65 72 3b |3; Perki|n-Elmer;|
|00002f20| 20 31 30 36 20 41 70 70 | 6c 65 20 53 74 3b 20 54 | 106 App|le St; T|
|00002f30| 69 6e 74 6f 6e 20 46 61 | 6c 6c 73 2c 20 4e 4a 20 |inton Fa|lls, NJ |
|00002f40| 30 37 37 32 34 0a 3e 3e | 50 68 6f 6e 65 3a 20 20 |07724.>>|Phone: |
|00002f50| 20 20 20 20 28 32 30 31 | 29 20 38 37 30 2d 35 38 | (201|) 870-58|
|00002f60| 34 34 0a 41 6c 42 65 52 | 74 45 69 4e 73 54 65 49 |44.AlBeR|tEiNsTeI|
|00002f70| 6e 0a 65 63 68 6f 20 75 | 6e 62 75 6e 64 6c 69 6e |n.echo u|nbundlin|
|00002f80| 67 20 55 53 45 52 4d 45 | 4d 20 31 3e 26 32 0a 63 |g USERME|M 1>&2.c|
|00002f90| 61 74 20 3e 55 53 45 52 | 4d 45 4d 20 3c 3c 27 41 |at >USER|MEM <<'A|
|00002fa0| 6c 42 65 52 74 45 69 4e | 73 54 65 49 6e 27 0a 31 |lBeRtEiN|sTeIn'.1|
|00002fb0| 31 37 30 30 30 30 0a 41 | 6c 42 65 52 74 45 69 4e |170000.A|lBeRtEiN|
|00002fc0| 73 54 65 49 6e 0a 65 63 | 68 6f 20 75 6e 62 75 6e |sTeIn.ec|ho unbun|
|00002fd0| 64 6c 69 6e 67 20 63 6f | 6d 70 72 65 73 73 2e 31 |dling co|mpress.1|
|00002fe0| 20 31 3e 26 32 0a 63 61 | 74 20 3e 63 6f 6d 70 72 | 1>&2.ca|t >compr|
|00002ff0| 65 73 73 2e 31 20 3c 3c | 27 41 6c 42 65 52 74 45 |ess.1 <<|'AlBeRtE|
|00003000| 69 4e 73 54 65 49 6e 27 | 0a 2e 5c 22 09 40 28 23 |iNsTeIn'|..\".@(#|
|00003010| 29 63 6f 6d 70 72 65 73 | 73 2e 31 09 36 2e 33 20 |)compres|s.1.6.3 |
|00003020| 28 42 65 72 6b 65 6c 65 | 79 29 20 39 2f 31 37 2f |(Berkele|y) 9/17/|
|00003030| 38 35 0a 2e 5c 22 0a 2e | 54 48 20 43 4f 4d 50 52 |85..\"..|TH COMPR|
|00003040| 45 53 53 20 31 20 22 53 | 65 70 74 65 6d 62 65 72 |ESS 1 "S|eptember|
|00003050| 20 31 37 2c 20 31 39 38 | 35 22 0a 2e 55 43 20 36 | 17, 198|5"..UC 6|
|00003060| 0a 2e 53 48 20 4e 41 4d | 45 0a 63 6f 6d 70 72 65 |..SH NAM|E.compre|
|00003070| 73 73 2c 20 75 6e 63 6f | 6d 70 72 65 73 73 2c 20 |ss, unco|mpress, |
|00003080| 7a 63 61 74 20 5c 2d 20 | 63 6f 6d 70 72 65 73 73 |zcat \- |compress|
|00003090| 20 61 6e 64 20 65 78 70 | 61 6e 64 20 64 61 74 61 | and exp|and data|
|000030a0| 0a 2e 50 55 0a 2e 53 48 | 20 53 59 4e 4f 50 53 49 |..PU..SH| SYNOPSI|
|000030b0| 53 0a 2e 6c 6c 20 2b 38 | 0a 2e 42 20 63 6f 6d 70 |S..ll +8|..B comp|
|000030c0| 72 65 73 73 0a 5b 0a 2e | 42 20 5c 2d 66 0a 5d 20 |ress.[..|B \-f.] |
|000030d0| 5b 0a 2e 42 20 5c 2d 76 | 0a 5d 20 5b 0a 2e 42 20 |[..B \-v|.] [..B |
|000030e0| 5c 2d 63 0a 5d 20 5b 0a | 2e 42 20 5c 2d 62 0a 2e |\-c.] [.|.B \-b..|
|000030f0| 49 20 62 69 74 73 0a 5d | 20 5b 0a 2e 49 20 22 6e |I bits.]| [..I "n|
|00003100| 61 6d 65 20 5c 26 2e 2e | 2e 22 0a 5d 0a 2e 6c 6c |ame \&..|.".]..ll|
|00003110| 20 2d 38 0a 2e 62 72 0a | 2e 42 20 75 6e 63 6f 6d | -8..br.|.B uncom|
|00003120| 70 72 65 73 73 0a 5b 0a | 2e 42 20 5c 2d 66 0a 5d |press.[.|.B \-f.]|
|00003130| 20 5b 0a 2e 42 20 5c 2d | 76 0a 5d 20 5b 0a 2e 42 | [..B \-|v.] [..B|
|00003140| 20 5c 2d 63 0a 5d 20 5b | 0a 2e 49 20 22 6e 61 6d | \-c.] [|..I "nam|
|00003150| 65 20 5c 26 2e 2e 2e 22 | 0a 5d 0a 2e 62 72 0a 2e |e \&..."|.]..br..|
|00003160| 42 20 7a 63 61 74 0a 5b | 0a 2e 49 20 22 6e 61 6d |B zcat.[|..I "nam|
|00003170| 65 20 5c 26 2e 2e 2e 22 | 0a 5d 0a 2e 53 48 20 44 |e \&..."|.]..SH D|
|00003180| 45 53 43 52 49 50 54 49 | 4f 4e 0a 2e 49 20 43 6f |ESCRIPTI|ON..I Co|
|00003190| 6d 70 72 65 73 73 0a 72 | 65 64 75 63 65 73 20 74 |mpress.r|educes t|
|000031a0| 68 65 20 73 69 7a 65 20 | 6f 66 20 74 68 65 20 6e |he size |of the n|
|000031b0| 61 6d 65 64 20 66 69 6c | 65 73 20 75 73 69 6e 67 |amed fil|es using|
|000031c0| 20 61 64 61 70 74 69 76 | 65 20 4c 65 6d 70 65 6c | adaptiv|e Lempel|
|000031d0| 2d 5a 69 76 20 63 6f 64 | 69 6e 67 2e 0a 57 68 65 |-Ziv cod|ing..Whe|
|000031e0| 6e 65 76 65 72 20 70 6f | 73 73 69 62 6c 65 2c 0a |never po|ssible,.|
|000031f0| 65 61 63 68 20 66 69 6c | 65 20 69 73 20 72 65 70 |each fil|e is rep|
|00003200| 6c 61 63 65 64 20 62 79 | 20 6f 6e 65 20 77 69 74 |laced by| one wit|
|00003210| 68 20 74 68 65 20 65 78 | 74 65 6e 73 69 6f 6e 0a |h the ex|tension.|
|00003220| 2e 42 20 22 5c 26 2e 5a | 2c 22 0a 77 68 69 6c 65 |.B "\&.Z|,".while|
|00003230| 20 6b 65 65 70 69 6e 67 | 20 74 68 65 20 73 61 6d | keeping| the sam|
|00003240| 65 20 6f 77 6e 65 72 73 | 68 69 70 20 6d 6f 64 65 |e owners|hip mode|
|00003250| 73 2c 20 61 63 63 65 73 | 73 20 61 6e 64 20 6d 6f |s, acces|s and mo|
|00003260| 64 69 66 69 63 61 74 69 | 6f 6e 20 74 69 6d 65 73 |dificati|on times|
|00003270| 2e 0a 49 66 20 6e 6f 20 | 66 69 6c 65 73 20 61 72 |..If no |files ar|
|00003280| 65 20 73 70 65 63 69 66 | 69 65 64 2c 20 74 68 65 |e specif|ied, the|
|00003290| 20 73 74 61 6e 64 61 72 | 64 20 69 6e 70 75 74 20 | standar|d input |
|000032a0| 69 73 20 63 6f 6d 70 72 | 65 73 73 65 64 20 74 6f |is compr|essed to|
|000032b0| 20 74 68 65 0a 73 74 61 | 6e 64 61 72 64 20 6f 75 | the.sta|ndard ou|
|000032c0| 74 70 75 74 2e 0a 43 6f | 6d 70 72 65 73 73 65 64 |tput..Co|mpressed|
|000032d0| 20 66 69 6c 65 73 20 63 | 61 6e 20 62 65 20 72 65 | files c|an be re|
|000032e0| 73 74 6f 72 65 64 20 74 | 6f 20 74 68 65 69 72 20 |stored t|o their |
|000032f0| 6f 72 69 67 69 6e 61 6c | 20 66 6f 72 6d 20 75 73 |original| form us|
|00003300| 69 6e 67 0a 2e 49 20 75 | 6e 63 6f 6d 70 72 65 73 |ing..I u|ncompres|
|00003310| 73 0a 6f 72 0a 2e 49 20 | 7a 63 61 74 2e 0a 2e 50 |s.or..I |zcat...P|
|00003320| 50 0a 54 68 65 0a 2e 42 | 20 5c 2d 66 0a 6f 70 74 |P.The..B| \-f.opt|
|00003330| 69 6f 6e 20 77 69 6c 6c | 20 66 6f 72 63 65 20 63 |ion will| force c|
|00003340| 6f 6d 70 72 65 73 73 69 | 6f 6e 20 6f 66 0a 2e 49 |ompressi|on of..I|
|00003350| 20 6e 61 6d 65 2e 0a 54 | 68 69 73 20 69 73 20 75 | name..T|his is u|
|00003360| 73 65 66 75 6c 20 66 6f | 72 20 63 6f 6d 70 72 65 |seful fo|r compre|
|00003370| 73 73 69 6e 67 20 61 6e | 20 65 6e 74 69 72 65 20 |ssing an| entire |
|00003380| 64 69 72 65 63 74 6f 72 | 79 2c 0a 65 76 65 6e 20 |director|y,.even |
|00003390| 69 66 20 73 6f 6d 65 20 | 6f 66 20 74 68 65 20 66 |if some |of the f|
|000033a0| 69 6c 65 73 20 64 6f 20 | 6e 6f 74 20 61 63 74 75 |iles do |not actu|
|000033b0| 61 6c 6c 79 20 73 68 72 | 69 6e 6b 2e 0a 49 66 0a |ally shr|ink..If.|
|000033c0| 2e 42 20 5c 2d 66 0a 69 | 73 20 6e 6f 74 20 67 69 |.B \-f.i|s not gi|
|000033d0| 76 65 6e 20 61 6e 64 0a | 2e 49 20 63 6f 6d 70 72 |ven and.|.I compr|
|000033e0| 65 73 73 0a 69 73 20 72 | 75 6e 20 69 6e 20 74 68 |ess.is r|un in th|
|000033f0| 65 20 66 6f 72 65 67 72 | 6f 75 6e 64 2c 0a 74 68 |e foregr|ound,.th|
|00003400| 65 20 75 73 65 72 20 69 | 73 20 70 72 6f 6d 70 74 |e user i|s prompt|
|00003410| 65 64 20 61 73 20 74 6f | 20 77 68 65 74 68 65 72 |ed as to| whether|
|00003420| 20 61 6e 20 65 78 69 73 | 74 69 6e 67 20 66 69 6c | an exis|ting fil|
|00003430| 65 20 73 68 6f 75 6c 64 | 20 62 65 20 6f 76 65 72 |e should| be over|
|00003440| 77 72 69 74 74 65 6e 2e | 0a 2e 50 50 0a 54 68 65 |written.|..PP.The|
|00003450| 0a 2e 42 20 5c 2d 63 0a | 28 60 60 63 61 74 27 27 |..B \-c.|(``cat''|
|00003460| 29 20 6f 70 74 69 6f 6e | 20 6d 61 6b 65 73 0a 2e |) option| makes..|
|00003470| 49 20 63 6f 6d 70 72 65 | 73 73 2f 75 6e 63 6f 6d |I compre|ss/uncom|
|00003480| 70 72 65 73 73 0a 77 72 | 69 74 65 20 74 6f 20 74 |press.wr|ite to t|
|00003490| 68 65 20 73 74 61 6e 64 | 61 72 64 20 6f 75 74 70 |he stand|ard outp|
|000034a0| 75 74 3b 20 6e 6f 20 66 | 69 6c 65 73 20 61 72 65 |ut; no f|iles are|
|000034b0| 20 63 68 61 6e 67 65 64 | 2e 0a 54 68 65 20 6e 6f | changed|..The no|
|000034c0| 6e 64 65 73 74 72 75 63 | 74 69 76 65 20 62 65 68 |ndestruc|tive beh|
|000034d0| 61 76 69 6f 72 20 6f 66 | 0a 2e 49 20 7a 63 61 74 |avior of|..I zcat|
|000034e0| 0a 69 73 20 69 64 65 6e | 74 69 63 61 6c 20 74 6f |.is iden|tical to|
|000034f0| 20 74 68 61 74 20 6f 66 | 0a 2e 49 20 75 6e 63 6f | that of|..I unco|
|00003500| 6d 70 72 65 73 73 0a 2e | 42 20 5c 2d 63 2e 0a 2e |mpress..|B \-c...|
|00003510| 50 50 0a 2e 49 20 43 6f | 6d 70 72 65 73 73 0a 75 |PP..I Co|mpress.u|
|00003520| 73 65 73 20 74 68 65 20 | 6d 6f 64 69 66 69 65 64 |ses the |modified|
|00003530| 20 4c 65 6d 70 65 6c 2d | 5a 69 76 20 61 6c 67 6f | Lempel-|Ziv algo|
|00003540| 72 69 74 68 6d 20 70 6f | 70 75 6c 61 72 69 7a 65 |rithm po|pularize|
|00003550| 64 20 69 6e 0a 22 41 20 | 54 65 63 68 6e 69 71 75 |d in."A |Techniqu|
|00003560| 65 20 66 6f 72 20 48 69 | 67 68 20 50 65 72 66 6f |e for Hi|gh Perfo|
|00003570| 72 6d 61 6e 63 65 20 44 | 61 74 61 20 43 6f 6d 70 |rmance D|ata Comp|
|00003580| 72 65 73 73 69 6f 6e 22 | 2c 0a 54 65 72 72 79 20 |ression"|,.Terry |
|00003590| 41 2e 20 57 65 6c 63 68 | 2c 0a 2e 49 20 22 49 45 |A. Welch|,..I "IE|
|000035a0| 45 45 20 43 6f 6d 70 75 | 74 65 72 2c 22 0a 76 6f |EE Compu|ter,".vo|
|000035b0| 6c 2e 20 31 37 2c 20 6e | 6f 2e 20 36 20 28 4a 75 |l. 17, n|o. 6 (Ju|
|000035c0| 6e 65 20 31 39 38 34 29 | 2c 20 70 70 2e 20 38 2d |ne 1984)|, pp. 8-|
|000035d0| 31 39 2e 0a 43 6f 6d 6d | 6f 6e 20 73 75 62 73 74 |19..Comm|on subst|
|000035e0| 72 69 6e 67 73 20 69 6e | 20 74 68 65 20 66 69 6c |rings in| the fil|
|000035f0| 65 20 61 72 65 20 66 69 | 72 73 74 20 72 65 70 6c |e are fi|rst repl|
|00003600| 61 63 65 64 20 62 79 20 | 39 2d 62 69 74 20 63 6f |aced by |9-bit co|
|00003610| 64 65 73 20 32 35 37 20 | 61 6e 64 20 75 70 2e 0a |des 257 |and up..|
|00003620| 57 68 65 6e 20 63 6f 64 | 65 20 35 31 32 20 69 73 |When cod|e 512 is|
|00003630| 20 72 65 61 63 68 65 64 | 2c 20 74 68 65 20 61 6c | reached|, the al|
|00003640| 67 6f 72 69 74 68 6d 20 | 73 77 69 74 63 68 65 73 |gorithm |switches|
|00003650| 20 74 6f 20 31 30 2d 62 | 69 74 20 63 6f 64 65 73 | to 10-b|it codes|
|00003660| 20 61 6e 64 0a 63 6f 6e | 74 69 6e 75 65 73 20 74 | and.con|tinues t|
|00003670| 6f 20 75 73 65 20 6d 6f | 72 65 20 62 69 74 73 20 |o use mo|re bits |
|00003680| 75 6e 74 69 6c 20 74 68 | 65 0a 6c 69 6d 69 74 20 |until th|e.limit |
|00003690| 73 70 65 63 69 66 69 65 | 64 20 62 79 20 74 68 65 |specifie|d by the|
|000036a0| 0a 2e 42 20 5c 2d 62 0a | 66 6c 61 67 20 69 73 20 |..B \-b.|flag is |
|000036b0| 72 65 61 63 68 65 64 20 | 28 64 65 66 61 75 6c 74 |reached |(default|
|000036c0| 20 31 36 29 2e 0a 2e 49 | 20 42 69 74 73 0a 6d 75 | 16)...I| Bits.mu|
|000036d0| 73 74 20 62 65 20 62 65 | 74 77 65 65 6e 20 39 20 |st be be|tween 9 |
|000036e0| 61 6e 64 20 31 36 2e 20 | 20 54 68 65 20 64 65 66 |and 16. | The def|
|000036f0| 61 75 6c 74 20 63 61 6e | 20 62 65 20 63 68 61 6e |ault can| be chan|
|00003700| 67 65 64 20 69 6e 20 74 | 68 65 20 73 6f 75 72 63 |ged in t|he sourc|
|00003710| 65 20 74 6f 20 61 6c 6c | 6f 77 0a 2e 49 20 63 6f |e to all|ow..I co|
|00003720| 6d 70 72 65 73 73 0a 74 | 6f 20 62 65 20 72 75 6e |mpress.t|o be run|
|00003730| 20 6f 6e 20 61 20 73 6d | 61 6c 6c 65 72 20 6d 61 | on a sm|aller ma|
|00003740| 63 68 69 6e 65 2e 0a 2e | 50 50 0a 41 66 74 65 72 |chine...|PP.After|
|00003750| 20 74 68 65 0a 2e 49 20 | 62 69 74 73 0a 6c 69 6d | the..I |bits.lim|
|00003760| 69 74 20 69 73 20 61 74 | 74 61 69 6e 65 64 2c 0a |it is at|tained,.|
|00003770| 2e 49 20 63 6f 6d 70 72 | 65 73 73 0a 70 65 72 69 |.I compr|ess.peri|
|00003780| 6f 64 69 63 61 6c 6c 79 | 20 63 68 65 63 6b 73 20 |odically| checks |
|00003790| 74 68 65 20 63 6f 6d 70 | 72 65 73 73 69 6f 6e 20 |the comp|ression |
|000037a0| 72 61 74 69 6f 2e 20 20 | 49 66 20 69 74 20 69 73 |ratio. |If it is|
|000037b0| 20 69 6e 63 72 65 61 73 | 69 6e 67 2c 0a 2e 49 20 | increas|ing,..I |
|000037c0| 63 6f 6d 70 72 65 73 73 | 0a 63 6f 6e 74 69 6e 75 |compress|.continu|
|000037d0| 65 73 20 74 6f 20 75 73 | 65 20 74 68 65 20 65 78 |es to us|e the ex|
|000037e0| 69 73 74 69 6e 67 20 63 | 6f 64 65 20 64 69 63 74 |isting c|ode dict|
|000037f0| 69 6f 6e 61 72 79 2e 20 | 20 48 6f 77 65 76 65 72 |ionary. | However|
|00003800| 2c 0a 69 66 20 74 68 65 | 20 63 6f 6d 70 72 65 73 |,.if the| compres|
|00003810| 73 69 6f 6e 20 72 61 74 | 69 6f 20 64 65 63 72 65 |sion rat|io decre|
|00003820| 61 73 65 73 2c 0a 2e 49 | 20 63 6f 6d 70 72 65 73 |ases,..I| compres|
|00003830| 73 0a 64 69 73 63 61 72 | 64 73 20 74 68 65 20 74 |s.discar|ds the t|
|00003840| 61 62 6c 65 20 6f 66 20 | 73 75 62 73 74 72 69 6e |able of |substrin|
|00003850| 67 73 20 61 6e 64 20 72 | 65 62 75 69 6c 64 73 20 |gs and r|ebuilds |
|00003860| 69 74 20 66 72 6f 6d 20 | 73 63 72 61 74 63 68 2e |it from |scratch.|
|00003870| 20 20 54 68 69 73 20 61 | 6c 6c 6f 77 73 0a 74 68 | This a|llows.th|
|00003880| 65 20 61 6c 67 6f 72 69 | 74 68 6d 20 74 6f 20 61 |e algori|thm to a|
|00003890| 64 61 70 74 20 74 6f 20 | 74 68 65 20 6e 65 78 74 |dapt to |the next|
|000038a0| 20 22 62 6c 6f 63 6b 22 | 20 6f 66 20 74 68 65 20 | "block"| of the |
|000038b0| 66 69 6c 65 2e 0a 2e 50 | 50 0a 4e 6f 74 65 20 74 |file...P|P.Note t|
|000038c0| 68 61 74 20 74 68 65 0a | 2e 42 20 5c 2d 62 0a 66 |hat the.|.B \-b.f|
|000038d0| 6c 61 67 20 69 73 20 6f | 6d 69 74 74 65 64 20 66 |lag is o|mitted f|
|000038e0| 6f 72 0a 2e 49 20 75 6e | 63 6f 6d 70 72 65 73 73 |or..I un|compress|
|000038f0| 2c 0a 73 69 6e 63 65 20 | 74 68 65 20 0a 2e 49 20 |,.since |the ..I |
|00003900| 62 69 74 73 0a 70 61 72 | 61 6d 65 74 65 72 20 73 |bits.par|ameter s|
|00003910| 70 65 63 69 66 69 65 64 | 20 64 75 72 69 6e 67 20 |pecified| during |
|00003920| 63 6f 6d 70 72 65 73 73 | 69 6f 6e 0a 69 73 20 65 |compress|ion.is e|
|00003930| 6e 63 6f 64 65 64 20 77 | 69 74 68 69 6e 20 74 68 |ncoded w|ithin th|
|00003940| 65 20 6f 75 74 70 75 74 | 2c 20 61 6c 6f 6e 67 20 |e output|, along |
|00003950| 77 69 74 68 0a 61 20 6d | 61 67 69 63 20 6e 75 6d |with.a m|agic num|
|00003960| 62 65 72 20 74 6f 20 65 | 6e 73 75 72 65 20 74 68 |ber to e|nsure th|
|00003970| 61 74 20 6e 65 69 74 68 | 65 72 20 64 65 63 6f 6d |at neith|er decom|
|00003980| 70 72 65 73 73 69 6f 6e | 20 6f 66 20 72 61 6e 64 |pression| of rand|
|00003990| 6f 6d 20 64 61 74 61 20 | 6e 6f 72 0a 72 65 63 6f |om data |nor.reco|
|000039a0| 6d 70 72 65 73 73 69 6f | 6e 20 6f 66 20 63 6f 6d |mpressio|n of com|
|000039b0| 70 72 65 73 73 65 64 20 | 64 61 74 61 20 69 73 20 |pressed |data is |
|000039c0| 61 74 74 65 6d 70 74 65 | 64 2e 20 0a 2e 50 50 0a |attempte|d. ..PP.|
|000039d0| 2e 6e 65 20 38 0a 54 68 | 65 20 61 6d 6f 75 6e 74 |.ne 8.Th|e amount|
|000039e0| 20 6f 66 20 63 6f 6d 70 | 72 65 73 73 69 6f 6e 20 | of comp|ression |
|000039f0| 6f 62 74 61 69 6e 65 64 | 20 64 65 70 65 6e 64 73 |obtained| depends|
|00003a00| 20 6f 6e 20 74 68 65 20 | 73 69 7a 65 20 6f 66 20 | on the |size of |
|00003a10| 74 68 65 0a 69 6e 70 75 | 74 2c 20 74 68 65 20 6e |the.inpu|t, the n|
|00003a20| 75 6d 62 65 72 20 6f 66 | 0a 2e 49 20 62 69 74 73 |umber of|..I bits|
|00003a30| 0a 70 65 72 20 63 6f 64 | 65 2c 20 61 6e 64 20 74 |.per cod|e, and t|
|00003a40| 68 65 20 64 69 73 74 72 | 69 62 75 74 69 6f 6e 20 |he distr|ibution |
|00003a50| 6f 66 20 63 6f 6d 6d 6f | 6e 20 73 75 62 73 74 72 |of commo|n substr|
|00003a60| 69 6e 67 73 2e 0a 54 79 | 70 69 63 61 6c 6c 79 2c |ings..Ty|pically,|
|00003a70| 20 74 65 78 74 20 73 75 | 63 68 20 61 73 20 73 6f | text su|ch as so|
|00003a80| 75 72 63 65 20 63 6f 64 | 65 20 6f 72 20 45 6e 67 |urce cod|e or Eng|
|00003a90| 6c 69 73 68 0a 69 73 20 | 72 65 64 75 63 65 64 20 |lish.is |reduced |
|00003aa0| 62 79 20 35 30 5c 2d 36 | 30 25 2e 0a 43 6f 6d 70 |by 50\-6|0%..Comp|
|00003ab0| 72 65 73 73 69 6f 6e 20 | 69 73 20 67 65 6e 65 72 |ression |is gener|
|00003ac0| 61 6c 6c 79 20 6d 75 63 | 68 20 62 65 74 74 65 72 |ally muc|h better|
|00003ad0| 20 74 68 61 6e 20 74 68 | 61 74 20 61 63 68 69 65 | than th|at achie|
|00003ae0| 76 65 64 20 62 79 0a 48 | 75 66 66 6d 61 6e 20 63 |ved by.H|uffman c|
|00003af0| 6f 64 69 6e 67 20 28 61 | 73 20 75 73 65 64 20 69 |oding (a|s used i|
|00003b00| 6e 0a 2e 49 52 20 70 61 | 63 6b 20 29 2c 0a 6f 72 |n..IR pa|ck ),.or|
|00003b10| 20 61 64 61 70 74 69 76 | 65 20 48 75 66 66 6d 61 | adaptiv|e Huffma|
|00003b20| 6e 20 63 6f 64 69 6e 67 | 0a 2e 52 49 20 28 20 63 |n coding|..RI ( c|
|00003b30| 6f 6d 70 61 63 74 20 29 | 2c 0a 61 6e 64 20 74 61 |ompact )|,.and ta|
|00003b40| 6b 65 73 20 6c 65 73 73 | 20 74 69 6d 65 20 74 6f |kes less| time to|
|00003b50| 20 63 6f 6d 70 75 74 65 | 2e 0a 2e 50 50 0a 55 6e | compute|...PP.Un|
|00003b60| 64 65 72 20 74 68 65 0a | 2e 42 20 5c 2d 76 0a 6f |der the.|.B \-v.o|
|00003b70| 70 74 69 6f 6e 2c 0a 61 | 20 6d 65 73 73 61 67 65 |ption,.a| message|
|00003b80| 20 69 73 20 70 72 69 6e | 74 65 64 20 79 69 65 6c | is prin|ted yiel|
|00003b90| 64 69 6e 67 20 74 68 65 | 20 70 65 72 63 65 6e 74 |ding the| percent|
|00003ba0| 61 67 65 20 6f 66 0a 72 | 65 64 75 63 74 69 6f 6e |age of.r|eduction|
|00003bb0| 20 66 6f 72 20 65 61 63 | 68 20 66 69 6c 65 20 63 | for eac|h file c|
|00003bc0| 6f 6d 70 72 65 73 73 65 | 64 2e 0a 2e 50 50 0a 45 |ompresse|d...PP.E|
|00003bd0| 78 69 74 20 73 74 61 74 | 75 73 20 69 73 20 6e 6f |xit stat|us is no|
|00003be0| 72 6d 61 6c 6c 79 20 30 | 3b 0a 69 66 20 74 68 65 |rmally 0|;.if the|
|00003bf0| 20 6c 61 73 74 20 66 69 | 6c 65 20 69 73 20 6c 61 | last fi|le is la|
|00003c00| 72 67 65 72 20 61 66 74 | 65 72 20 28 61 74 74 65 |rger aft|er (atte|
|00003c10| 6d 70 74 65 64 29 20 63 | 6f 6d 70 72 65 73 73 69 |mpted) c|ompressi|
|00003c20| 6f 6e 2c 20 74 68 65 20 | 73 74 61 74 75 73 20 69 |on, the |status i|
|00003c30| 73 20 32 3b 0a 69 66 20 | 61 6e 20 65 72 72 6f 72 |s 2;.if |an error|
|00003c40| 20 6f 63 63 75 72 73 2c | 20 65 78 69 74 20 73 74 | occurs,| exit st|
|00003c50| 61 74 75 73 20 69 73 20 | 31 2e 0a 2e 53 48 20 22 |atus is |1...SH "|
|00003c60| 44 49 41 47 4e 4f 53 54 | 49 43 53 22 0a 55 73 61 |DIAGNOST|ICS".Usa|
|00003c70| 67 65 3a 20 63 6f 6d 70 | 72 65 73 73 20 5b 5c 2d |ge: comp|ress [\-|
|00003c80| 66 76 63 5d 20 5b 5c 2d | 62 20 6d 61 78 62 69 74 |fvc] [\-|b maxbit|
|00003c90| 73 5d 20 5b 66 69 6c 65 | 20 2e 2e 2e 5d 0a 2e 69 |s] [file| ...]..i|
|00003ca0| 6e 20 2b 38 0a 49 6e 76 | 61 6c 69 64 20 6f 70 74 |n +8.Inv|alid opt|
|00003cb0| 69 6f 6e 73 20 77 65 72 | 65 20 73 70 65 63 69 66 |ions wer|e specif|
|00003cc0| 69 65 64 20 6f 6e 20 74 | 68 65 20 63 6f 6d 6d 61 |ied on t|he comma|
|00003cd0| 6e 64 20 6c 69 6e 65 2e | 0a 2e 69 6e 20 2d 38 0a |nd line.|..in -8.|
|00003ce0| 4d 69 73 73 69 6e 67 20 | 6d 61 78 62 69 74 73 0a |Missing |maxbits.|
|00003cf0| 2e 69 6e 20 2b 38 0a 4d | 61 78 62 69 74 73 20 6d |.in +8.M|axbits m|
|00003d00| 75 73 74 20 66 6f 6c 6c | 6f 77 0a 2e 42 52 20 5c |ust foll|ow..BR \|
|00003d10| 2d 62 20 5c 2e 0a 2e 69 | 6e 20 2d 38 0a 2e 49 52 |-b \...i|n -8..IR|
|00003d20| 20 66 69 6c 65 20 3a 0a | 6e 6f 74 20 69 6e 20 63 | file :.|not in c|
|00003d30| 6f 6d 70 72 65 73 73 65 | 64 20 66 6f 72 6d 61 74 |ompresse|d format|
|00003d40| 0a 2e 69 6e 20 2b 38 0a | 54 68 65 20 66 69 6c 65 |..in +8.|The file|
|00003d50| 20 73 70 65 63 69 66 69 | 65 64 20 74 6f 0a 2e 49 | specifi|ed to..I|
|00003d60| 20 75 6e 63 6f 6d 70 72 | 65 73 73 0a 68 61 73 20 | uncompr|ess.has |
|00003d70| 6e 6f 74 20 62 65 65 6e | 20 63 6f 6d 70 72 65 73 |not been| compres|
|00003d80| 73 65 64 2e 0a 2e 69 6e | 20 2d 38 0a 2e 49 52 20 |sed...in| -8..IR |
|00003d90| 66 69 6c 65 20 3a 0a 63 | 6f 6d 70 72 65 73 73 65 |file :.c|ompresse|
|00003da0| 64 20 77 69 74 68 20 0a | 2e 49 20 78 78 0a 62 69 |d with .|.I xx.bi|
|00003db0| 74 73 2c 20 63 61 6e 20 | 6f 6e 6c 79 20 68 61 6e |ts, can |only han|
|00003dc0| 64 6c 65 20 0a 2e 49 20 | 79 79 0a 62 69 74 73 0a |dle ..I |yy.bits.|
|00003dd0| 2e 69 6e 20 2b 38 0a 2e | 49 20 46 69 6c 65 0a 77 |.in +8..|I File.w|
|00003de0| 61 73 20 63 6f 6d 70 72 | 65 73 73 65 64 20 62 79 |as compr|essed by|
|00003df0| 20 61 20 70 72 6f 67 72 | 61 6d 20 74 68 61 74 20 | a progr|am that |
|00003e00| 63 6f 75 6c 64 20 64 65 | 61 6c 20 77 69 74 68 0a |could de|al with.|
|00003e10| 6d 6f 72 65 20 0a 2e 49 | 20 62 69 74 73 0a 74 68 |more ..I| bits.th|
|00003e20| 61 6e 20 74 68 65 20 63 | 6f 6d 70 72 65 73 73 20 |an the c|ompress |
|00003e30| 63 6f 64 65 20 6f 6e 20 | 74 68 69 73 20 6d 61 63 |code on |this mac|
|00003e40| 68 69 6e 65 2e 0a 52 65 | 63 6f 6d 70 72 65 73 73 |hine..Re|compress|
|00003e50| 20 74 68 65 20 66 69 6c | 65 20 77 69 74 68 20 73 | the fil|e with s|
|00003e60| 6d 61 6c 6c 65 72 0a 2e | 49 52 20 62 69 74 73 20 |maller..|IR bits |
|00003e70| 5c 2e 0a 2e 69 6e 20 2d | 38 0a 2e 49 52 20 66 69 |\...in -|8..IR fi|
|00003e80| 6c 65 20 3a 0a 61 6c 72 | 65 61 64 79 20 68 61 73 |le :.alr|eady has|
|00003e90| 20 2e 5a 20 73 75 66 66 | 69 78 20 2d 2d 20 6e 6f | .Z suff|ix -- no|
|00003ea0| 20 63 68 61 6e 67 65 0a | 2e 69 6e 20 2b 38 0a 54 | change.|.in +8.T|
|00003eb0| 68 65 20 66 69 6c 65 20 | 69 73 20 61 73 73 75 6d |he file |is assum|
|00003ec0| 65 64 20 74 6f 20 62 65 | 20 61 6c 72 65 61 64 79 |ed to be| already|
|00003ed0| 20 63 6f 6d 70 72 65 73 | 73 65 64 2e 0a 52 65 6e | compres|sed..Ren|
|00003ee0| 61 6d 65 20 74 68 65 20 | 66 69 6c 65 20 61 6e 64 |ame the |file and|
|00003ef0| 20 74 72 79 20 61 67 61 | 69 6e 2e 0a 2e 69 6e 20 | try aga|in...in |
|00003f00| 2d 38 0a 2e 49 52 20 66 | 69 6c 65 20 3a 0a 66 69 |-8..IR f|ile :.fi|
|00003f10| 6c 65 6e 61 6d 65 20 74 | 6f 6f 20 6c 6f 6e 67 20 |lename t|oo long |
|00003f20| 74 6f 20 74 61 63 6b 20 | 6f 6e 20 2e 5a 0a 2e 69 |to tack |on .Z..i|
|00003f30| 6e 20 2b 38 0a 54 68 65 | 20 66 69 6c 65 20 63 61 |n +8.The| file ca|
|00003f40| 6e 6e 6f 74 20 62 65 20 | 63 6f 6d 70 72 65 73 73 |nnot be |compress|
|00003f50| 65 64 20 62 65 63 61 75 | 73 65 20 69 74 73 20 6e |ed becau|se its n|
|00003f60| 61 6d 65 20 69 73 20 6c | 6f 6e 67 65 72 20 74 68 |ame is l|onger th|
|00003f70| 61 6e 0a 31 32 20 63 68 | 61 72 61 63 74 65 72 73 |an.12 ch|aracters|
|00003f80| 2e 0a 52 65 6e 61 6d 65 | 20 61 6e 64 20 74 72 79 |..Rename| and try|
|00003f90| 20 61 67 61 69 6e 2e 0a | 54 68 69 73 20 6d 65 73 | again..|This mes|
|00003fa0| 73 61 67 65 20 64 6f 65 | 73 20 6e 6f 74 20 6f 63 |sage doe|s not oc|
|00003fb0| 63 75 72 20 6f 6e 20 42 | 53 44 20 73 79 73 74 65 |cur on B|SD syste|
|00003fc0| 6d 73 2e 0a 2e 69 6e 20 | 2d 38 0a 2e 49 20 66 69 |ms...in |-8..I fi|
|00003fd0| 6c 65 0a 61 6c 72 65 61 | 64 79 20 65 78 69 73 74 |le.alrea|dy exist|
|00003fe0| 73 3b 20 64 6f 20 79 6f | 75 20 77 69 73 68 20 74 |s; do yo|u wish t|
|00003ff0| 6f 20 6f 76 65 72 77 72 | 69 74 65 20 28 79 20 6f |o overwr|ite (y o|
|00004000| 72 20 6e 29 3f 0a 2e 69 | 6e 20 2b 38 0a 52 65 73 |r n)?..i|n +8.Res|
|00004010| 70 6f 6e 64 20 22 79 22 | 20 69 66 20 79 6f 75 20 |pond "y"| if you |
|00004020| 77 61 6e 74 20 74 68 65 | 20 6f 75 74 70 75 74 20 |want the| output |
|00004030| 66 69 6c 65 20 74 6f 20 | 62 65 20 72 65 70 6c 61 |file to |be repla|
|00004040| 63 65 64 3b 20 22 6e 22 | 20 69 66 20 6e 6f 74 2e |ced; "n"| if not.|
|00004050| 0a 2e 69 6e 20 2d 38 0a | 75 6e 63 6f 6d 70 72 65 |..in -8.|uncompre|
|00004060| 73 73 3a 20 63 6f 72 72 | 75 70 74 20 69 6e 70 75 |ss: corr|upt inpu|
|00004070| 74 0a 2e 69 6e 20 2b 38 | 0a 41 20 53 49 47 53 45 |t..in +8|.A SIGSE|
|00004080| 47 56 20 76 69 6f 6c 61 | 74 69 6f 6e 20 77 61 73 |GV viola|tion was|
|00004090| 20 64 65 74 65 63 74 65 | 64 20 77 68 69 63 68 20 | detecte|d which |
|000040a0| 75 73 75 61 6c 6c 79 20 | 6d 65 61 6e 73 20 74 68 |usually |means th|
|000040b0| 61 74 20 74 68 65 20 69 | 6e 70 75 74 20 66 69 6c |at the i|nput fil|
|000040c0| 65 20 69 73 0a 63 6f 72 | 72 75 70 74 65 64 2e 0a |e is.cor|rupted..|
|000040d0| 2e 69 6e 20 2d 38 0a 43 | 6f 6d 70 72 65 73 73 69 |.in -8.C|ompressi|
|000040e0| 6f 6e 3a 20 0a 2e 49 20 | 22 78 78 2e 78 78 25 22 |on: ..I |"xx.xx%"|
|000040f0| 0a 2e 69 6e 20 2b 38 0a | 50 65 72 63 65 6e 74 61 |..in +8.|Percenta|
|00004100| 67 65 20 6f 66 20 74 68 | 65 20 69 6e 70 75 74 20 |ge of th|e input |
|00004110| 73 61 76 65 64 20 62 79 | 20 63 6f 6d 70 72 65 73 |saved by| compres|
|00004120| 73 69 6f 6e 2e 0a 28 52 | 65 6c 65 76 61 6e 74 20 |sion..(R|elevant |
|00004130| 6f 6e 6c 79 20 66 6f 72 | 0a 2e 42 52 20 5c 2d 76 |only for|..BR \-v|
|00004140| 20 5c 2e 29 0a 2e 69 6e | 20 2d 38 0a 2d 2d 20 6e | \.)..in| -8.-- n|
|00004150| 6f 74 20 61 20 72 65 67 | 75 6c 61 72 20 66 69 6c |ot a reg|ular fil|
|00004160| 65 3a 20 75 6e 63 68 61 | 6e 67 65 64 0a 2e 69 6e |e: uncha|nged..in|
|00004170| 20 2b 38 0a 57 68 65 6e | 20 74 68 65 20 69 6e 70 | +8.When| the inp|
|00004180| 75 74 20 66 69 6c 65 20 | 69 73 20 6e 6f 74 20 61 |ut file |is not a|
|00004190| 20 72 65 67 75 6c 61 72 | 20 66 69 6c 65 2c 0a 28 | regular| file,.(|
|000041a0| 65 2e 67 2e 20 61 20 64 | 69 72 65 63 74 6f 72 79 |e.g. a d|irectory|
|000041b0| 29 2c 20 69 74 20 69 73 | 0a 6c 65 66 74 20 75 6e |), it is|.left un|
|000041c0| 61 6c 74 65 72 65 64 2e | 0a 2e 69 6e 20 2d 38 0a |altered.|..in -8.|
|000041d0| 2d 2d 20 68 61 73 20 0a | 2e 49 20 78 78 20 0a 6f |-- has .|.I xx .o|
|000041e0| 74 68 65 72 20 6c 69 6e | 6b 73 3a 20 75 6e 63 68 |ther lin|ks: unch|
|000041f0| 61 6e 67 65 64 0a 2e 69 | 6e 20 2b 38 0a 54 68 65 |anged..i|n +8.The|
|00004200| 20 69 6e 70 75 74 20 66 | 69 6c 65 20 68 61 73 20 | input f|ile has |
|00004210| 6c 69 6e 6b 73 3b 20 69 | 74 20 69 73 20 6c 65 66 |links; i|t is lef|
|00004220| 74 20 75 6e 63 68 61 6e | 67 65 64 2e 20 20 53 65 |t unchan|ged. Se|
|00004230| 65 0a 2e 49 52 20 6c 6e | 20 22 28 31 29 22 0a 66 |e..IR ln| "(1)".f|
|00004240| 6f 72 20 6d 6f 72 65 20 | 69 6e 66 6f 72 6d 61 74 |or more |informat|
|00004250| 69 6f 6e 2e 0a 2e 69 6e | 20 2d 38 0a 2d 2d 20 66 |ion...in| -8.-- f|
|00004260| 69 6c 65 20 75 6e 63 68 | 61 6e 67 65 64 0a 2e 69 |ile unch|anged..i|
|00004270| 6e 20 2b 38 0a 4e 6f 20 | 73 61 76 69 6e 67 73 20 |n +8.No |savings |
|00004280| 69 73 20 61 63 68 69 65 | 76 65 64 20 62 79 0a 63 |is achie|ved by.c|
|00004290| 6f 6d 70 72 65 73 73 69 | 6f 6e 2e 20 20 54 68 65 |ompressi|on. The|
|000042a0| 20 69 6e 70 75 74 20 72 | 65 6d 61 69 6e 73 20 76 | input r|emains v|
|000042b0| 69 72 67 69 6e 2e 0a 2e | 69 6e 20 2d 38 0a 2e 53 |irgin...|in -8..S|
|000042c0| 48 20 22 42 55 47 53 22 | 0a 41 6c 74 68 6f 75 67 |H "BUGS"|.Althoug|
|000042d0| 68 20 63 6f 6d 70 72 65 | 73 73 65 64 20 66 69 6c |h compre|ssed fil|
|000042e0| 65 73 20 61 72 65 20 63 | 6f 6d 70 61 74 69 62 6c |es are c|ompatibl|
|000042f0| 65 20 62 65 74 77 65 65 | 6e 20 6d 61 63 68 69 6e |e betwee|n machin|
|00004300| 65 73 20 77 69 74 68 20 | 6c 61 72 67 65 20 6d 65 |es with |large me|
|00004310| 6d 6f 72 79 2c 0a 2e 42 | 52 20 5c 2d 62 20 5c 31 |mory,..B|R \-b \1|
|00004320| 32 0a 73 68 6f 75 6c 64 | 20 62 65 20 75 73 65 64 |2.should| be used|
|00004330| 20 66 6f 72 20 66 69 6c | 65 20 74 72 61 6e 73 66 | for fil|e transf|
|00004340| 65 72 20 74 6f 20 61 72 | 63 68 69 74 65 63 74 75 |er to ar|chitectu|
|00004350| 72 65 73 20 77 69 74 68 | 20 0a 61 20 73 6d 61 6c |res with| .a smal|
|00004360| 6c 20 70 72 6f 63 65 73 | 73 20 64 61 74 61 20 73 |l proces|s data s|
|00004370| 70 61 63 65 20 28 36 34 | 4b 42 20 6f 72 20 6c 65 |pace (64|KB or le|
|00004380| 73 73 2c 20 61 73 20 65 | 78 68 69 62 69 74 65 64 |ss, as e|xhibited|
|00004390| 20 62 79 20 74 68 65 20 | 44 45 43 20 50 44 50 0a | by the |DEC PDP.|
|000043a0| 73 65 72 69 65 73 2c 20 | 74 68 65 20 49 6e 74 65 |series, |the Inte|
|000043b0| 6c 20 38 30 32 38 36 2c | 20 65 74 63 2e 29 0a 41 |l 80286,| etc.).A|
|000043c0| 6c 42 65 52 74 45 69 4e | 73 54 65 49 6e 0a 65 63 |lBeRtEiN|sTeIn.ec|
|000043d0| 68 6f 20 75 6e 62 75 6e | 64 6c 69 6e 67 20 63 6f |ho unbun|dling co|
|000043e0| 6d 70 72 65 73 73 2e 63 | 20 31 3e 26 32 0a 63 61 |mpress.c| 1>&2.ca|
|000043f0| 74 20 3e 63 6f 6d 70 72 | 65 73 73 2e 63 20 3c 3c |t >compr|ess.c <<|
|00004400| 27 41 6c 42 65 52 74 45 | 69 4e 73 54 65 49 6e 27 |'AlBeRtE|iNsTeIn'|
|00004410| 0a 23 69 66 6e 64 65 66 | 20 6c 69 6e 74 0a 73 74 |.#ifndef| lint.st|
|00004420| 61 74 69 63 20 63 68 61 | 72 20 73 63 63 73 69 64 |atic cha|r sccsid|
|00004430| 5b 5d 20 3d 20 22 40 28 | 23 29 63 6f 6d 70 72 65 |[] = "@(|#)compre|
|00004440| 73 73 2e 63 09 35 2e 37 | 20 28 42 65 72 6b 65 6c |ss.c.5.7| (Berkel|
|00004450| 65 79 29 20 39 2f 31 37 | 2f 38 35 22 3b 0a 23 65 |ey) 9/17|/85";.#e|
|00004460| 6e 64 69 66 20 6e 6f 74 | 20 6c 69 6e 74 0a 0a 2f |ndif not| lint../|
|00004470| 2a 20 0a 20 2a 20 43 6f | 6d 70 72 65 73 73 20 2d |* . * Co|mpress -|
|00004480| 20 64 61 74 61 20 63 6f | 6d 70 72 65 73 73 69 6f | data co|mpressio|
|00004490| 6e 20 70 72 6f 67 72 61 | 6d 20 0a 20 2a 2f 0a 23 |n progra|m . */.#|
|000044a0| 64 65 66 69 6e 65 09 6d | 69 6e 28 61 2c 62 29 09 |define.m|in(a,b).|
|000044b0| 28 28 61 3e 62 29 20 3f | 20 62 20 3a 20 61 29 0a |((a>b) ?| b : a).|
|000044c0| 0a 2f 2a 0a 20 2a 20 6d | 61 63 68 69 6e 65 20 76 |./*. * m|achine v|
|000044d0| 61 72 69 61 6e 74 73 20 | 77 68 69 63 68 20 72 65 |ariants |which re|
|000044e0| 71 75 69 72 65 20 63 63 | 20 2d 44 6d 61 63 68 69 |quire cc| -Dmachi|
|000044f0| 6e 65 3a 20 20 70 64 70 | 31 31 2c 20 7a 38 30 30 |ne: pdp|11, z800|
|00004500| 30 2c 20 70 63 78 74 0a | 20 2a 2f 0a 0a 2f 2a 0a |0, pcxt.| */../*.|
|00004510| 20 2a 20 53 65 74 20 55 | 53 45 52 4d 45 4d 20 74 | * Set U|SERMEM t|
|00004520| 6f 20 74 68 65 20 6d 61 | 78 69 6d 75 6d 20 61 6d |o the ma|ximum am|
|00004530| 6f 75 6e 74 20 6f 66 20 | 70 68 79 73 69 63 61 6c |ount of |physical|
|00004540| 20 75 73 65 72 20 6d 65 | 6d 6f 72 79 20 61 76 61 | user me|mory ava|
|00004550| 69 6c 61 62 6c 65 0a 20 | 2a 20 69 6e 20 62 79 74 |ilable. |* in byt|
|00004560| 65 73 2e 20 20 55 53 45 | 52 4d 45 4d 20 69 73 20 |es. USE|RMEM is |
|00004570| 75 73 65 64 20 74 6f 20 | 64 65 74 65 72 6d 69 6e |used to |determin|
|00004580| 65 20 74 68 65 20 6d 61 | 78 69 6d 75 6d 20 42 49 |e the ma|ximum BI|
|00004590| 54 53 20 74 68 61 74 20 | 63 61 6e 20 62 65 20 75 |TS that |can be u|
|000045a0| 73 65 64 0a 20 2a 20 66 | 6f 72 20 63 6f 6d 70 72 |sed. * f|or compr|
|000045b0| 65 73 73 69 6f 6e 2e 0a | 20 2a 0a 20 2a 20 53 41 |ession..| *. * SA|
|000045c0| 43 52 45 44 4d 45 4d 20 | 69 73 20 74 68 65 20 61 |CREDMEM |is the a|
|000045d0| 6d 6f 75 6e 74 20 6f 66 | 20 70 68 79 73 69 63 61 |mount of| physica|
|000045e0| 6c 20 6d 65 6d 6f 72 79 | 20 73 61 76 65 64 20 66 |l memory| saved f|
|000045f0| 6f 72 20 6f 74 68 65 72 | 73 3b 20 63 6f 6d 70 72 |or other|s; compr|
|00004600| 65 73 73 0a 20 2a 20 77 | 69 6c 6c 20 68 6f 67 20 |ess. * w|ill hog |
|00004610| 74 68 65 20 72 65 73 74 | 2e 0a 20 2a 2f 0a 23 69 |the rest|.. */.#i|
|00004620| 66 6e 64 65 66 20 53 41 | 43 52 45 44 4d 45 4d 0a |fndef SA|CREDMEM.|
|00004630| 23 64 65 66 69 6e 65 20 | 53 41 43 52 45 44 4d 45 |#define |SACREDME|
|00004640| 4d 09 30 0a 23 65 6e 64 | 69 66 0a 0a 23 69 66 6e |M.0.#end|if..#ifn|
|00004650| 64 65 66 20 55 53 45 52 | 4d 45 4d 0a 23 20 64 65 |def USER|MEM.# de|
|00004660| 66 69 6e 65 20 55 53 45 | 52 4d 45 4d 20 09 34 35 |fine USE|RMEM .45|
|00004670| 30 30 30 30 09 2f 2a 20 | 64 65 66 61 75 6c 74 20 |0000./* |default |
|00004680| 75 73 65 72 20 6d 65 6d | 6f 72 79 20 2a 2f 0a 23 |user mem|ory */.#|
|00004690| 65 6e 64 69 66 0a 0a 23 | 69 66 64 65 66 20 69 6e |endif..#|ifdef in|
|000046a0| 74 65 72 64 61 74 61 09 | 09 2f 2a 20 28 50 65 72 |terdata.|./* (Per|
|000046b0| 6b 69 6e 2d 45 6c 6d 65 | 72 29 20 2a 2f 0a 23 64 |kin-Elme|r) */.#d|
|000046c0| 65 66 69 6e 65 20 53 49 | 47 4e 45 44 5f 43 4f 4d |efine SI|GNED_COM|
|000046d0| 50 41 52 45 5f 53 4c 4f | 57 09 2f 2a 20 73 69 67 |PARE_SLO|W./* sig|
|000046e0| 6e 65 64 20 63 6f 6d 70 | 61 72 65 20 69 73 20 73 |ned comp|are is s|
|000046f0| 6c 6f 77 65 72 20 74 68 | 61 6e 20 75 6e 73 69 67 |lower th|an unsig|
|00004700| 6e 65 64 20 2a 2f 0a 23 | 65 6e 64 69 66 0a 0a 23 |ned */.#|endif..#|
|00004710| 69 66 64 65 66 20 70 64 | 70 31 31 0a 23 20 64 65 |ifdef pd|p11.# de|
|00004720| 66 69 6e 65 20 42 49 54 | 53 20 09 31 32 09 2f 2a |fine BIT|S .12./*|
|00004730| 20 6d 61 78 20 62 69 74 | 73 2f 63 6f 64 65 20 66 | max bit|s/code f|
|00004740| 6f 72 20 31 36 2d 62 69 | 74 20 6d 61 63 68 69 6e |or 16-bi|t machin|
|00004750| 65 20 2a 2f 0a 23 20 64 | 65 66 69 6e 65 20 4e 4f |e */.# d|efine NO|
|00004760| 5f 55 43 48 41 52 09 2f | 2a 20 61 6c 73 6f 20 69 |_UCHAR./|* also i|
|00004770| 66 20 22 75 6e 73 69 67 | 6e 65 64 20 63 68 61 72 |f "unsig|ned char|
|00004780| 22 20 66 75 6e 63 74 69 | 6f 6e 73 20 61 73 20 73 |" functi|ons as s|
|00004790| 69 67 6e 65 64 20 63 68 | 61 72 20 2a 2f 0a 23 20 |igned ch|ar */.# |
|000047a0| 75 6e 64 65 66 20 55 53 | 45 52 4d 45 4d 20 0a 23 |undef US|ERMEM .#|
|000047b0| 65 6e 64 69 66 20 2f 2a | 20 70 64 70 31 31 20 2a |endif /*| pdp11 *|
|000047c0| 2f 09 2f 2a 20 64 6f 6e | 27 74 20 66 6f 72 67 65 |/./* don|'t forge|
|000047d0| 74 20 74 6f 20 63 6f 6d | 70 69 6c 65 20 77 69 74 |t to com|pile wit|
|000047e0| 68 20 2d 69 20 2a 2f 0a | 0a 23 69 66 64 65 66 20 |h -i */.|.#ifdef |
|000047f0| 7a 38 30 30 30 0a 23 20 | 64 65 66 69 6e 65 20 42 |z8000.# |define B|
|00004800| 49 54 53 20 09 31 32 0a | 23 20 75 6e 64 65 66 20 |ITS .12.|# undef |
|00004810| 76 61 78 09 09 2f 2a 20 | 77 65 69 72 64 20 70 72 |vax../* |weird pr|
|00004820| 65 70 72 6f 63 65 73 73 | 6f 72 20 2a 2f 0a 23 20 |eprocess|or */.# |
|00004830| 75 6e 64 65 66 20 55 53 | 45 52 4d 45 4d 20 0a 23 |undef US|ERMEM .#|
|00004840| 65 6e 64 69 66 20 2f 2a | 20 7a 38 30 30 30 20 2a |endif /*| z8000 *|
|00004850| 2f 0a 0a 23 69 66 64 65 | 66 20 70 63 78 74 0a 23 |/..#ifde|f pcxt.#|
|00004860| 20 64 65 66 69 6e 65 20 | 42 49 54 53 20 20 20 31 | define |BITS 1|
|00004870| 32 0a 23 20 75 6e 64 65 | 66 20 55 53 45 52 4d 45 |2.# unde|f USERME|
|00004880| 4d 0a 23 65 6e 64 69 66 | 20 2f 2a 20 70 63 78 74 |M.#endif| /* pcxt|
|00004890| 20 2a 2f 0a 0a 23 69 66 | 64 65 66 20 55 53 45 52 | */..#if|def USER|
|000048a0| 4d 45 4d 0a 23 20 69 66 | 20 55 53 45 52 4d 45 4d |MEM.# if| USERMEM|
|000048b0| 20 3e 3d 20 28 34 33 33 | 34 38 34 2b 53 41 43 52 | >= (433|484+SACR|
|000048c0| 45 44 4d 45 4d 29 0a 23 | 20 20 64 65 66 69 6e 65 |EDMEM).#| define|
|000048d0| 20 50 42 49 54 53 09 31 | 36 0a 23 20 65 6c 73 65 | PBITS.1|6.# else|
|000048e0| 0a 23 20 20 69 66 20 55 | 53 45 52 4d 45 4d 20 3e |.# if U|SERMEM >|
|000048f0| 3d 20 28 32 32 39 36 30 | 30 2b 53 41 43 52 45 44 |= (22960|0+SACRED|
|00004900| 4d 45 4d 29 0a 23 20 20 | 20 64 65 66 69 6e 65 20 |MEM).# | define |
|00004910| 50 42 49 54 53 09 31 35 | 0a 23 20 20 65 6c 73 65 |PBITS.15|.# else|
|00004920| 0a 23 20 20 20 69 66 20 | 55 53 45 52 4d 45 4d 20 |.# if |USERMEM |
|00004930| 3e 3d 20 28 31 32 37 35 | 33 36 2b 53 41 43 52 45 |>= (1275|36+SACRE|
|00004940| 44 4d 45 4d 29 0a 23 20 | 20 20 20 64 65 66 69 6e |DMEM).# | defin|
|00004950| 65 20 50 42 49 54 53 09 | 31 34 0a 23 20 20 20 65 |e PBITS.|14.# e|
|00004960| 6c 73 65 0a 23 20 20 20 | 20 69 66 20 55 53 45 52 |lse.# | if USER|
|00004970| 4d 45 4d 20 3e 3d 20 28 | 37 33 34 36 34 2b 53 41 |MEM >= (|73464+SA|
|00004980| 43 52 45 44 4d 45 4d 29 | 0a 23 20 20 20 20 20 64 |CREDMEM)|.# d|
|00004990| 65 66 69 6e 65 20 50 42 | 49 54 53 09 31 33 0a 23 |efine PB|ITS.13.#|
|000049a0| 20 20 20 20 65 6c 73 65 | 0a 23 20 20 20 20 20 64 | else|.# d|
|000049b0| 65 66 69 6e 65 20 50 42 | 49 54 53 09 31 32 0a 23 |efine PB|ITS.12.#|
|000049c0| 20 20 20 20 65 6e 64 69 | 66 0a 23 20 20 20 65 6e | endi|f.# en|
|000049d0| 64 69 66 0a 23 20 20 65 | 6e 64 69 66 0a 23 20 65 |dif.# e|ndif.# e|
|000049e0| 6e 64 69 66 0a 23 20 75 | 6e 64 65 66 20 55 53 45 |ndif.# u|ndef USE|
|000049f0| 52 4d 45 4d 0a 23 65 6e | 64 69 66 20 2f 2a 20 55 |RMEM.#en|dif /* U|
|00004a00| 53 45 52 4d 45 4d 20 2a | 2f 0a 0a 23 69 66 64 65 |SERMEM *|/..#ifde|
|00004a10| 66 20 50 42 49 54 53 09 | 09 2f 2a 20 50 72 65 66 |f PBITS.|./* Pref|
|00004a20| 65 72 72 65 64 20 42 49 | 54 53 20 66 6f 72 20 74 |erred BI|TS for t|
|00004a30| 68 69 73 20 6d 65 6d 6f | 72 79 20 73 69 7a 65 20 |his memo|ry size |
|00004a40| 2a 2f 0a 23 20 69 66 6e | 64 65 66 20 42 49 54 53 |*/.# ifn|def BITS|
|00004a50| 0a 23 20 20 64 65 66 69 | 6e 65 20 42 49 54 53 20 |.# defi|ne BITS |
|00004a60| 50 42 49 54 53 0a 23 20 | 65 6e 64 69 66 20 42 49 |PBITS.# |endif BI|
|00004a70| 54 53 0a 23 65 6e 64 69 | 66 20 2f 2a 20 50 42 49 |TS.#endi|f /* PBI|
|00004a80| 54 53 20 2a 2f 0a 0a 23 | 69 66 20 42 49 54 53 20 |TS */..#|if BITS |
|00004a90| 3d 3d 20 31 36 0a 23 20 | 64 65 66 69 6e 65 20 48 |== 16.# |define H|
|00004aa0| 53 49 5a 45 09 36 39 30 | 30 31 09 09 2f 2a 20 39 |SIZE.690|01../* 9|
|00004ab0| 35 25 20 6f 63 63 75 70 | 61 6e 63 79 20 2a 2f 0a |5% occup|ancy */.|
|00004ac0| 23 65 6e 64 69 66 0a 23 | 69 66 20 42 49 54 53 20 |#endif.#|if BITS |
|00004ad0| 3d 3d 20 31 35 0a 23 20 | 64 65 66 69 6e 65 20 48 |== 15.# |define H|
|00004ae0| 53 49 5a 45 09 33 35 30 | 32 33 09 09 2f 2a 20 39 |SIZE.350|23../* 9|
|00004af0| 34 25 20 6f 63 63 75 70 | 61 6e 63 79 20 2a 2f 0a |4% occup|ancy */.|
|00004b00| 23 65 6e 64 69 66 0a 23 | 69 66 20 42 49 54 53 20 |#endif.#|if BITS |
|00004b10| 3d 3d 20 31 34 0a 23 20 | 64 65 66 69 6e 65 20 48 |== 14.# |define H|
|00004b20| 53 49 5a 45 09 31 38 30 | 31 33 09 09 2f 2a 20 39 |SIZE.180|13../* 9|
|00004b30| 31 25 20 6f 63 63 75 70 | 61 6e 63 79 20 2a 2f 0a |1% occup|ancy */.|
|00004b40| 23 65 6e 64 69 66 0a 23 | 69 66 20 42 49 54 53 20 |#endif.#|if BITS |
|00004b50| 3d 3d 20 31 33 0a 23 20 | 64 65 66 69 6e 65 20 48 |== 13.# |define H|
|00004b60| 53 49 5a 45 09 39 30 30 | 31 09 09 2f 2a 20 39 31 |SIZE.900|1../* 91|
|00004b70| 25 20 6f 63 63 75 70 61 | 6e 63 79 20 2a 2f 0a 23 |% occupa|ncy */.#|
|00004b80| 65 6e 64 69 66 0a 23 69 | 66 20 42 49 54 53 20 3c |endif.#i|f BITS <|
|00004b90| 3d 20 31 32 0a 23 20 64 | 65 66 69 6e 65 20 48 53 |= 12.# d|efine HS|
|00004ba0| 49 5a 45 09 35 30 30 33 | 09 09 2f 2a 20 38 30 25 |IZE.5003|../* 80%|
|00004bb0| 20 6f 63 63 75 70 61 6e | 63 79 20 2a 2f 0a 23 65 | occupan|cy */.#e|
|00004bc0| 6e 64 69 66 0a 0a 23 69 | 66 64 65 66 20 4d 5f 58 |ndif..#i|fdef M_X|
|00004bd0| 45 4e 49 58 09 09 09 2f | 2a 20 53 74 75 70 69 64 |ENIX.../|* Stupid|
|00004be0| 20 63 6f 6d 70 69 6c 65 | 72 20 63 61 6e 27 74 20 | compile|r can't |
|00004bf0| 68 61 6e 64 6c 65 20 61 | 72 72 61 79 73 20 77 69 |handle a|rrays wi|
|00004c00| 74 68 20 2a 2f 0a 23 20 | 69 66 20 42 49 54 53 20 |th */.# |if BITS |
|00004c10| 3d 3d 20 31 36 09 09 09 | 2f 2a 20 6d 6f 72 65 20 |== 16...|/* more |
|00004c20| 74 68 61 6e 20 36 35 35 | 33 35 20 62 79 74 65 73 |than 655|35 bytes|
|00004c30| 20 2d 20 73 6f 20 77 65 | 20 66 61 6b 65 20 69 74 | - so we| fake it|
|00004c40| 20 2a 2f 0a 23 20 20 64 | 65 66 69 6e 65 20 58 45 | */.# d|efine XE|
|00004c50| 4e 49 58 5f 31 36 0a 23 | 20 65 6c 73 65 0a 23 20 |NIX_16.#| else.# |
|00004c60| 20 69 66 20 42 49 54 53 | 20 3e 20 31 33 09 09 09 | if BITS| > 13...|
|00004c70| 2f 2a 20 43 6f 64 65 20 | 6f 6e 6c 79 20 68 61 6e |/* Code |only han|
|00004c80| 64 6c 65 73 20 42 49 54 | 53 20 3d 20 31 32 2c 20 |dles BIT|S = 12, |
|00004c90| 31 33 2c 20 6f 72 20 31 | 36 20 2a 2f 0a 23 20 20 |13, or 1|6 */.# |
|00004ca0| 20 64 65 66 69 6e 65 20 | 42 49 54 53 09 31 33 0a | define |BITS.13.|
|00004cb0| 23 20 20 65 6e 64 69 66 | 0a 23 20 65 6e 64 69 66 |# endif|.# endif|
|00004cc0| 0a 23 65 6e 64 69 66 0a | 0a 2f 2a 0a 20 2a 20 61 |.#endif.|./*. * a|
|00004cd0| 20 63 6f 64 65 5f 69 6e | 74 20 6d 75 73 74 20 62 | code_in|t must b|
|00004ce0| 65 20 61 62 6c 65 20 74 | 6f 20 68 6f 6c 64 20 32 |e able t|o hold 2|
|00004cf0| 2a 2a 42 49 54 53 20 76 | 61 6c 75 65 73 20 6f 66 |**BITS v|alues of|
|00004d00| 20 74 79 70 65 20 69 6e | 74 2c 20 61 6e 64 20 61 | type in|t, and a|
|00004d10| 6c 73 6f 20 2d 31 0a 20 | 2a 2f 0a 23 69 66 20 42 |lso -1. |*/.#if B|
|00004d20| 49 54 53 20 3e 20 31 35 | 0a 74 79 70 65 64 65 66 |ITS > 15|.typedef|
|00004d30| 20 6c 6f 6e 67 20 69 6e | 74 09 63 6f 64 65 5f 69 | long in|t.code_i|
|00004d40| 6e 74 3b 0a 23 65 6c 73 | 65 0a 74 79 70 65 64 65 |nt;.#els|e.typede|
|00004d50| 66 20 69 6e 74 09 09 63 | 6f 64 65 5f 69 6e 74 3b |f int..c|ode_int;|
|00004d60| 0a 23 65 6e 64 69 66 0a | 0a 23 69 66 64 65 66 20 |.#endif.|.#ifdef |
|00004d70| 53 49 47 4e 45 44 5f 43 | 4f 4d 50 41 52 45 5f 53 |SIGNED_C|OMPARE_S|
|00004d80| 4c 4f 57 0a 74 79 70 65 | 64 65 66 20 75 6e 73 69 |LOW.type|def unsi|
|00004d90| 67 6e 65 64 20 6c 6f 6e | 67 20 69 6e 74 20 63 6f |gned lon|g int co|
|00004da0| 75 6e 74 5f 69 6e 74 3b | 0a 74 79 70 65 64 65 66 |unt_int;|.typedef|
|00004db0| 20 75 6e 73 69 67 6e 65 | 64 20 73 68 6f 72 74 20 | unsigne|d short |
|00004dc0| 69 6e 74 20 63 6f 75 6e | 74 5f 73 68 6f 72 74 3b |int coun|t_short;|
|00004dd0| 0a 23 65 6c 73 65 0a 74 | 79 70 65 64 65 66 20 6c |.#else.t|ypedef l|
|00004de0| 6f 6e 67 20 69 6e 74 09 | 20 20 63 6f 75 6e 74 5f |ong int.| count_|
|00004df0| 69 6e 74 3b 0a 23 65 6e | 64 69 66 0a 0a 23 69 66 |int;.#en|dif..#if|
|00004e00| 64 65 66 20 4e 4f 5f 55 | 43 48 41 52 0a 20 74 79 |def NO_U|CHAR. ty|
|00004e10| 70 65 64 65 66 20 63 68 | 61 72 09 63 68 61 72 5f |pedef ch|ar.char_|
|00004e20| 74 79 70 65 3b 0a 23 65 | 6c 73 65 0a 20 74 79 70 |type;.#e|lse. typ|
|00004e30| 65 64 65 66 09 75 6e 73 | 69 67 6e 65 64 20 63 68 |edef.uns|igned ch|
|00004e40| 61 72 09 63 68 61 72 5f | 74 79 70 65 3b 0a 23 65 |ar.char_|type;.#e|
|00004e50| 6e 64 69 66 20 2f 2a 20 | 55 43 48 41 52 20 2a 2f |ndif /* |UCHAR */|
|00004e60| 0a 63 68 61 72 5f 74 79 | 70 65 20 6d 61 67 69 63 |.char_ty|pe magic|
|00004e70| 5f 68 65 61 64 65 72 5b | 5d 20 3d 20 7b 20 22 5c |_header[|] = { "\|
|00004e80| 30 33 37 5c 32 33 35 22 | 20 7d 3b 09 2f 2a 20 31 |037\235"| };./* 1|
|00004e90| 46 20 39 44 20 2a 2f 0a | 0a 2f 2a 20 44 65 66 69 |F 9D */.|./* Defi|
|00004ea0| 6e 65 73 20 66 6f 72 20 | 74 68 69 72 64 20 62 79 |nes for |third by|
|00004eb0| 74 65 20 6f 66 20 68 65 | 61 64 65 72 20 2a 2f 0a |te of he|ader */.|
|00004ec0| 23 64 65 66 69 6e 65 20 | 42 49 54 5f 4d 41 53 4b |#define |BIT_MASK|
|00004ed0| 09 30 78 31 66 0a 23 64 | 65 66 69 6e 65 20 42 4c |.0x1f.#d|efine BL|
|00004ee0| 4f 43 4b 5f 4d 41 53 4b | 09 30 78 38 30 0a 2f 2a |OCK_MASK|.0x80./*|
|00004ef0| 20 4d 61 73 6b 73 20 30 | 78 34 30 20 61 6e 64 20 | Masks 0|x40 and |
|00004f00| 30 78 32 30 20 61 72 65 | 20 66 72 65 65 2e 20 20 |0x20 are| free. |
|00004f10| 49 20 74 68 69 6e 6b 20 | 30 78 32 30 20 73 68 6f |I think |0x20 sho|
|00004f20| 75 6c 64 20 6d 65 61 6e | 20 74 68 61 74 20 74 68 |uld mean| that th|
|00004f30| 65 72 65 20 69 73 0a 20 | 20 20 61 20 66 6f 75 72 |ere is. | a four|
|00004f40| 74 68 20 68 65 61 64 65 | 72 20 62 79 74 65 20 28 |th heade|r byte (|
|00004f50| 66 6f 72 20 65 78 70 61 | 6e 73 69 6f 6e 29 2e 0a |for expa|nsion)..|
|00004f60| 2a 2f 0a 23 64 65 66 69 | 6e 65 20 49 4e 49 54 5f |*/.#defi|ne INIT_|
|00004f70| 42 49 54 53 20 39 09 09 | 09 2f 2a 20 69 6e 69 74 |BITS 9..|./* init|
|00004f80| 69 61 6c 20 6e 75 6d 62 | 65 72 20 6f 66 20 62 69 |ial numb|er of bi|
|00004f90| 74 73 2f 63 6f 64 65 20 | 2a 2f 0a 0a 2f 2a 0a 20 |ts/code |*/../*. |
|00004fa0| 2a 20 63 6f 6d 70 72 65 | 73 73 2e 63 20 2d 20 46 |* compre|ss.c - F|
|00004fb0| 69 6c 65 20 63 6f 6d 70 | 72 65 73 73 69 6f 6e 20 |ile comp|ression |
|00004fc0| 61 6c 61 20 49 45 45 45 | 20 43 6f 6d 70 75 74 65 |ala IEEE| Compute|
|00004fd0| 72 2c 20 4a 75 6e 65 20 | 31 39 38 34 2e 0a 20 2a |r, June |1984.. *|
|00004fe0| 0a 20 2a 20 41 75 74 68 | 6f 72 73 3a 09 53 70 65 |. * Auth|ors:.Spe|
|00004ff0| 6e 63 65 72 20 57 2e 20 | 54 68 6f 6d 61 73 09 28 |ncer W. |Thomas.(|
|00005000| 64 65 63 76 61 78 21 68 | 61 72 70 6f 21 75 74 61 |decvax!h|arpo!uta|
|00005010| 68 2d 63 73 21 75 74 61 | 68 2d 67 72 21 74 68 6f |h-cs!uta|h-gr!tho|
|00005020| 6d 61 73 29 0a 20 2a 09 | 09 4a 69 6d 20 4d 63 4b |mas). *.|.Jim McK|
|00005030| 69 65 09 09 28 64 65 63 | 76 61 78 21 6d 63 76 61 |ie..(dec|vax!mcva|
|00005040| 78 21 6a 69 6d 29 0a 20 | 2a 09 09 53 74 65 76 65 |x!jim). |*..Steve|
|00005050| 20 44 61 76 69 65 73 09 | 09 28 64 65 63 76 61 78 | Davies.|.(decvax|
|00005060| 21 76 61 78 31 33 35 21 | 70 65 74 73 64 21 70 65 |!vax135!|petsd!pe|
|00005070| 6f 72 61 21 73 72 64 29 | 0a 20 2a 09 09 4b 65 6e |ora!srd)|. *..Ken|
|00005080| 20 54 75 72 6b 6f 77 73 | 6b 69 09 09 28 64 65 63 | Turkows|ki..(dec|
|00005090| 76 61 78 21 64 65 63 77 | 72 6c 21 74 75 72 74 6c |vax!decw|rl!turtl|
|000050a0| 65 76 61 78 21 6b 65 6e | 29 0a 20 2a 09 09 4a 61 |evax!ken|). *..Ja|
|000050b0| 6d 65 73 20 41 2e 20 57 | 6f 6f 64 73 09 09 28 64 |mes A. W|oods..(d|
|000050c0| 65 63 76 61 78 21 69 68 | 6e 70 34 21 61 6d 65 73 |ecvax!ih|np4!ames|
|000050d0| 21 6a 61 77 29 0a 20 2a | 09 09 4a 6f 65 20 4f 72 |!jaw). *|..Joe Or|
|000050e0| 6f 73 74 09 09 28 64 65 | 63 76 61 78 21 76 61 78 |ost..(de|cvax!vax|
|000050f0| 31 33 35 21 70 65 74 73 | 64 21 6a 6f 65 29 0a 20 |135!pets|d!joe). |
|00005100| 2a 0a 20 2a 20 24 48 65 | 61 64 65 72 3a 20 63 6f |*. * $He|ader: co|
|00005110| 6d 70 72 65 73 73 2e 63 | 2c 76 20 34 2e 30 20 38 |mpress.c|,v 4.0 8|
|00005120| 35 2f 30 37 2f 33 30 20 | 31 32 3a 35 30 3a 30 30 |5/07/30 |12:50:00|
|00005130| 20 6a 6f 65 20 52 65 6c | 65 61 73 65 20 24 0a 20 | joe Rel|ease $. |
|00005140| 2a 20 24 4c 6f 67 3a 09 | 63 6f 6d 70 72 65 73 73 |* $Log:.|compress|
|00005150| 2e 63 2c 76 20 24 0a 20 | 2a 20 52 65 76 69 73 69 |.c,v $. |* Revisi|
|00005160| 6f 6e 20 34 2e 30 20 20 | 38 35 2f 30 37 2f 33 30 |on 4.0 |85/07/30|
|00005170| 20 20 31 32 3a 35 30 3a | 30 30 20 20 6a 6f 65 0a | 12:50:|00 joe.|
|00005180| 20 2a 20 52 65 6d 6f 76 | 65 64 20 66 65 72 72 6f | * Remov|ed ferro|
|00005190| 72 28 29 20 63 61 6c 6c | 73 20 69 6e 20 6f 75 74 |r() call|s in out|
|000051a0| 70 75 74 20 72 6f 75 74 | 69 6e 65 20 6f 6e 20 65 |put rout|ine on e|
|000051b0| 76 65 72 79 20 6f 75 74 | 70 75 74 20 65 78 63 65 |very out|put exce|
|000051c0| 70 74 20 66 69 72 73 74 | 2e 0a 20 2a 20 50 72 65 |pt first|.. * Pre|
|000051d0| 70 61 72 65 64 20 66 6f | 72 20 72 65 6c 65 61 73 |pared fo|r releas|
|000051e0| 65 20 74 6f 20 74 68 65 | 20 77 6f 72 6c 64 2e 0a |e to the| world..|
|000051f0| 20 2a 20 0a 20 2a 20 52 | 65 76 69 73 69 6f 6e 20 | * . * R|evision |
|00005200| 33 2e 36 20 20 38 35 2f | 30 37 2f 30 34 20 20 30 |3.6 85/|07/04 0|
|00005210| 31 3a 32 32 3a 32 31 20 | 20 6a 6f 65 0a 20 2a 20 |1:22:21 | joe. * |
|00005220| 52 65 6d 6f 76 65 20 6d | 75 63 68 20 77 61 73 74 |Remove m|uch wast|
|00005230| 65 64 20 73 74 6f 72 61 | 67 65 20 62 79 20 6f 76 |ed stora|ge by ov|
|00005240| 65 72 6c 61 79 69 6e 67 | 20 68 61 73 68 20 74 61 |erlaying| hash ta|
|00005250| 62 6c 65 20 77 69 74 68 | 20 74 68 65 20 74 61 62 |ble with| the tab|
|00005260| 6c 65 73 0a 20 2a 20 75 | 73 65 64 20 62 79 20 64 |les. * u|sed by d|
|00005270| 65 63 6f 6d 70 72 65 73 | 73 3a 20 74 61 62 5f 73 |ecompres|s: tab_s|
|00005280| 75 66 66 69 78 5b 31 3c | 3c 42 49 54 53 5d 2c 20 |uffix[1<|<BITS], |
|00005290| 73 74 61 63 6b 5b 38 30 | 30 30 5d 2e 20 20 55 70 |stack[80|00]. Up|
|000052a0| 64 61 74 65 64 20 55 53 | 45 52 4d 45 4d 0a 20 2a |dated US|ERMEM. *|
|000052b0| 20 63 6f 6d 70 75 74 61 | 74 69 6f 6e 73 2e 20 20 | computa|tions. |
|000052c0| 46 69 78 65 64 20 64 75 | 6d 70 5f 74 61 62 28 29 |Fixed du|mp_tab()|
|000052d0| 20 44 45 42 55 47 20 72 | 6f 75 74 69 6e 65 2e 0a | DEBUG r|outine..|
|000052e0| 20 2a 0a 20 2a 20 52 65 | 76 69 73 69 6f 6e 20 33 | *. * Re|vision 3|
|000052f0| 2e 35 20 20 38 35 2f 30 | 36 2f 33 30 20 20 32 30 |.5 85/0|6/30 20|
|00005300| 3a 34 37 3a 32 31 20 20 | 6a 61 77 0a 20 2a 20 43 |:47:21 |jaw. * C|
|00005310| 68 61 6e 67 65 20 68 61 | 73 68 20 66 75 6e 63 74 |hange ha|sh funct|
|00005320| 69 6f 6e 20 74 6f 20 75 | 73 65 20 65 78 63 6c 75 |ion to u|se exclu|
|00005330| 73 69 76 65 2d 6f 72 2e | 20 20 52 69 70 20 6f 75 |sive-or.| Rip ou|
|00005340| 74 20 68 61 73 68 20 63 | 61 63 68 65 2e 20 20 54 |t hash c|ache. T|
|00005350| 68 65 73 65 0a 20 2a 20 | 73 70 65 65 64 75 70 73 |hese. * |speedups|
|00005360| 20 72 65 6e 64 65 72 20 | 74 68 65 20 6d 65 67 61 | render |the mega|
|00005370| 6d 65 6d 6f 72 79 20 76 | 65 72 73 69 6f 6e 20 64 |memory v|ersion d|
|00005380| 65 66 75 6e 63 74 2c 20 | 66 6f 72 20 6e 6f 77 2e |efunct, |for now.|
|00005390| 20 20 4d 61 6b 65 20 64 | 65 63 6f 64 65 72 0a 20 | Make d|ecoder. |
|000053a0| 2a 20 73 74 61 63 6b 20 | 67 6c 6f 62 61 6c 2e 20 |* stack |global. |
|000053b0| 20 50 61 72 74 73 20 6f | 66 20 74 68 65 20 52 43 | Parts o|f the RC|
|000053c0| 53 20 74 72 75 6e 6b 73 | 20 32 2e 37 2c 20 32 2e |S trunks| 2.7, 2.|
|000053d0| 36 2c 20 61 6e 64 20 32 | 2e 31 20 6e 6f 20 6c 6f |6, and 2|.1 no lo|
|000053e0| 6e 67 65 72 20 61 70 70 | 6c 79 2e 0a 20 2a 0a 20 |nger app|ly.. *. |
|000053f0| 2a 20 52 65 76 69 73 69 | 6f 6e 20 33 2e 34 20 20 |* Revisi|on 3.4 |
|00005400| 38 35 2f 30 36 2f 32 37 | 20 20 31 32 3a 30 30 3a |85/06/27| 12:00:|
|00005410| 30 30 20 20 6b 65 6e 0a | 20 2a 20 47 65 74 20 72 |00 ken.| * Get r|
|00005420| 69 64 20 6f 66 20 61 6c | 6c 20 66 6c 6f 61 74 69 |id of al|l floati|
|00005430| 6e 67 2d 70 6f 69 6e 74 | 20 63 61 6c 63 75 6c 61 |ng-point| calcula|
|00005440| 74 69 6f 6e 73 20 62 79 | 20 64 6f 69 6e 67 20 61 |tions by| doing a|
|00005450| 6c 6c 20 63 6f 6d 70 72 | 65 73 73 69 6f 6e 20 72 |ll compr|ession r|
|00005460| 61 74 69 6f 0a 20 2a 20 | 63 61 6c 63 75 6c 61 74 |atio. * |calculat|
|00005470| 69 6f 6e 73 20 69 6e 20 | 66 69 78 65 64 20 70 6f |ions in |fixed po|
|00005480| 69 6e 74 2e 0a 20 2a 0a | 20 2a 20 52 65 76 69 73 |int.. *.| * Revis|
|00005490| 69 6f 6e 20 33 2e 33 20 | 20 38 35 2f 30 36 2f 32 |ion 3.3 | 85/06/2|
|000054a0| 34 20 20 32 31 3a 35 33 | 3a 32 34 20 20 6a 6f 65 |4 21:53|:24 joe|
|000054b0| 0a 20 2a 20 49 6e 63 6f | 72 70 6f 72 61 74 65 20 |. * Inco|rporate |
|000054c0| 70 6f 72 74 61 62 69 6c | 69 74 79 20 73 75 67 67 |portabil|ity sugg|
|000054d0| 65 73 74 69 6f 6e 20 66 | 6f 72 20 4d 5f 58 45 4e |estion f|or M_XEN|
|000054e0| 49 58 2e 20 20 47 6f 74 | 20 72 69 64 20 6f 66 20 |IX. Got| rid of |
|000054f0| 74 65 78 74 20 6f 6e 20 | 23 65 6c 73 65 0a 20 2a |text on |#else. *|
|00005500| 20 61 6e 64 20 23 65 6e | 64 69 66 20 6c 69 6e 65 | and #en|dif line|
|00005510| 73 2e 20 20 43 6c 65 61 | 6e 65 64 20 75 70 20 23 |s. Clea|ned up #|
|00005520| 69 66 64 65 66 73 20 66 | 6f 72 20 76 61 78 20 61 |ifdefs f|or vax a|
|00005530| 6e 64 20 69 6e 74 65 72 | 64 61 74 61 2e 0a 20 2a |nd inter|data.. *|
|00005540| 0a 20 2a 20 52 65 76 69 | 73 69 6f 6e 20 33 2e 32 |. * Revi|sion 3.2|
|00005550| 20 20 38 35 2f 30 36 2f | 30 36 20 20 32 31 3a 35 | 85/06/|06 21:5|
|00005560| 33 3a 32 34 20 20 6a 61 | 77 0a 20 2a 20 49 6e 63 |3:24 ja|w. * Inc|
|00005570| 6f 72 70 6f 72 61 74 65 | 20 70 6f 72 74 61 62 69 |orporate| portabi|
|00005580| 6c 69 74 79 20 73 75 67 | 67 65 73 74 69 6f 6e 73 |lity sug|gestions|
|00005590| 20 66 6f 72 20 5a 38 30 | 30 30 2c 20 49 42 4d 20 | for Z80|00, IBM |
|000055a0| 50 43 2f 58 54 20 66 72 | 6f 6d 20 6d 61 69 6c 69 |PC/XT fr|om maili|
|000055b0| 6e 67 20 6c 69 73 74 2e | 0a 20 2a 20 44 65 66 61 |ng list.|. * Defa|
|000055c0| 75 6c 74 20 74 6f 20 22 | 71 75 69 65 74 22 20 6f |ult to "|quiet" o|
|000055d0| 75 74 70 75 74 20 28 6e | 6f 20 63 6f 6d 70 72 65 |utput (n|o compre|
|000055e0| 73 73 69 6f 6e 20 73 74 | 61 74 69 73 74 69 63 73 |ssion st|atistics|
|000055f0| 29 2e 0a 20 2a 0a 20 2a | 20 52 65 76 69 73 69 6f |).. *. *| Revisio|
|00005600| 6e 20 33 2e 31 20 20 38 | 35 2f 30 35 2f 31 32 20 |n 3.1 8|5/05/12 |
|00005610| 20 31 38 3a 35 36 3a 31 | 33 20 20 6a 61 77 0a 20 | 18:56:1|3 jaw. |
|00005620| 2a 20 49 6e 74 65 67 72 | 61 74 65 20 64 65 63 6f |* Integr|ate deco|
|00005630| 6d 70 72 65 73 73 28 29 | 20 73 74 61 63 6b 20 73 |mpress()| stack s|
|00005640| 70 65 65 64 75 70 73 20 | 28 66 72 6f 6d 20 65 61 |peedups |(from ea|
|00005650| 72 6c 79 20 70 6f 69 6e | 74 65 72 20 6d 6f 64 73 |rly poin|ter mods|
|00005660| 20 62 79 20 4d 63 4b 69 | 65 29 2e 0a 20 2a 20 52 | by McKi|e).. * R|
|00005670| 65 70 61 69 72 20 6d 75 | 6c 74 69 2d 66 69 6c 65 |epair mu|lti-file|
|00005680| 20 55 53 45 52 4d 45 4d | 20 67 61 66 66 65 2e 20 | USERMEM| gaffe. |
|00005690| 20 55 6e 69 66 79 20 27 | 66 6f 72 63 65 27 20 66 | Unify '|force' f|
|000056a0| 6c 61 67 73 20 74 6f 20 | 6d 69 6d 69 63 20 73 65 |lags to |mimic se|
|000056b0| 6d 61 6e 74 69 63 73 0a | 20 2a 20 6f 66 20 53 56 |mantics.| * of SV|
|000056c0| 52 32 20 27 70 61 63 6b | 27 2e 20 20 53 74 72 65 |R2 'pack|'. Stre|
|000056d0| 61 6d 6c 69 6e 65 20 62 | 6c 6f 63 6b 2d 63 6f 6d |amline b|lock-com|
|000056e0| 70 72 65 73 73 20 74 61 | 62 6c 65 20 63 6c 65 61 |press ta|ble clea|
|000056f0| 72 20 6c 6f 67 69 63 2e | 20 20 49 6e 63 72 65 61 |r logic.| Increa|
|00005700| 73 65 20 0a 20 2a 20 6f | 75 74 70 75 74 20 62 79 |se . * o|utput by|
|00005710| 74 65 20 63 6f 75 6e 74 | 20 62 79 20 6d 61 67 69 |te count| by magi|
|00005720| 63 20 6e 75 6d 62 65 72 | 20 73 69 7a 65 2e 0a 20 |c number| size.. |
|00005730| 2a 20 0a 20 2a 20 52 65 | 76 69 73 69 6f 6e 20 33 |* . * Re|vision 3|
|00005740| 2e 30 20 20 20 38 34 2f | 31 31 2f 32 37 20 20 31 |.0 84/|11/27 1|
|00005750| 31 3a 35 30 3a 30 30 20 | 20 70 65 74 73 64 21 6a |1:50:00 | petsd!j|
|00005760| 6f 65 0a 20 2a 20 53 65 | 74 20 48 53 49 5a 45 20 |oe. * Se|t HSIZE |
|00005770| 64 65 70 65 6e 64 69 6e | 67 20 6f 6e 20 42 49 54 |dependin|g on BIT|
|00005780| 53 2e 20 20 53 65 74 20 | 42 49 54 53 20 64 65 70 |S. Set |BITS dep|
|00005790| 65 6e 64 69 6e 67 20 6f | 6e 20 55 53 45 52 4d 45 |ending o|n USERME|
|000057a0| 4d 2e 20 20 55 6e 72 6f | 6c 6c 65 64 0a 20 2a 20 |M. Unro|lled. * |
|000057b0| 6c 6f 6f 70 73 20 69 6e | 20 63 6c 65 61 72 20 72 |loops in| clear r|
|000057c0| 6f 75 74 69 6e 65 73 2e | 20 20 41 64 64 65 64 20 |outines.| Added |
|000057d0| 22 2d 43 22 20 66 6c 61 | 67 20 66 6f 72 20 32 2e |"-C" fla|g for 2.|
|000057e0| 30 20 63 6f 6d 70 61 74 | 69 62 69 6c 69 74 79 2e |0 compat|ibility.|
|000057f0| 20 20 55 73 65 64 0a 20 | 2a 20 75 6e 73 69 67 6e | Used. |* unsign|
|00005800| 65 64 20 63 6f 6d 70 61 | 72 65 73 20 6f 6e 20 50 |ed compa|res on P|
|00005810| 65 72 6b 69 6e 2d 45 6c | 6d 65 72 2e 20 20 46 69 |erkin-El|mer. Fi|
|00005820| 78 65 64 20 66 6f 72 65 | 67 72 6f 75 6e 64 20 63 |xed fore|ground c|
|00005830| 68 65 63 6b 2e 0a 20 2a | 0a 20 2a 20 52 65 76 69 |heck.. *|. * Revi|
|00005840| 73 69 6f 6e 20 32 2e 37 | 20 20 20 38 34 2f 31 31 |sion 2.7| 84/11|
|00005850| 2f 31 36 20 20 31 39 3a | 33 35 3a 33 39 20 20 61 |/16 19:|35:39 a|
|00005860| 6d 65 73 21 6a 61 77 0a | 20 2a 20 43 61 63 68 65 |mes!jaw.| * Cache|
|00005870| 20 63 6f 6d 6d 6f 6e 20 | 68 61 73 68 20 63 6f 64 | common |hash cod|
|00005880| 65 73 20 62 61 73 65 64 | 20 6f 6e 20 69 6e 70 75 |es based| on inpu|
|00005890| 74 20 73 74 61 74 69 73 | 74 69 63 73 3b 20 74 68 |t statis|tics; th|
|000058a0| 69 73 20 69 6d 70 72 6f | 76 65 73 0a 20 2a 20 70 |is impro|ves. * p|
|000058b0| 65 72 66 6f 72 6d 61 6e | 63 65 20 66 6f 72 20 6c |erforman|ce for l|
|000058c0| 6f 77 2d 64 65 6e 73 69 | 74 79 20 72 61 73 74 65 |ow-densi|ty raste|
|000058d0| 72 20 69 6d 61 67 65 73 | 2e 20 20 50 61 73 73 20 |r images|. Pass |
|000058e0| 6f 6e 20 23 69 66 64 65 | 66 20 62 75 6e 64 6c 65 |on #ifde|f bundle|
|000058f0| 0a 20 2a 20 66 72 6f 6d | 20 54 75 72 6b 6f 77 73 |. * from| Turkows|
|00005900| 6b 69 2e 0a 20 2a 0a 20 | 2a 20 52 65 76 69 73 69 |ki.. *. |* Revisi|
|00005910| 6f 6e 20 32 2e 36 20 20 | 20 38 34 2f 31 31 2f 30 |on 2.6 | 84/11/0|
|00005920| 35 20 20 31 39 3a 31 38 | 3a 32 31 20 20 61 6d 65 |5 19:18|:21 ame|
|00005930| 73 21 6a 61 77 0a 20 2a | 20 56 61 72 79 20 73 69 |s!jaw. *| Vary si|
|00005940| 7a 65 20 6f 66 20 68 61 | 73 68 20 74 61 62 6c 65 |ze of ha|sh table|
|00005950| 73 20 74 6f 20 72 65 64 | 75 63 65 20 74 69 6d 65 |s to red|uce time|
|00005960| 20 66 6f 72 20 73 6d 61 | 6c 6c 20 66 69 6c 65 73 | for sma|ll files|
|00005970| 2e 0a 20 2a 20 54 75 6e | 65 20 50 44 50 2d 31 31 |.. * Tun|e PDP-11|
|00005980| 20 68 61 73 68 20 66 75 | 6e 63 74 69 6f 6e 2e 0a | hash fu|nction..|
|00005990| 20 2a 0a 20 2a 20 52 65 | 76 69 73 69 6f 6e 20 32 | *. * Re|vision 2|
|000059a0| 2e 35 20 20 20 38 34 2f | 31 30 2f 33 30 20 20 32 |.5 84/|10/30 2|
|000059b0| 30 3a 31 35 3a 31 34 20 | 20 61 6d 65 73 21 6a 61 |0:15:14 | ames!ja|
|000059c0| 77 0a 20 2a 20 4a 75 6e | 6b 20 63 68 61 69 6e 69 |w. * Jun|k chaini|
|000059d0| 6e 67 3b 20 72 65 70 6c | 61 63 65 20 77 69 74 68 |ng; repl|ace with|
|000059e0| 20 74 68 65 20 73 69 6d | 70 6c 65 72 20 28 61 6e | the sim|pler (an|
|000059f0| 64 2c 20 6f 6e 20 74 68 | 65 20 56 41 58 2c 20 66 |d, on th|e VAX, f|
|00005a00| 61 73 74 65 72 29 0a 20 | 2a 20 64 6f 75 62 6c 65 |aster). |* double|
|00005a10| 20 68 61 73 68 69 6e 67 | 2c 20 64 69 73 63 75 73 | hashing|, discus|
|00005a20| 73 65 64 20 77 69 74 68 | 69 6e 2e 20 20 4d 61 6b |sed with|in. Mak|
|00005a30| 65 20 62 6c 6f 63 6b 20 | 63 6f 6d 70 72 65 73 73 |e block |compress|
|00005a40| 69 6f 6e 20 73 74 61 6e | 64 61 72 64 2e 0a 20 2a |ion stan|dard.. *|
|00005a50| 0a 20 2a 20 52 65 76 69 | 73 69 6f 6e 20 32 2e 34 |. * Revi|sion 2.4|
|00005a60| 20 20 20 38 34 2f 31 30 | 2f 31 36 20 20 31 31 3a | 84/10|/16 11:|
|00005a70| 31 31 3a 31 31 20 20 61 | 6d 65 73 21 6a 61 77 0a |11:11 a|mes!jaw.|
|00005a80| 20 2a 20 49 6e 74 72 6f | 64 75 63 65 20 61 64 61 | * Intro|duce ada|
|00005a90| 70 74 69 76 65 20 72 65 | 73 65 74 20 66 6f 72 20 |ptive re|set for |
|00005aa0| 62 6c 6f 63 6b 20 63 6f | 6d 70 72 65 73 73 69 6f |block co|mpressio|
|00005ab0| 6e 2c 20 74 6f 20 62 6f | 6f 73 74 20 74 68 65 20 |n, to bo|ost the |
|00005ac0| 72 61 74 65 0a 20 2a 20 | 61 6e 6f 74 68 65 72 20 |rate. * |another |
|00005ad0| 73 65 76 65 72 61 6c 20 | 70 65 72 63 65 6e 74 2e |several |percent.|
|00005ae0| 20 20 28 53 65 65 20 6d | 61 69 6c 69 6e 67 20 6c | (See m|ailing l|
|00005af0| 69 73 74 20 6e 6f 74 65 | 73 2e 29 0a 20 2a 0a 20 |ist note|s.). *. |
|00005b00| 2a 20 52 65 76 69 73 69 | 6f 6e 20 32 2e 33 20 20 |* Revisi|on 2.3 |
|00005b10| 20 38 34 2f 30 39 2f 32 | 32 20 20 32 32 3a 30 30 | 84/09/2|2 22:00|
|00005b20| 3a 30 30 20 20 70 65 74 | 73 64 21 6a 6f 65 0a 20 |:00 pet|sd!joe. |
|00005b30| 2a 20 49 6d 70 6c 65 6d | 65 6e 74 65 64 20 22 2d |* Implem|ented "-|
|00005b40| 42 22 20 62 6c 6f 63 6b | 20 63 6f 6d 70 72 65 73 |B" block| compres|
|00005b50| 73 2e 20 20 49 6d 70 6c | 65 6d 65 6e 74 65 64 20 |s. Impl|emented |
|00005b60| 52 45 56 45 52 53 45 20 | 73 6f 72 74 69 6e 67 20 |REVERSE |sorting |
|00005b70| 6f 66 20 74 61 62 5f 6e | 65 78 74 2e 0a 20 2a 20 |of tab_n|ext.. * |
|00005b80| 42 75 67 20 66 69 78 20 | 66 6f 72 20 6c 61 73 74 |Bug fix |for last|
|00005b90| 20 62 69 74 73 2e 20 20 | 43 68 61 6e 67 65 64 20 | bits. |Changed |
|00005ba0| 66 77 72 69 74 65 20 74 | 6f 20 70 75 74 63 68 61 |fwrite t|o putcha|
|00005bb0| 72 20 6c 6f 6f 70 20 65 | 76 65 72 79 77 68 65 72 |r loop e|verywher|
|00005bc0| 65 2e 0a 20 2a 0a 20 2a | 20 52 65 76 69 73 69 6f |e.. *. *| Revisio|
|00005bd0| 6e 20 32 2e 32 20 20 20 | 38 34 2f 30 39 2f 31 38 |n 2.2 |84/09/18|
|00005be0| 20 20 31 34 3a 31 32 3a | 32 31 20 20 61 6d 65 73 | 14:12:|21 ames|
|00005bf0| 21 6a 61 77 0a 20 2a 20 | 46 6f 6c 64 20 69 6e 20 |!jaw. * |Fold in |
|00005c00| 6e 65 77 73 20 63 68 61 | 6e 67 65 73 2c 20 73 6d |news cha|nges, sm|
|00005c10| 61 6c 6c 20 6d 61 63 68 | 69 6e 65 20 74 79 70 65 |all mach|ine type|
|00005c20| 64 65 66 20 66 72 6f 6d | 20 74 68 6f 6d 61 73 2c |def from| thomas,|
|00005c30| 0a 20 2a 20 23 69 66 64 | 65 66 20 69 6e 74 65 72 |. * #ifd|ef inter|
|00005c40| 64 61 74 61 20 66 72 6f | 6d 20 6a 6f 65 2e 0a 20 |data fro|m joe.. |
|00005c50| 2a 0a 20 2a 20 52 65 76 | 69 73 69 6f 6e 20 32 2e |*. * Rev|ision 2.|
|00005c60| 31 20 20 20 38 34 2f 30 | 39 2f 31 30 20 20 31 32 |1 84/0|9/10 12|
|00005c70| 3a 33 34 3a 35 36 20 20 | 61 6d 65 73 21 6a 61 77 |:34:56 |ames!jaw|
|00005c80| 0a 20 2a 20 43 6f 6e 66 | 69 67 75 72 65 64 20 66 |. * Conf|igured f|
|00005c90| 61 73 74 20 74 61 62 6c | 65 20 6c 6f 6f 6b 75 70 |ast tabl|e lookup|
|00005ca0| 20 66 6f 72 20 33 32 2d | 62 69 74 20 6d 61 63 68 | for 32-|bit mach|
|00005cb0| 69 6e 65 73 2e 0a 20 2a | 20 54 68 69 73 20 63 75 |ines.. *| This cu|
|00005cc0| 74 73 20 75 73 65 72 20 | 74 69 6d 65 20 69 6e 20 |ts user |time in |
|00005cd0| 68 61 6c 66 20 66 6f 72 | 20 62 20 3c 3d 20 46 42 |half for| b <= FB|
|00005ce0| 49 54 53 2c 20 61 6e 64 | 20 69 73 20 75 73 65 66 |ITS, and| is usef|
|00005cf0| 75 6c 20 66 6f 72 20 6e | 65 77 73 20 62 61 74 63 |ul for n|ews batc|
|00005d00| 68 69 6e 67 0a 20 2a 20 | 66 72 6f 6d 20 56 41 58 |hing. * |from VAX|
|00005d10| 20 74 6f 20 50 44 50 20 | 73 69 74 65 73 2e 20 20 | to PDP |sites. |
|00005d20| 41 6c 73 6f 20 73 70 65 | 64 20 75 70 20 64 65 63 |Also spe|d up dec|
|00005d30| 6f 6d 70 72 65 73 73 28 | 29 20 5b 66 77 72 69 74 |ompress(|) [fwrit|
|00005d40| 65 2d 3e 70 75 74 63 5d | 20 61 6e 64 0a 20 2a 20 |e->putc]| and. * |
|00005d50| 61 64 64 65 64 20 73 69 | 67 6e 61 6c 20 63 61 74 |added si|gnal cat|
|00005d60| 63 68 65 72 20 5b 70 6c | 75 73 20 62 65 65 66 20 |cher [pl|us beef |
|00005d70| 69 6e 20 77 72 69 74 65 | 65 72 72 28 29 5d 20 74 |in write|err()] t|
|00005d80| 6f 20 64 65 6c 65 74 65 | 20 65 66 66 6c 75 76 69 |o delete| effluvi|
|00005d90| 61 2e 0a 20 2a 0a 20 2a | 20 52 65 76 69 73 69 6f |a.. *. *| Revisio|
|00005da0| 6e 20 32 2e 30 20 20 20 | 38 34 2f 30 38 2f 32 38 |n 2.0 |84/08/28|
|00005db0| 20 20 32 32 3a 30 30 3a | 30 30 20 20 70 65 74 73 | 22:00:|00 pets|
|00005dc0| 64 21 6a 6f 65 0a 20 2a | 20 41 64 64 20 63 68 65 |d!joe. *| Add che|
|00005dd0| 63 6b 20 66 6f 72 20 66 | 6f 72 65 67 72 6f 75 6e |ck for f|oregroun|
|00005de0| 64 20 62 65 66 6f 72 65 | 20 70 72 6f 6d 70 74 69 |d before| prompti|
|00005df0| 6e 67 20 75 73 65 72 2e | 20 20 49 6e 73 65 72 74 |ng user.| Insert|
|00005e00| 20 6d 61 78 62 69 74 73 | 20 69 6e 74 6f 0a 20 2a | maxbits| into. *|
|00005e10| 20 63 6f 6d 70 72 65 73 | 73 65 64 20 66 69 6c 65 | compres|sed file|
|00005e20| 2e 20 20 46 6f 72 63 65 | 20 66 69 6c 65 20 62 65 |. Force| file be|
|00005e30| 69 6e 67 20 75 6e 63 6f | 6d 70 72 65 73 73 65 64 |ing unco|mpressed|
|00005e40| 20 74 6f 20 65 6e 64 20 | 77 69 74 68 20 22 2e 5a | to end |with ".Z|
|00005e50| 22 2e 0a 20 2a 20 41 64 | 64 65 64 20 22 2d 63 22 |".. * Ad|ded "-c"|
|00005e60| 20 66 6c 61 67 20 61 6e | 64 20 22 7a 63 61 74 22 | flag an|d "zcat"|
|00005e70| 2e 20 20 50 72 65 70 61 | 72 65 64 20 66 6f 72 20 |. Prepa|red for |
|00005e80| 72 65 6c 65 61 73 65 2e | 0a 20 2a 0a 20 2a 20 52 |release.|. *. * R|
|00005e90| 65 76 69 73 69 6f 6e 20 | 31 2e 31 30 20 20 38 34 |evision |1.10 84|
|00005ea0| 2f 30 38 2f 32 34 20 20 | 31 38 3a 32 38 3a 30 30 |/08/24 |18:28:00|
|00005eb0| 20 20 74 75 72 74 6c 65 | 76 61 78 21 6b 65 6e 0a | turtle|vax!ken.|
|00005ec0| 20 2a 20 57 69 6c 6c 20 | 6f 6e 6c 79 20 63 6f 6d | * Will |only com|
|00005ed0| 70 72 65 73 73 20 72 65 | 67 75 6c 61 72 20 66 69 |press re|gular fi|
|00005ee0| 6c 65 73 20 28 6e 6f 20 | 64 69 72 65 63 74 6f 72 |les (no |director|
|00005ef0| 69 65 73 29 2c 20 61 64 | 64 65 64 20 61 20 6d 61 |ies), ad|ded a ma|
|00005f00| 67 69 63 20 6e 75 6d 62 | 65 72 0a 20 2a 20 68 65 |gic numb|er. * he|
|00005f10| 61 64 65 72 20 28 70 6c | 75 73 20 61 6e 20 75 6e |ader (pl|us an un|
|00005f20| 64 6f 63 75 6d 65 6e 74 | 65 64 20 2d 6e 20 66 6c |document|ed -n fl|
|00005f30| 61 67 20 74 6f 20 68 61 | 6e 64 6c 65 20 6f 6c 64 |ag to ha|ndle old|
|00005f40| 20 66 69 6c 65 73 20 77 | 69 74 68 6f 75 74 20 68 | files w|ithout h|
|00005f50| 65 61 64 65 72 73 29 2c | 0a 20 2a 20 61 64 64 65 |eaders),|. * adde|
|00005f60| 64 20 2d 66 20 66 6c 61 | 67 20 74 6f 20 66 6f 72 |d -f fla|g to for|
|00005f70| 63 65 20 6f 76 65 72 77 | 72 69 74 69 6e 67 20 6f |ce overw|riting o|
|00005f80| 66 20 70 6f 73 73 69 62 | 6c 79 20 65 78 69 73 74 |f possib|ly exist|
|00005f90| 69 6e 67 20 64 65 73 74 | 69 6e 61 74 69 6f 6e 20 |ing dest|ination |
|00005fa0| 66 69 6c 65 2c 0a 20 2a | 20 6f 74 68 65 72 77 69 |file,. *| otherwi|
|00005fb0| 73 65 20 74 68 65 20 75 | 73 65 72 20 69 73 20 70 |se the u|ser is p|
|00005fc0| 72 6f 6d 70 74 65 64 20 | 66 6f 72 20 61 20 72 65 |rompted |for a re|
|00005fd0| 73 70 6f 6e 73 65 2e 20 | 20 57 69 6c 6c 20 74 61 |sponse. | Will ta|
|00005fe0| 63 6b 20 6f 6e 20 61 20 | 2e 5a 20 74 6f 20 61 0a |ck on a |.Z to a.|
|00005ff0| 20 2a 20 66 69 6c 65 6e | 61 6d 65 20 69 66 20 69 | * filen|ame if i|
|00006000| 74 20 64 6f 65 73 6e 27 | 74 20 68 61 76 65 20 6f |t doesn'|t have o|
|00006010| 6e 65 20 77 68 65 6e 20 | 64 65 63 6f 6d 70 72 65 |ne when |decompre|
|00006020| 73 73 69 6e 67 2e 20 20 | 57 69 6c 6c 20 6f 6e 6c |ssing. |Will onl|
|00006030| 79 20 72 65 70 6c 61 63 | 65 0a 20 2a 20 66 69 6c |y replac|e. * fil|
|00006040| 65 20 69 66 20 69 74 20 | 77 61 73 20 63 6f 6d 70 |e if it |was comp|
|00006050| 72 65 73 73 65 64 2e 0a | 20 2a 0a 20 2a 20 52 65 |ressed..| *. * Re|
|00006060| 76 69 73 69 6f 6e 20 31 | 2e 39 20 20 38 34 2f 30 |vision 1|.9 84/0|
|00006070| 38 2f 31 36 20 20 31 37 | 3a 32 38 3a 30 30 20 20 |8/16 17|:28:00 |
|00006080| 74 75 72 74 6c 65 76 61 | 78 21 6b 65 6e 0a 20 2a |turtleva|x!ken. *|
|00006090| 20 52 65 6d 6f 76 65 64 | 20 73 63 61 6e 61 72 67 | Removed| scanarg|
|000060a0| 73 28 29 2c 20 67 65 74 | 6f 70 74 28 29 2c 20 61 |s(), get|opt(), a|
|000060b0| 64 64 65 64 20 2e 5a 20 | 65 78 74 65 6e 73 69 6f |dded .Z |extensio|
|000060c0| 6e 20 61 6e 64 20 75 6e | 6c 69 6d 69 74 65 64 20 |n and un|limited |
|000060d0| 6e 75 6d 62 65 72 20 6f | 66 0a 20 2a 20 66 69 6c |number o|f. * fil|
|000060e0| 65 6e 61 6d 65 73 20 74 | 6f 20 63 6f 6d 70 72 65 |enames t|o compre|
|000060f0| 73 73 2e 20 20 46 6c 61 | 67 73 20 6d 61 79 20 62 |ss. Fla|gs may b|
|00006100| 65 20 63 6c 75 73 74 65 | 72 65 64 20 28 2d 44 64 |e cluste|red (-Dd|
|00006110| 76 62 31 32 29 20 6f 72 | 20 73 65 70 61 72 61 74 |vb12) or| separat|
|00006120| 65 64 0a 20 2a 20 28 2d | 44 20 2d 64 20 2d 76 20 |ed. * (-|D -d -v |
|00006130| 2d 62 20 31 32 29 2c 20 | 6f 72 20 63 6f 6d 62 69 |-b 12), |or combi|
|00006140| 6e 61 74 69 6f 6e 20 74 | 68 65 72 65 6f 66 2e 20 |nation t|hereof. |
|00006150| 20 4d 6f 64 65 73 20 61 | 6e 64 20 6f 74 68 65 72 | Modes a|nd other|
|00006160| 20 73 74 61 74 75 73 20 | 69 73 0a 20 2a 20 63 6f | status |is. * co|
|00006170| 70 69 65 64 20 77 69 74 | 68 20 63 6f 70 79 73 74 |pied wit|h copyst|
|00006180| 61 74 28 29 2e 20 20 2d | 4f 20 62 75 67 20 66 6f |at(). -|O bug fo|
|00006190| 72 20 34 2e 32 20 73 65 | 65 6d 73 20 74 6f 20 68 |r 4.2 se|ems to h|
|000061a0| 61 76 65 20 64 69 73 61 | 70 70 65 61 72 65 64 20 |ave disa|ppeared |
|000061b0| 77 69 74 68 0a 20 2a 20 | 31 2e 38 2e 0a 20 2a 0a |with. * |1.8.. *.|
|000061c0| 20 2a 20 52 65 76 69 73 | 69 6f 6e 20 31 2e 38 20 | * Revis|ion 1.8 |
|000061d0| 20 38 34 2f 30 38 2f 30 | 39 20 20 32 33 3a 31 35 | 84/08/0|9 23:15|
|000061e0| 3a 30 30 20 20 6a 6f 65 | 0a 20 2a 20 4d 61 64 65 |:00 joe|. * Made|
|000061f0| 20 69 74 20 63 6f 6d 70 | 61 74 69 62 6c 65 20 77 | it comp|atible w|
|00006200| 69 74 68 20 76 61 78 20 | 76 65 72 73 69 6f 6e 2c |ith vax |version,|
|00006210| 20 69 6e 73 74 61 6c 6c | 65 64 20 6a 69 6d 27 73 | install|ed jim's|
|00006220| 20 66 69 78 65 73 2f 65 | 6e 68 61 6e 63 65 6d 65 | fixes/e|nhanceme|
|00006230| 6e 74 73 0a 20 2a 0a 20 | 2a 20 52 65 76 69 73 69 |nts. *. |* Revisi|
|00006240| 6f 6e 20 31 2e 36 20 20 | 38 34 2f 30 38 2f 30 31 |on 1.6 |84/08/01|
|00006250| 20 20 32 32 3a 30 38 3a | 30 30 20 20 6a 6f 65 0a | 22:08:|00 joe.|
|00006260| 20 2a 20 53 70 65 64 20 | 75 70 20 61 6c 67 6f 72 | * Sped |up algor|
|00006270| 69 74 68 6d 20 73 69 67 | 6e 69 66 69 63 61 6e 74 |ithm sig|nificant|
|00006280| 6c 79 20 62 79 20 73 6f | 72 74 69 6e 67 20 74 68 |ly by so|rting th|
|00006290| 65 20 63 6f 6d 70 72 65 | 73 73 20 63 68 61 69 6e |e compre|ss chain|
|000062a0| 2e 0a 20 2a 0a 20 2a 20 | 52 65 76 69 73 69 6f 6e |.. *. * |Revision|
|000062b0| 20 31 2e 35 20 20 38 34 | 2f 30 37 2f 31 33 20 20 | 1.5 84|/07/13 |
|000062c0| 31 33 3a 31 31 3a 30 30 | 20 20 73 72 64 0a 20 2a |13:11:00| srd. *|
|000062d0| 20 41 64 64 65 64 20 43 | 20 76 65 72 73 69 6f 6e | Added C| version|
|000062e0| 20 6f 66 20 76 61 78 20 | 61 73 6d 20 72 6f 75 74 | of vax |asm rout|
|000062f0| 69 6e 65 73 2e 20 20 43 | 68 61 6e 67 65 64 20 73 |ines. C|hanged s|
|00006300| 74 72 75 63 74 75 72 65 | 20 74 6f 20 61 72 72 61 |tructure| to arra|
|00006310| 79 73 20 74 6f 0a 20 2a | 20 73 61 76 65 20 6d 75 |ys to. *| save mu|
|00006320| 63 68 20 6d 65 6d 6f 72 | 79 2e 20 20 44 6f 20 75 |ch memor|y. Do u|
|00006330| 6e 73 69 67 6e 65 64 20 | 63 6f 6d 70 61 72 65 73 |nsigned |compares|
|00006340| 20 77 68 65 72 65 20 70 | 6f 73 73 69 62 6c 65 20 | where p|ossible |
|00006350| 28 66 61 73 74 65 72 20 | 6f 6e 0a 20 2a 20 50 65 |(faster |on. * Pe|
|00006360| 72 6b 69 6e 2d 45 6c 6d | 65 72 29 0a 20 2a 0a 20 |rkin-Elm|er). *. |
|00006370| 2a 20 52 65 76 69 73 69 | 6f 6e 20 31 2e 34 20 20 |* Revisi|on 1.4 |
|00006380| 38 34 2f 30 37 2f 30 35 | 20 20 30 33 3a 31 31 3a |84/07/05| 03:11:|
|00006390| 31 31 20 20 74 68 6f 6d | 61 73 0a 20 2a 20 43 6c |11 thom|as. * Cl|
|000063a0| 65 61 6e 20 75 70 20 74 | 68 65 20 63 6f 64 65 20 |ean up t|he code |
|000063b0| 61 20 6c 69 74 74 6c 65 | 20 61 6e 64 20 6c 69 6e |a little| and lin|
|000063c0| 74 20 69 74 2e 20 20 28 | 4c 69 6e 74 20 63 6f 6d |t it. (|Lint com|
|000063d0| 70 6c 61 69 6e 73 20 61 | 62 6f 75 74 20 61 6c 6c |plains a|bout all|
|000063e0| 0a 20 2a 20 74 68 65 20 | 72 65 67 73 20 75 73 65 |. * the |regs use|
|000063f0| 64 20 69 6e 20 74 68 65 | 20 61 73 6d 2c 20 62 75 |d in the| asm, bu|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.