package mparser

  1. Overview
  2. Docs
val input : Pervasives.in_channel -> Bytes.t -> int -> int -> int

input chn b pos length reads up to length characters from the channel chn and stores them in the byte-buffer b, starting at position pos. It returns the actual number of characters read. A value less than length is only returned if there are less than length characters available from chn (Pervasives.input is allowed to read less than length characters if it "finds it convenient to do a partial read").

  • raises Invalid_argument

    if pos and length do not specify a valid substring of b.