This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open Core | |
open Async | |
(* Copy data from the reader to the writer, using the provided buffer | |
as scratch space *) | |
let rec copy_blocks buffer r w = | |
Reader.read r buffer | |
>>= function | |
| `Eof -> return () | |
| `Ok bytes_read -> |