[TUHS] the sin of buffering [offshoot of excise process from a pipeline]

Larry McVoy lm at mcvoy.com
Wed Jul 16 14:05:09 AEST 2014


On Tue, Jul 15, 2014 at 11:53:03PM -0400, John Cowan wrote:
> Larry McVoy scripsit:
> 
> > Want your stream compressed or uncompressed?
> > 
> > 	fpush(&stdin, fopen_vzip(stdin, "r"));
> 
> Me, I would have done it with freopen(stdin, "rv").

We tried that but the problem is that you can't encode all the options you
want in just a character.  Compression doesn't take options, the CRC/XOR
layer wants to know how big you might think the file is (because we 
support blocksizes from about 256B to 256K and we want to know the 
file size to guess the block size).
-- 
---
Larry McVoy            	     lm at mcvoy.com             http://www.mcvoy.com/lm 



More information about the TUHS mailing list