Crate split_read

Crate split_read 

Source
Expand description

Split Read streams.

§Key Points

  • Can only separate by one byte.
  • Always zero-copy.

§Alternatives

  • 🦀 std::io::Lines makes more sense to use if you need to allocate every line. Otherwise it’s slower.
  • 🦀 slice::split convenient if you have the entire input in one slice. Faster on tiny inputs, slower on medium or large inputs (faster than std::io::Lines).
  • 📦 split_by significantly slower for separating by just one byte than any of the mentioned options, but can separate by multiple patterns of multiple bytes.

Performance comparison Performance comparison on tiny data

Structs§

Split
A Read splitter.

Enums§

Piece
A Split read result (from Split::next_piece).