https://github.com/illdefined/pipebuf
Minimalistic pipeline buffer
https://github.com/illdefined/pipebuf
buffer command-line pipeline
Last synced: 9 months ago
JSON representation
Minimalistic pipeline buffer
- Host: GitHub
- URL: https://github.com/illdefined/pipebuf
- Owner: illdefined
- License: other
- Created: 2021-11-03T20:36:36.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-11-03T21:46:34.000Z (over 4 years ago)
- Last Synced: 2024-12-29T05:43:52.130Z (over 1 year ago)
- Topics: buffer, command-line, pipeline
- Language: C
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Synopsis
`pipebuf` is as a low‐overhead buffer for command pipelines.
## Usage
`pipebuf` reads from standard input and writes to standard output, buffering the data it passes through. The buffer
capacity can be adjusted by providing the size as a command line argument. If no size is provided, it will default to
1048576 (1 MiB).
At least one of standard input or standard output is required to be a pipe.
## Implementation notes
This tool relies on the Linux‐specific `splice(2)` system call.
Since the pipes themselves serve as buffers, the capacity is limited by the system’s maximum pipe size as set in
`/proc/sys/fs/pipe-max-size`.