splitx

Crates.iosplitx
lib.rssplitx
version1.0.0
sourcesrc
created_at2024-08-10 18:51:12.598909
updated_at2024-08-10 18:51:12.598909
descriptionsplitting a text file into pieces with the size of each piece below a specified maximum number of bytes on disk
homepage
repositoryhttps://github.com/g2wang/splitx
max_upload_size
id1332630
size324,584
(g2wang)

documentation

README

splitx

Crates.io Documentation MIT licensed

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.

Usage

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.
Commit count: 0

cargo fmt