package bytream
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
A streaming bytes and crunching them library
Install
dune-project
Dependency
Authors
Maintainers
Sources
0.1.tar.gz
md5=5fbd3a2228d4c2704765e894cbdcb14b
sha512=a1f00142d14f6d0704ec9dd1fc7d1e028c653c86b565a32cdf05ee9b04f9d8133ac605f13d7202374489ae9f757d6d1e50e0849cf03960d9fba3017c15b560b9
doc/src/bytream.unix/bytream_unix.ml.html
Source file bytream_unix.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30module In = struct let of_file_descr ?(io_buffer_size = 4096) fd = let buffer = Bstr.create io_buffer_size in let reader () = match Unix.read_bigarray fd buffer 0 io_buffer_size with | 0 -> raise End_of_file | length -> (~buffer, ~offset:0, ~length) in Bytream.In.make' reader end module Out = struct let of_file_descr fd = let rec really_write_bigarray buffer offset = function | 0 -> () | length -> let written_bytes = Unix.write_bigarray fd buffer 0 length in really_write_bigarray buffer (offset + written_bytes) (length - written_bytes) in let writer ((~buffer, ~length, ..) : Bytream.Out.chunk) = really_write_bigarray buffer 0 length in Bytream.Out.make writer end
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>