Skip to content
/ splitx Public

A rust lib to split a text file (optionally with headers like CSV) into pieces with file sizes below a maximum

Notifications You must be signed in to change notification settings

g2wang/splitx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A rust lib to split a text file (optionally with headers like CSV) into pieces with file sizes below a maximum

Resources

Stars

Watchers

Forks

Packages

No packages published