# Batched sequences ## Source You should make all your sources return `BatchSequence` and then you can use the `.batched(count: Int)` function to drastically decrease the amount of single reads in the original source. Example: ```kt Path("text.txt") // Path .getFile() // File .openRead() // BatchSequence .batched(64) // BatchSequence ``` ## Sink You should make all your sinks take `BatchSequence` and then you can use the `.asBatch()` function to allow the sink to get multiple bytes at once. Example: ```kt val data = myData // Sequence .asBatch() // BatchSequence Path("text.txt") // Path .getOrCreateFile() // File .write(data) ```