Options: -n N first N lines (default 10), -c N first N bytes, -q/-vcontrol the ==> file <== headers shown for multiple files.
Input is streamed in fixed-size chunks and reading stops as soon as thequota is met, so heading a huge file (or an endless pipe) is instant anduses constant memory. Binary data passes through unchanged.