Crates.io | splitx |
lib.rs | splitx |
version | 1.0.0 |
source | src |
created_at | 2024-08-10 18:51:12.598909 |
updated_at | 2024-08-10 18:51:12.598909 |
description | splitting a text file into pieces with the size of each piece below a specified maximum number of bytes on disk |
homepage | |
repository | https://github.com/g2wang/splitx |
max_upload_size | |
id | 1332630 |
size | 324,584 |
splitx is a tiny rust library for splitting a text file into pieces with the size of each piece below a specified maximum number of bytes on disk.
To use splitx
, add this to your Cargo.toml
:
[dependencies]
splitx = "1.0"
The library's split
function has the following arguments:
file_path: the path of the file to be split,
max_file_size_bytes: the maximum size of each piece of the file in bytes after splitting,
num_header_lines: how many lines are the file's header. If no header lines, use 0. Header lines will be kept in each of the pieces.
output_dir: where to write the pieces of the file.