mirror of
https://github.com/uutils/coreutils
synced 2024-12-14 07:12:44 +00:00
shred: expand buffer size from 512 to 65536 to reduce write calls
This buffer size matches GNU
This commit is contained in:
parent
3982fc58fd
commit
73d5c4474b
1 changed files with 2 additions and 1 deletions
|
@ -25,7 +25,8 @@ use uucore::error::{FromIo, UResult, USimpleError, UUsageError};
|
||||||
use uucore::libc::S_IWUSR;
|
use uucore::libc::S_IWUSR;
|
||||||
use uucore::{format_usage, show, show_if_err, util_name};
|
use uucore::{format_usage, show, show_if_err, util_name};
|
||||||
|
|
||||||
const BLOCK_SIZE: usize = 512;
|
// This block size seems to match GNU (2^16 = 65536)
|
||||||
|
const BLOCK_SIZE: usize = 1 << 16;
|
||||||
const NAME_CHARSET: &[u8] = b"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_.";
|
const NAME_CHARSET: &[u8] = b"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_.";
|
||||||
|
|
||||||
// Patterns as shown in the GNU coreutils shred implementation
|
// Patterns as shown in the GNU coreutils shred implementation
|
||||||
|
|
Loading…
Reference in a new issue