lzcat: Use BufferedFile for reading inputs
This commit is contained in:
parent
3ec513ecf2
commit
081cd9f9af
Notes:
sideshowbarker
2024-07-16 22:22:13 +09:00
Author: https://github.com/timschumi Commit: https://github.com/SerenityOS/serenity/commit/081cd9f9af Pull-request: https://github.com/SerenityOS/serenity/pull/18180 Reviewed-by: https://github.com/gmta Reviewed-by: https://github.com/trflynn89 ✅
1 changed files with 2 additions and 1 deletions
|
@ -22,7 +22,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
args_parser.parse(arguments);
|
args_parser.parse(arguments);
|
||||||
|
|
||||||
auto file = TRY(Core::File::open_file_or_standard_stream(filename, Core::File::OpenMode::Read));
|
auto file = TRY(Core::File::open_file_or_standard_stream(filename, Core::File::OpenMode::Read));
|
||||||
auto stream = TRY(Compress::LzmaDecompressor::create_from_container(move(file)));
|
auto buffered_file = TRY(Core::BufferedFile::create(move(file)));
|
||||||
|
auto stream = TRY(Compress::LzmaDecompressor::create_from_container(move(buffered_file)));
|
||||||
|
|
||||||
// Arbitrarily chosen buffer size.
|
// Arbitrarily chosen buffer size.
|
||||||
Array<u8, 4096> buffer;
|
Array<u8, 4096> buffer;
|
||||||
|
|
Loading…
Add table
Reference in a new issue