Do    buffer -help



Or read this...


I have yet to write a manpage, so heres the documentation for the interim 
period.

A manpage is on the TODO list, by the way.

If you have any problems with the program, please let me know.  This isn't a
guarantee, but I will try.  I disclaim all liability, so don't sue me if I 
can't get something you want working.  Use at your own risk.  This software
is released under the condition that you follow the guidelines in the file
COPYING (included with this distribution), with the following clarification:
The file COPYING refers numerous times to "derivitave work".  The author 
(me) hereby states that usage of this program, unaltered, for any purpose
you may concoct does NOT count as a "derivitave work".  Use freely. =)

You're welcome to tinker with it, and if you make an improvement, or have 
used it in a way that I'm unlikely to have envisioned, or (especially!) fix
a bug, please let me know 
about it.

Buffer's available options:

short --long       default 
----------------------------------------------------------------------------
-h    --help       -

Displays a message similar to this one.



-v    --verbose

Displays more output data.  Use twice for "pedantic" verbosity, which is quite 
annoying.



-m    --minimum    600k

This is the outgoing-threshold.  Buffer will not output any data until it has 
accumulated this much in the buffer.  This is useful for data-chunking, to for
instance reduce seeking on a tape drive.



-t    --timeout    0

If data does not flow in either direction after this many seconds, buffer will
exit.  If set to 0, buffer will block indefinately.



-T    --throttle   90

This is the incoming-threshold.  After filling its buffer, Buffer will not 
accept any more incoming data until the data watermark falls to this amount 
(the default means it will continue until the data level drops to 90%).



-b    --buffersize 1M

This tells Buffer how large its buffer will be.  For some reason linux doesn't
like to malloc() more than 31.999M at a time.  I have no idea if this is true
on other UNIX varients.

For the --minimum and --buffersize, the letters 'k' and 'M' can be used to 
specify kilobytes and megabytes.  Decimals are not allowed, use '6500k' 
instead of '6.5M'.  '1k' means 1024, and '1M' means 1048576.  If timeout is 
set to 0, the program will block forever.  Stdin/stdout are assumed if 
filenames are omitted.



-p    --progress   b1b

Tells buffer how to display a progress meter.  Since its purpose is to shovel
any arbitrary kind of data, I couldn't write a simple catch-all progress meter
type.  Instead, I had to make it so you could tell it how to display the meter.

You are allowed to set two things:
a. The way the buffer water-mark is shown.  This is the first letter of the 
argument following -p (or --progress), and can be: 'b' (byte), 't' (thousands
of bytes), 'k' (1024 byte blocks), 'M' (millions of bytes), 'm' (1048576 byte
blocks), or 'p' (percentage).
b.  The way buffer displays incoming/outgoing data throughput.  This is the 
remainder of the argument following -p (or --progress), and can be any valid
number.  The normal number-suffixes (t, k, m, M) apply.  Alternately, instead
of a number, you can use "CD" (CD Data; 150t/s) or "CA" (CD Audio; 176.4t/s)
as a blocksize, and buffer will display an appropriate (2.1X, 1.2X, 0.4X)
representation, as compared to a 1X CD-ROM drive (in Data or Audio mode, 
respectively).

This might be complicated (being the one who wrote it, its hard for me to 
say), so I will provide some examples:

$ buffer -p pCD
this buffers data, showing the buffer-data-level as a percentage, and judging
throughput according to 1X CD-ROM data speed.

$ buffer -p m1k
This buffers data, showing buffer-data-level in megabytes, and judging 
throughput in kilobytes.