Function bigtools::utils::file::split_file_into_chunks_by_size
source · pub fn split_file_into_chunks_by_size(
f: File,
chunks: u64,
) -> Result<Vec<(u64, u64)>>
Expand description
Split a file into n chunks
of roughly equal sizes. The file is split into
roughly equal sizes (by bytes), then each chunk is extended to the end of
the last line in that chunk. Importantly, this doesn’t split the file into
equal number of lines in each chunk. Also, the number of chunks may be lower
than the provided number (which, is most obvious when each chunk is only a single line).