WhitSoft Development
AIM Certificates  |  SlimFTPd  |  Trayconizer  |  UnFREEz  |  Help/Contact Sunday, 20 August 2017

Megabuffer 2.0

Megabuffer is a POSIX-compatible utility that copies its standard input to its standard output through a very large buffer and periodically prints its progress to standard error. This is useful if you are piping a bursty output, such as from a compressor, into a program that reads its input slowly but operates most efficiently if it never has to wait for input, such as netcat or ssh. The size of the buffer (in bytes) is specified on the command line.

An example use case:

tar -c . | xz -9 | megabuffer $((16*1024*1024)) | ssh calculon 'cat > example.tar.xz'

Megabuffer prints status like this:

[#######|         |###################################]  4.89 MiB  265 KiB/s

The # characters represent the region of the circular buffer that is occupied by data, and the blanks represent the region that is empty. The left number is the amount of data that has been written to the output, and the right number is the rate at which data is being written.


Download Megabuffer 2.0, pre-compiled for Linux: i386 x86_64

Download Megabuffer 2.0, pre-compiled for Mac OS X Snow Leopard: universal

Download Megabuffer source code (public domain)

This site is hosted by DreamHost Web Hosting.

© 1999-2017 WhitSoft Development and Matt Whitlock