tar: use stat data to avoid buffering where possible. needs tests.