Closed radevgit closed 1 year ago
For large DXF files, for performance reasons, it make sense to have the possibility to set the buffer size.
let mut buf_reader = BufReader::new(file);
let mut writer = BufWriter::new(file);
for example: let mut buf_reader = BufReader::with_capacity(buff_size, file);
let mut buf_reader = BufReader::with_capacity(buff_size, file);
The DEFAULT_BUF_SIZE is 8KB
You can create your own BufReader with any size and directly call load_with_encoding(&mut my_reader, encoding_rs::WINDOWS_1252) to load from anything that implements Read.
BufReader
load_with_encoding(&mut my_reader, encoding_rs::WINDOWS_1252)
Read
For large DXF files, for performance reasons, it make sense to have the possibility to set the buffer size.
let mut buf_reader = BufReader::new(file);
let mut writer = BufWriter::new(file);
for example:
let mut buf_reader = BufReader::with_capacity(buff_size, file);
The DEFAULT_BUF_SIZE is 8KB