turbonss-getent: use 4K buffered writer

This commit is contained in:
Motiejus Jakštys 2022-07-14 06:46:50 +03:00
parent d731fe377b
commit c4e84be1a9

View File

@ -159,9 +159,7 @@ fn group(stdout: anytype, db: *const DB, keys: []const [*:0]const u8) u8 {
var it = compress.deltaDecompressionIterator(&vit); var it = compress.deltaDecompressionIterator(&vit);
// lines will be buffered, but flushed on every EOL. // lines will be buffered, but flushed on every EOL.
var line_writer = io.BufferedWriter(65536, @TypeOf(stdout)){ var line_writer = io.bufferedWriter(stdout);
.unbuffered_writer = stdout,
};
var i: usize = 0; var i: usize = 0;
while (it.nextMust()) |member_offset| : (i += 1) { while (it.nextMust()) |member_offset| : (i += 1) {
const puser = PackedUser.fromBytes(db.users[member_offset << 3 ..]); const puser = PackedUser.fromBytes(db.users[member_offset << 3 ..]);